mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-12-23 14:03:35 +00:00
parent
369aed3e1f
commit
07433033b9
@ -84,8 +84,14 @@ export default {
|
|||||||
setPlayerAttrs(player, videoEl, dash, shaka) {
|
setPlayerAttrs(player, videoEl, dash, shaka) {
|
||||||
player.load("data:application/dash+xml;charset=utf-8;base64," + btoa(dash)).then(() => {
|
player.load("data:application/dash+xml;charset=utf-8;base64," + btoa(dash)).then(() => {
|
||||||
this.video.subtitles.map(subtitle => {
|
this.video.subtitles.map(subtitle => {
|
||||||
player.addTextTrack(subtitle.url, "eng", "SUBTITLE", subtitle.mimeType, null, "English");
|
player.addTextTrack(
|
||||||
player.setTextTrackVisibility(true);
|
subtitle.url,
|
||||||
|
subtitle.code,
|
||||||
|
"SUBTITLE",
|
||||||
|
subtitle.mimeType,
|
||||||
|
null,
|
||||||
|
subtitle.name,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
if (localStorage) videoEl.volume = localStorage.getItem("volume") || 1;
|
if (localStorage) videoEl.volume = localStorage.getItem("volume") || 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user