mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Fix double ui.
This commit is contained in:
parent
9b659ad3b8
commit
5e6b41f8bf
1 changed files with 14 additions and 15 deletions
|
@ -47,7 +47,7 @@ export default {
|
|||
|
||||
this.player = player;
|
||||
|
||||
this.setPlayerAttrs(player, videoEl, dash, shaka);
|
||||
this.setPlayerAttrs(this.player, videoEl, dash, shaka);
|
||||
});
|
||||
else this.setPlayerAttrs(this.player, videoEl, dash, this.shaka);
|
||||
|
||||
|
@ -85,28 +85,27 @@ export default {
|
|||
player.load("data:application/dash+xml;charset=utf-8;base64," + btoa(dash)).then(() => {
|
||||
this.video.subtitles.map(subtitle => {
|
||||
player.addTextTrack(subtitle.url, "eng", "SUBTITLE", subtitle.mimeType, null, "English");
|
||||
player.setTextTrackVisibility(true);
|
||||
});
|
||||
if (localStorage) videoEl.volume = localStorage.getItem("volume") || 1;
|
||||
|
||||
const ui =
|
||||
this.ui ||
|
||||
(this.ui = new shaka.ui.Overlay(
|
||||
if (!this.ui) {
|
||||
this.ui = new shaka.ui.Overlay(
|
||||
player,
|
||||
document.querySelector("div[data-shaka-player-container]"),
|
||||
videoEl,
|
||||
));
|
||||
);
|
||||
|
||||
const config = {
|
||||
overflowMenuButtons: ["quality", "captions", "playback_rate"],
|
||||
seekBarColors: {
|
||||
base: "rgba(255, 255, 255, 0.3)",
|
||||
buffered: "rgba(255, 255, 255, 0.54)",
|
||||
played: "rgb(255, 0, 0)",
|
||||
},
|
||||
};
|
||||
const config = {
|
||||
overflowMenuButtons: ["quality", "captions", "playback_rate"],
|
||||
seekBarColors: {
|
||||
base: "rgba(255, 255, 255, 0.3)",
|
||||
buffered: "rgba(255, 255, 255, 0.54)",
|
||||
played: "rgb(255, 0, 0)",
|
||||
},
|
||||
};
|
||||
|
||||
ui.configure(config);
|
||||
this.ui.configure(config);
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue