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

Merge pull request #1144 from JustAMan/seek-ass-better

Fix .ASS offset when seeking a progressive stream
This commit is contained in:
dkanada 2020-05-08 16:09:51 +09:00 committed by GitHub
commit 95bd5e4f78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View file

@ -602,7 +602,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
// if .ass currently rendering
if (currentSubtitlesOctopus) {
updateCurrentTrackOffset(offsetValue);
currentSubtitlesOctopus.timeOffset = offsetValue;
currentSubtitlesOctopus.timeOffset = (self._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000 + offsetValue;
} else {
var trackElement = getTextTrack();
// if .vtt currently rendering
@ -860,7 +860,11 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
loading.hide();
htmlMediaHelper.seekOnPlaybackStart(self, e.target, self._currentPlayOptions.playerStartPositionTicks, function () {
if (currentSubtitlesOctopus) currentSubtitlesOctopus.resize();
if (currentSubtitlesOctopus) {
currentSubtitlesOctopus.timeOffset = (self._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000 + currentTrackOffset;
currentSubtitlesOctopus.resize();
currentSubtitlesOctopus.resetRenderAheadCache(false);
}
});
if (self._currentPlayOptions.fullscreen) {
@ -1066,6 +1070,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
onError: function() {
htmlMediaHelper.onErrorInternal(self, 'mediadecodeerror');
},
timeOffset: (self._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000,
// new octopus options; override all, even defaults
renderMode: 'blend',