mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-09-03 03:50:02 +03:00
Add VobSub deband settings to renderVobSub
This commit is contained in:
@@ -188,6 +188,8 @@ function getDefaultProfile() {
|
||||
}
|
||||
|
||||
const PRIMARY_TEXT_TRACK_INDEX = 0;
|
||||
const VOBSUB_DEBAND_THRESHOLD = 64;
|
||||
const VOBSUB_DEBAND_RANGE = 15;
|
||||
const SECONDARY_TEXT_TRACK_INDEX = 1;
|
||||
|
||||
export class HtmlVideoPlayer {
|
||||
@@ -1432,6 +1434,13 @@ export class HtmlVideoPlayer {
|
||||
...this.createBitmapSubtitleRendererOptions(videoElement, track, item, targetTextTrackIndex),
|
||||
fileName: getSubtitleFileNameHint(track)
|
||||
};
|
||||
const onLoaded = options.onLoaded;
|
||||
options.onLoaded = () => {
|
||||
this.#currentPgsRenderer?.setDebandEnabled?.(true);
|
||||
this.#currentPgsRenderer?.setDebandThreshold?.(VOBSUB_DEBAND_THRESHOLD);
|
||||
this.#currentPgsRenderer?.setDebandRange?.(VOBSUB_DEBAND_RANGE);
|
||||
onLoaded?.();
|
||||
};
|
||||
import('libbitsub').then((libbitsub) => {
|
||||
this.#currentPgsRenderer = new libbitsub.VobSubRenderer(options);
|
||||
}).catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user