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:
parent
7aa5d28510
commit
029e015068
1 changed files with 4 additions and 2 deletions
|
@ -581,9 +581,11 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
||||||
Array.from(videoElement.textTracks)
|
Array.from(videoElement.textTracks)
|
||||||
.filter(function(trackElement) {
|
.filter(function(trackElement) {
|
||||||
// get showing .vtt textTacks
|
// get showing .vtt textTacks
|
||||||
return (trackElement.mode === 'showing') ||
|
var isVttTrackShowing = trackElement.mode === 'showing';
|
||||||
// get current .ass textTrack
|
// get current .ass textTrack
|
||||||
(("textTrack" + customTrackIndex) === trackElement.id);
|
var isAssTrackShowing = ("textTrack" + customTrackIndex) === trackElement.id;
|
||||||
|
|
||||||
|
return isVttTrackShowing || isAssTrackShowing;
|
||||||
})
|
})
|
||||||
.forEach(function(trackElement) {
|
.forEach(function(trackElement) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue