mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
seek with vtt subs
This commit is contained in:
parent
e91b7de7b5
commit
77b267a916
3 changed files with 19 additions and 4 deletions
|
@ -198,7 +198,7 @@
|
|||
|
||||
if (newStream.IsTextSubtitleStream) {
|
||||
selectedTrackElementIndex = index;
|
||||
|
||||
|
||||
if (!currentStream.IsTextSubtitleStream) {
|
||||
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: -1 });
|
||||
}
|
||||
|
@ -233,6 +233,18 @@
|
|||
}
|
||||
};
|
||||
|
||||
self.updateTextStreamUrls = function (startPositionTicks) {
|
||||
|
||||
$('track', video).each(function () {
|
||||
|
||||
var currentSrc = this.src;
|
||||
|
||||
currentSrc = replaceQueryString(currentSrc, 'startPositionTicks', startPositionTicks);
|
||||
|
||||
this.src = currentSrc;
|
||||
});
|
||||
};
|
||||
|
||||
$(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function (e) {
|
||||
|
||||
var videoControls = $('#videoControls');
|
||||
|
@ -930,7 +942,7 @@
|
|||
|
||||
var textStream = textStreams[i];
|
||||
var textStreamUrl = ApiClient.getUrl('Videos/' + item.Id + '/' + mediaSource.Id + '/Subtitles/' + textStream.Index + '/Stream.vtt', {
|
||||
startPositionTicks: startPosition
|
||||
startPositionTicks: (startPosition || 0)
|
||||
});
|
||||
|
||||
var defaultAttribute = textStream.Index == mediaSource.DefaultSubtitleStreamIndex ? ' default' : '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue