Skip to content

Commit

Permalink
Allow any application id for cast receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Sep 23, 2023
1 parent 3370d49 commit 320c1dc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/plugins/chromecastPlayer/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,17 @@ class CastPlayer {
return;
}

let applicationID = applicationStable;
if (userSettings.chromecastVersion() === 'unstable') {
applicationID = applicationUnstable;
}
let applicationID = userSettings.chromecastVersion();
if (applicationID === 'stable') applicationID = applicationStable;
if (applicationID === 'unstable') applicationID = applicationUnstable;

// request session
const sessionRequest = new chrome.cast.SessionRequest(applicationID);
const apiConfig = new chrome.cast.ApiConfig(sessionRequest,
this.sessionListener.bind(this),
this.receiverListener.bind(this));

console.debug('chromecast.initialize');
console.debug(`chromecast.initialize (applicationId=${applicationID})`);
chrome.cast.initialize(apiConfig, this.onInitSuccess.bind(this), this.errorHandler);
}

Expand Down

0 comments on commit 320c1dc

Please sign in to comment.