From a955aeb1cbfb66dad67f62b592c77d91a4afa8a6 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Mon, 1 Jun 2020 19:38:59 +0300 Subject: [PATCH] Delay access to userSettings --- src/components/chromecast/chromecastplayer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/chromecast/chromecastplayer.js b/src/components/chromecast/chromecastplayer.js index 8edca9010b..b3f75f7a6d 100644 --- a/src/components/chromecast/chromecastplayer.js +++ b/src/components/chromecast/chromecastplayer.js @@ -57,11 +57,6 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', ' var applicationStable = 'F007D354'; var applicationNightly = '6F511C87'; - var applicationID = applicationStable; - if (userSettings.chromecastVersion() === 'nightly') { - applicationID = applicationNightly; - } - var messageNamespace = 'urn:x-cast:com.connectsdk'; var CastPlayer = function () { @@ -105,6 +100,11 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', ' return; } + var applicationID = applicationStable; + if (userSettings.chromecastVersion() === 'nightly') { + applicationID = applicationNightly; + } + // request session var sessionRequest = new chrome.cast.SessionRequest(applicationID); var apiConfig = new chrome.cast.ApiConfig(sessionRequest,