예제 #1
0
 /**
  * Set the current play mode settings.
  *
  * @param array $options An array with 2 boolean elements (shuffle and repeat)
  *
  * @return static
  */
 public function setMode(array $options)
 {
     $this->soap("AVTransport", "SetPlayMode", ["NewPlayMode" => Helper::setMode($options)]);
     return $this;
 }
예제 #2
0
 /**
  * Set a particular PlayMode.
  *
  * @param string $type The play mode attribute to update
  * @param bool $value The value to set the attribute to
  *
  * @return static
  */
 protected function setPlayMode($type, $value)
 {
     $value = (bool) $value;
     $mode = Helper::getMode($this->attributes["PlayMode"]);
     if ($mode[$type] === $value) {
         return $this;
     }
     $mode[$type] = $value;
     $this->attributes["PlayMode"] = Helper::setMode($mode);
     return $this->save();
 }