Store ui in window.

This commit is contained in:
FireMasterK 2021-04-14 12:24:09 +05:30
parent 5e6b41f8bf
commit 4b1b71d452
No known key found for this signature in database
GPG key ID: 8DFF5DD33E93DB58

View file

@ -88,8 +88,8 @@ export default {
});
if (localStorage) videoEl.volume = localStorage.getItem("volume") || 1;
if (!this.ui) {
this.ui = new shaka.ui.Overlay(
if (!window.ui) {
window.ui = new shaka.ui.Overlay(
player,
document.querySelector("div[data-shaka-player-container]"),
videoEl,
@ -104,7 +104,7 @@ export default {
},
};
this.ui.configure(config);
window.ui.configure(config);
}
});
},
@ -113,7 +113,7 @@ export default {
if (this.player) {
this.player.destroy();
this.player = undefined;
this.ui = undefined;
window.ui = undefined;
}
},
};