mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix subtitle sync for .vtt
This commit is contained in:
parent
7616b1cd35
commit
8496b3d1f5
1 changed files with 6 additions and 9 deletions
|
@ -580,18 +580,15 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
|
||||
Array.from(videoElement.textTracks)
|
||||
.filter(function(trackElement) {
|
||||
if (customTrackIndex === -1 ) {
|
||||
// get showing .vtt textTacks
|
||||
return trackElement.mode === 'showing';
|
||||
} else {
|
||||
// get current .ass textTrack
|
||||
return ("textTrack" + customTrackIndex) === trackElement.id;
|
||||
}
|
||||
// get showing .vtt textTacks
|
||||
return (trackElement.mode === 'showing') ||
|
||||
// get current .ass textTrack
|
||||
(("textTrack" + customTrackIndex) === trackElement.id);
|
||||
})
|
||||
.forEach(function(trackElement) {
|
||||
|
||||
var track = mediaStreamTextTracks.filter(function(stream) {
|
||||
return ("textTrack" + stream.Index) === trackElement.id;
|
||||
var track = customTrackIndex === -1 ? null : mediaStreamTextTracks.filter(function (t) {
|
||||
return t.Index === customTrackIndex;
|
||||
})[0];
|
||||
|
||||
if(track) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue