mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update translations
This commit is contained in:
parent
c944079976
commit
640fc18b21
80 changed files with 2365 additions and 1909 deletions
|
@ -146,6 +146,7 @@
|
|||
self.setSubtitleStreamIndex = function (index) {
|
||||
|
||||
if (!self.supportsTextTracks()) {
|
||||
|
||||
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: index });
|
||||
self.currentSubtitleStreamIndex = index;
|
||||
return;
|
||||
|
@ -193,6 +194,7 @@
|
|||
}
|
||||
|
||||
self.setCurrentTrackElement(selectedTrackElementIndex);
|
||||
|
||||
self.currentSubtitleStreamIndex = index;
|
||||
};
|
||||
|
||||
|
@ -202,17 +204,28 @@
|
|||
return s.Type == 'Subtitle' && s.IsTextSubtitleStream;
|
||||
});
|
||||
|
||||
var newStream = textStreams.filter(function (s) {
|
||||
return s.Index == index;
|
||||
})[0];
|
||||
|
||||
var trackIndex = newStream ? textStreams.indexOf(newStream) : -1;
|
||||
|
||||
console.log('Setting new text track index to: ' + trackIndex);
|
||||
|
||||
var allTracks = self.currentMediaElement.textTracks; // get list of tracks
|
||||
|
||||
for (var i = 0; i < allTracks.length; i++) {
|
||||
|
||||
var trackIndex = textStreams[i].Index;
|
||||
var mode;
|
||||
|
||||
if (trackIndex == index) {
|
||||
allTracks[i].mode = "showing"; // show this track
|
||||
if (trackIndex == i) {
|
||||
mode = "showing"; // show this track
|
||||
} else {
|
||||
allTracks[i].mode = "disabled"; // hide all other tracks
|
||||
mode = "disabled"; // hide all other tracks
|
||||
}
|
||||
|
||||
console.log('Setting track ' + i + ' mode to: ' + mode);
|
||||
allTracks[i].mode = mode;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -382,13 +395,14 @@
|
|||
|
||||
$('.videoSubtitlePopup').on('click', '.mediaPopupOption', function () {
|
||||
|
||||
$('.videoSubtitlePopup').popup('close');
|
||||
|
||||
if (!$(this).hasClass('selectedMediaPopupOption')) {
|
||||
|
||||
var index = parseInt(this.getAttribute('data-index'));
|
||||
|
||||
self.setSubtitleStreamIndex(index);
|
||||
}
|
||||
|
||||
$('.videoSubtitlePopup').popup('close');
|
||||
});
|
||||
|
||||
$('.videoQualityPopup').on('click', '.mediaPopupOption', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue