subtitle-sync: use currentSubtitlesOctopus instead of currentAssRenderer

This commit is contained in:
redSpoutnik 2020-04-12 15:22:17 +02:00
parent 0ba4c821f4
commit c5669eca4d

View File

@ -600,8 +600,9 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
var offsetValue = parseFloat(offset); var offsetValue = parseFloat(offset);
// if .ass currently rendering // if .ass currently rendering
if (currentAssRenderer) { if (currentSubtitlesOctopus) {
updateCurrentTrackOffset(offsetValue); updateCurrentTrackOffset(offsetValue);
currentSubtitlesOctopus.timeOffset = offsetValue;
} else { } else {
var trackElement = getTextTrack(); var trackElement = getTextTrack();
// if .vtt currently rendering // if .vtt currently rendering
@ -1220,11 +1221,6 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
function updateSubtitleText(timeMs) { function updateSubtitleText(timeMs) {
// handle offset for ass tracks
if (currentTrackOffset) {
timeMs += (currentTrackOffset * 1000);
}
var clock = currentClock; var clock = currentClock;
if (clock) { if (clock) {
try { try {