mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Destroy the UI.
This commit is contained in:
parent
8087788085
commit
195a2bcb58
1 changed files with 5 additions and 5 deletions
|
@ -88,8 +88,8 @@ export default {
|
||||||
});
|
});
|
||||||
if (localStorage) videoEl.volume = localStorage.getItem("volume") || 1;
|
if (localStorage) videoEl.volume = localStorage.getItem("volume") || 1;
|
||||||
|
|
||||||
if (!window.ui) {
|
if (!this.ui) {
|
||||||
window.ui = new shaka.ui.Overlay(
|
this.ui = new shaka.ui.Overlay(
|
||||||
player,
|
player,
|
||||||
document.querySelector("div[data-shaka-player-container]"),
|
document.querySelector("div[data-shaka-player-container]"),
|
||||||
videoEl,
|
videoEl,
|
||||||
|
@ -104,7 +104,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
window.ui.configure(config);
|
this.ui.configure(config);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -112,9 +112,9 @@ export default {
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
if (this.player) {
|
if (this.player) {
|
||||||
this.player.destroy();
|
this.player.destroy();
|
||||||
|
this.ui.destroy();
|
||||||
this.player = undefined;
|
this.player = undefined;
|
||||||
window.ui = undefined;
|
this.ui = undefined;
|
||||||
document.querySelector("video").remove();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue