mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-14 04:08:21 +00:00
parent
369aed3e1f
commit
07433033b9
@ -84,8 +84,14 @@ export default {
|
||||
setPlayerAttrs(player, videoEl, dash, shaka) {
|
||||
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);
|
||||
player.addTextTrack(
|
||||
subtitle.url,
|
||||
subtitle.code,
|
||||
"SUBTITLE",
|
||||
subtitle.mimeType,
|
||||
null,
|
||||
subtitle.name,
|
||||
);
|
||||
});
|
||||
if (localStorage) videoEl.volume = localStorage.getItem("volume") || 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user