mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1768202 - Get the correct session id from netflix api. r=pip-reviewers,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D145816
This commit is contained in:
parent
ffd6d97fc2
commit
34f2616c47
@ -8,7 +8,13 @@ class PictureInPictureVideoWrapper {
|
||||
constructor() {
|
||||
let netflixPlayerAPI = window.wrappedJSObject.netflix.appContext.state.playerApp.getAPI()
|
||||
.videoPlayer;
|
||||
let sessionId = netflixPlayerAPI.getAllPlayerSessionIds()[0];
|
||||
let sessionId = null;
|
||||
for (let id of netflixPlayerAPI.getAllPlayerSessionIds()) {
|
||||
if (id.startsWith("watch-")) {
|
||||
sessionId = id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.player = netflixPlayerAPI.getVideoPlayerBySessionId(sessionId);
|
||||
}
|
||||
play() {
|
||||
|
Loading…
Reference in New Issue
Block a user