mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
replace all images when using identify function
This commit is contained in:
parent
9029ce93d3
commit
6b1c289d0c
5 changed files with 30 additions and 11 deletions
|
@ -194,6 +194,20 @@
|
|||
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: index });
|
||||
}
|
||||
}
|
||||
else if (currentStream && newStream) {
|
||||
|
||||
if (newStream.IsTextSubtitleStream) {
|
||||
selectedTrackElementIndex = index;
|
||||
|
||||
if (!currentStream.IsTextSubtitleStream) {
|
||||
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: -1 });
|
||||
}
|
||||
} else {
|
||||
|
||||
// Need to change the transcoded stream to add subs
|
||||
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: index });
|
||||
}
|
||||
}
|
||||
|
||||
self.setCurrentTrackElement(selectedTrackElementIndex);
|
||||
self.currentSubtitleStreamIndex = index;
|
||||
|
@ -918,9 +932,9 @@
|
|||
var textStreamUrl = ApiClient.getUrl('Videos/' + item.Id + '/' + mediaSource.Id + '/Subtitles/' + textStream.Index + '/Stream.vtt', {
|
||||
});
|
||||
|
||||
var defaultAttribute = i.Index == mediaSource.DefaultSubtitleStreamIndex ? ' default' : '';
|
||||
var defaultAttribute = textStream.Index == mediaSource.DefaultSubtitleStreamIndex ? ' default' : '';
|
||||
|
||||
html += '<track kind="subtitles" src="' + textStreamUrl + '" srclang="' + (textStream.Language || 'und') + '"' + defaultAttribute + '>';
|
||||
html += '<track kind="subtitles" src="' + textStreamUrl + '" srclang="' + (textStream.Language || 'und') + '"' + defaultAttribute + '></track>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue