コード例 #1
0
ファイル: mUPnPGUI.class.php プロジェクト: nemiah/fheME
 public function playRadio($targetUPnPIDs, $UPnPRadioStationID)
 {
     $ids = explode(",", $targetUPnPIDs);
     $URS = new UPnPRadioStation($UPnPRadioStationID);
     #echo $URS->A("UPnPRadioStationURL");
     $Us = array();
     foreach ($ids as $id) {
         $U = new UPnP($id);
         $U->SetAVTransportURI(0, $URS->A("UPnPRadioStationURL"));
         $Us[$id] = $U;
     }
     foreach ($ids as $id) {
         $Us[$id]->Play();
     }
 }
コード例 #2
0
ファイル: UPnPGUI.class.php プロジェクト: nemiah/fheME
 public function readSetStart($ObjectID, $targetUPnPID)
 {
     $B = new Button("Reload", "refresh");
     $B->onclick(OnEvent::popup("", "UPnP", $this->getID(), "readSetStart", array("'" . $ObjectID . "'")));
     $B->style("margin:10px;");
     $result = $this->Browse($ObjectID, "BrowseMetadata", "*");
     echo $B;
     echo "<pre style=\"max-height:300px;overflow:auto;padding:5px;\">";
     #$this->prettyfy($result["Result"]);
     $xml = new SimpleXMLElement($result["Result"]);
     print_r($xml->item[0]->res[0] . "");
     $U = new UPnP($targetUPnPID);
     $U->SetAVTransportURI(0, $xml->item[0]->res[0] . "");
     $U->Play();
     echo "</pre>";
 }