mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #6462 from jellyfin-web/release-10.10.z
Use reference framerate as sampling rate (target FPS) for SubtitlesOctopus
Original-merge: 9b3fc622c9
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
aa33101e1d
commit
08069a42d1
1 changed files with 10 additions and 1 deletions
|
@ -119,6 +119,12 @@ function requireHlsPlayer(callback) {
|
|||
});
|
||||
}
|
||||
|
||||
function getMediaStreamVideoTracks(mediaSource) {
|
||||
return mediaSource.MediaStreams.filter(function (s) {
|
||||
return s.Type === 'Video';
|
||||
});
|
||||
}
|
||||
|
||||
function getMediaStreamAudioTracks(mediaSource) {
|
||||
return mediaSource.MediaStreams.filter(function (s) {
|
||||
return s.Type === 'Audio';
|
||||
|
@ -1274,6 +1280,9 @@ export class HtmlVideoPlayer {
|
|||
});
|
||||
const htmlVideoPlayer = this;
|
||||
import('@jellyfin/libass-wasm').then(({ default: SubtitlesOctopus }) => {
|
||||
const mediaSource = this._currentPlayOptions.mediaSource;
|
||||
const videoStream = getMediaStreamVideoTracks(mediaSource)[0];
|
||||
|
||||
const options = {
|
||||
video: videoElement,
|
||||
subUrl: getTextTrackUrl(track, item),
|
||||
|
@ -1296,7 +1305,7 @@ export class HtmlVideoPlayer {
|
|||
dropAllAnimations: false,
|
||||
libassMemoryLimit: 40,
|
||||
libassGlyphLimit: 40,
|
||||
targetFps: 24,
|
||||
targetFps: videoStream?.ReferenceFrameRate || videoStream?.RealFrameRate || 24,
|
||||
prescaleFactor: 0.8,
|
||||
prescaleHeightLimit: 1080,
|
||||
maxRenderHeight: 2160,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue