mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
parent
369aed3e1f
commit
07433033b9
1 changed files with 8 additions and 2 deletions
|
@ -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 a new issue