mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
reset subtitle offset on track change
This commit is contained in:
parent
aca0fb09bc
commit
b0d4b94140
@ -579,10 +579,10 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
||||
var videoElement = self._mediaElement;
|
||||
if (videoElement) {
|
||||
return Array.from(videoElement.textTracks)
|
||||
.find(function(trackElement) {
|
||||
// get showing .vtt textTack
|
||||
return trackElement.mode === 'showing';
|
||||
});
|
||||
.find(function(trackElement) {
|
||||
// get showing .vtt textTack
|
||||
return trackElement.mode === 'showing';
|
||||
});
|
||||
} else {
|
||||
// get track events
|
||||
return currentTrackEvents;
|
||||
@ -603,7 +603,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
||||
offsetValue = updateCurrentTrackOffset(offsetValue);
|
||||
setVttSubtitleOffset(trackElement, offsetValue);
|
||||
} else {
|
||||
console.log("No available track, cannot apply offset : " + offsetValue);
|
||||
console.log("No available track, cannot apply offset : ", offsetValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -1022,6 +1022,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
||||
return;
|
||||
}
|
||||
|
||||
self.resetSubtitleOffset();
|
||||
var item = self._currentPlayOptions.item;
|
||||
|
||||
destroyCustomTrack(videoElement);
|
||||
|
Loading…
Reference in New Issue
Block a user