/** * Get the metadata xml for this track. * * @return string */ public function getMetaData() { $uri = substr($this->uri, strlen(self::PREFIX)); if ($pos = strpos($uri, ".mp3")) { $uri = substr($uri, 0, $pos); } return Helper::createMetaDataXml(Helper::TRACK_HASH . self::UNIQUE . "{$uri}", "-1", ["dc:title" => "", "upnp:class" => "object.item.audioItem.musicTrack"], "519"); }
/** * 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; }
/** * Get the metadata xml for this message. * * @return string */ public function getMetaData() { return Helper::createMetaDataXml("-1", "-1", ["res" => $this->getUri(), "upnp:albumArtURI" => "", "dc:title" => $this->text, "upnp:class" => "object.item.audioItem.musicTrack", "dc:creator" => "Google", "upnp:album" => "Text To Speech"]); }
/** * Get the metadata xml for this stream. * * @return string */ public function getMetaData() { return Helper::createMetaDataXml("-1", "-1", ["dc:title" => $this->getName() ?: "Stream", "upnp:class" => "object.item.audioItem.audioBroadcast", "desc" => ["_attributes" => ["id" => "cdudn", "nameSpace" => "urn:schemas-rinconnetworks-com:metadata-1-0/"], "_value" => "SA_RINCON65031_"]]); }
/** * 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(); }
/** * Get the metadata xml for this track. * * @return string */ public function getMetaData() { return Helper::createMetaDataXml($this->getId(), "-1", ["res" => $this->uri, "upnp:albumArtURI" => $this->albumArt, "dc:title" => $this->title, "upnp:class" => "object.item.audioItem.musicTrack", "dc:creator" => $this->artist, "upnp:album" => $this->album]); }
/** * Get the metadata xml for this track. * * @return string */ public function getMetaData() { $uri = substr($this->uri, strlen(self::PREFIX)); return Helper::createMetaDataXml(Helper::TRACK_HASH . "{$uri}", "-1", ["dc:title" => "", "upnp:class" => "object.item.audioItem.musicTrack"], static::$region); }