mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Added time offset support for PGS subtitles.
This commit is contained in:
parent
e9aedc3305
commit
febc67f04d
3 changed files with 17 additions and 19 deletions
|
@ -594,6 +594,9 @@ export class HtmlVideoPlayer {
|
|||
if (this.#currentAssRenderer) {
|
||||
this.updateCurrentTrackOffset(offsetValue);
|
||||
this.#currentAssRenderer.timeOffset = (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000 + offsetValue;
|
||||
} else if (this.#currentPgsRenderer) {
|
||||
this.updateCurrentTrackOffset(offsetValue);
|
||||
this.#currentPgsRenderer.timeOffset = (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000 + offsetValue;
|
||||
} else {
|
||||
const trackElements = this.getTextTracks();
|
||||
// if .vtt currently rendering
|
||||
|
@ -1333,7 +1336,8 @@ export class HtmlVideoPlayer {
|
|||
import('libpgs').then((libpgs) => {
|
||||
const options = {
|
||||
video: videoElement,
|
||||
subUrl: getTextTrackUrl(track, item)
|
||||
subUrl: getTextTrackUrl(track, item),
|
||||
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000
|
||||
};
|
||||
this.#currentPgsRenderer = new libpgs.PgsRenderer(options);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue