1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

more readable statement to find showing textTrack

This commit is contained in:
redSpoutnik 2019-10-10 17:45:56 +02:00
parent 7aa5d28510
commit 029e015068

View file

@ -581,9 +581,11 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
Array.from(videoElement.textTracks)
.filter(function(trackElement) {
// get showing .vtt textTacks
return (trackElement.mode === 'showing') ||
var isVttTrackShowing = trackElement.mode === 'showing';
// get current .ass textTrack
(("textTrack" + customTrackIndex) === trackElement.id);
var isAssTrackShowing = ("textTrack" + customTrackIndex) === trackElement.id;
return isVttTrackShowing || isAssTrackShowing;
})
.forEach(function(trackElement) {