mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #613 from redSpoutnik/reset-subtitle-sync
reset subtitle offset on next episode play
(cherry picked from commit b67e31791d
)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
This commit is contained in:
parent
298d8d7929
commit
bc66fadb0e
1 changed files with 8 additions and 1 deletions
|
@ -188,7 +188,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
var currentAssRenderer;
|
||||
var customTrackIndex = -1;
|
||||
|
||||
var showTrackOffset = false;
|
||||
var showTrackOffset;
|
||||
var currentTrackOffset;
|
||||
|
||||
var videoSubtitlesElem;
|
||||
|
@ -280,6 +280,8 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
|
||||
self._currentTime = null;
|
||||
|
||||
self.resetSubtitleOffset();
|
||||
|
||||
return createMediaElement(options).then(function (elem) {
|
||||
|
||||
return updateVideoUrl(options, options.mediaSource).then(function () {
|
||||
|
@ -560,6 +562,11 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
setCurrentTrackElement(index);
|
||||
};
|
||||
|
||||
self.resetSubtitleOffset = function() {
|
||||
currentTrackOffset = 0;
|
||||
showTrackOffset = false;
|
||||
}
|
||||
|
||||
self.enableShowingSubtitleOffset = function() {
|
||||
showTrackOffset = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue