From c3f416c2ff4b581bfcade875dfb507634934f672 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 21 Sep 2016 13:05:35 -0400 Subject: [PATCH] Add chromecast fixes --- dashboard-ui/scripts/chromecast.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dashboard-ui/scripts/chromecast.js b/dashboard-ui/scripts/chromecast.js index 96b1b13734..cb35915b3c 100644 --- a/dashboard-ui/scripts/chromecast.js +++ b/dashboard-ui/scripts/chromecast.js @@ -54,6 +54,7 @@ var applicationID = "2D4B1DA3"; // This is the beta version used for testing new changes + //applicationID = '27C4EB5B'; var messageNamespace = 'urn:x-cast:com.connectsdk'; @@ -843,22 +844,21 @@ self.tryPair = function (target) { - castPlayer.launchApp(); - return new Promise(function (resolve, reject) { - if (castPlayer.deviceState != DEVICE_STATE.ACTIVE && castPlayer.isInitialized) { + if (castPlayer.deviceState != DEVICE_STATE.ACTIVE && castPlayer.isInitialized) { + return new Promise(function (resolve, reject) { currentResolve = resolve; currentReject = reject; castPlayer.launchApp(); - } else { + }); + } else { - currentResolve = null; - currentReject = null; + currentResolve = null; + currentReject = null; - reject(); - } - }); + return Promise.reject(); + } }; }