Delay access to userSettings

This commit is contained in:
Dmitry Lyzo 2020-06-01 19:38:59 +03:00
parent 021650e6ab
commit a955aeb1cb

View File

@ -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,