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
|
@ -6,7 +6,8 @@
|
||||||
{ name: Globalize.translate('HeaderFavoriteMovies'), types: "Movie", id: "favoriteMovies", shape: 'backdrop', preferThumb: true, showTitle: false },
|
{ name: Globalize.translate('HeaderFavoriteMovies'), types: "Movie", id: "favoriteMovies", shape: 'backdrop', preferThumb: true, showTitle: false },
|
||||||
{ name: Globalize.translate('HeaderFavoriteShows'), types: "Series", id: "favoriteShows", shape: 'backdrop', preferThumb: true, showTitle: false },
|
{ name: Globalize.translate('HeaderFavoriteShows'), types: "Series", id: "favoriteShows", shape: 'backdrop', preferThumb: true, showTitle: false },
|
||||||
{ name: Globalize.translate('HeaderFavoriteEpisodes'), types: "Episode", id: "favoriteEpisode", shape: 'backdrop', preferThumb: false, showTitle: true, showParentTitle: true },
|
{ name: Globalize.translate('HeaderFavoriteEpisodes'), types: "Episode", id: "favoriteEpisode", shape: 'backdrop', preferThumb: false, showTitle: true, showParentTitle: true },
|
||||||
{ name: Globalize.translate('HeaderFavoriteGames'), types: "Game", id: "favoriteGames", shape: 'auto', preferThumb: false, showTitle: true }
|
{ name: Globalize.translate('HeaderFavoriteGames'), types: "Game", id: "favoriteGames", shape: 'auto', preferThumb: false, showTitle: true },
|
||||||
|
{ name: Globalize.translate('HeaderFavoriteAlbums'), types: "MusicAlbum", id: "favoriteAlbums", shape: 'square', preferThumb: false, showTitle: true, overlayText: false, showParentTitle: true }
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
preferThumb: section.preferThumb,
|
preferThumb: section.preferThumb,
|
||||||
shape: section.shape,
|
shape: section.shape,
|
||||||
overlayText: screenWidth >= 600,
|
overlayText: section.overlayText !== false && screenWidth >= 600,
|
||||||
context: 'home-favorites',
|
context: 'home-favorites',
|
||||||
showTitle: section.showTitle,
|
showTitle: section.showTitle,
|
||||||
showParentTitle: section.showParentTitle,
|
showParentTitle: section.showParentTitle,
|
||||||
|
|
|
@ -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) {
|
$(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function (e) {
|
||||||
|
|
||||||
var videoControls = $('#videoControls');
|
var videoControls = $('#videoControls');
|
||||||
|
@ -930,7 +942,7 @@
|
||||||
|
|
||||||
var textStream = textStreams[i];
|
var textStream = textStreams[i];
|
||||||
var textStreamUrl = ApiClient.getUrl('Videos/' + item.Id + '/' + mediaSource.Id + '/Subtitles/' + textStream.Index + '/Stream.vtt', {
|
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' : '';
|
var defaultAttribute = textStream.Index == mediaSource.DefaultSubtitleStreamIndex ? ' default' : '';
|
||||||
|
|
|
@ -183,6 +183,8 @@
|
||||||
element.src = currentSrc;
|
element.src = currentSrc;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
self.updateTextStreamUrls(ticks || 0);
|
||||||
} else {
|
} else {
|
||||||
self.startTimeTicksOffset = ticks;
|
self.startTimeTicksOffset = ticks;
|
||||||
element.src = currentSrc;
|
element.src = currentSrc;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue