diff --git a/CCBaseSender.php b/CCBaseSender.php index e2896f1..b3a9bdd 100644 --- a/CCBaseSender.php +++ b/CCBaseSender.php @@ -20,13 +20,13 @@ public function launch() { // Grab the appid preg_match("/\"appId\":\"([^\"]*)/",$s,$m); $appid = $m[1]; - if ($appid == "CC1AD845") { + if ($appid == $this->appid) { // Default Media Receiver is live $this->chromecast->getStatus(); $this->chromecast->connect(); } else { // Default Media Receiver is not currently live, start it. - $this->chromecast->launch("CC1AD845"); + $this->chromecast->launch($this->appid); $this->chromecast->transportid = ""; $r = ""; while (!preg_match("/Ready to Cast/",$r) && !preg_match("/Default Media Receiver/",$r)) { diff --git a/CCDefaultMediaPlayer.php b/CCDefaultMediaPlayer.php index 0aac40f..084fb51 100644 --- a/CCDefaultMediaPlayer.php +++ b/CCDefaultMediaPlayer.php @@ -6,6 +6,7 @@ class CCDefaultMediaPlayer extends CCBaseSender { + public $appid="CC1AD845"; public function play($url,$streamType,$contentType,$autoPlay,$currentTime) { // Start a playing