Example #1
0
 /**
  * Get the current play mode settings.
  *
  * @return array An array with 2 boolean elements (shuffle and repeat)
  */
 public function getMode()
 {
     $data = $this->soap("AVTransport", "GetTransportSettings");
     return Helper::getMode($data["PlayMode"]);
 }
Example #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();
 }