File tree 1 file changed +10
-1
lines changed
src/plugins/htmlVideoPlayer
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,12 @@ function requireHlsPlayer(callback) {
119
119
} ) ;
120
120
}
121
121
122
+ function getMediaStreamVideoTracks ( mediaSource ) {
123
+ return mediaSource . MediaStreams . filter ( function ( s ) {
124
+ return s . Type === 'Video' ;
125
+ } ) ;
126
+ }
127
+
122
128
function getMediaStreamAudioTracks ( mediaSource ) {
123
129
return mediaSource . MediaStreams . filter ( function ( s ) {
124
130
return s . Type === 'Audio' ;
@@ -1274,6 +1280,9 @@ export class HtmlVideoPlayer {
1274
1280
} ) ;
1275
1281
const htmlVideoPlayer = this ;
1276
1282
import ( '@jellyfin/libass-wasm' ) . then ( ( { default : SubtitlesOctopus } ) => {
1283
+ const mediaSource = this . _currentPlayOptions . mediaSource ;
1284
+ const videoStream = getMediaStreamVideoTracks ( mediaSource ) [ 0 ] ;
1285
+
1277
1286
const options = {
1278
1287
video : videoElement ,
1279
1288
subUrl : getTextTrackUrl ( track , item ) ,
@@ -1296,7 +1305,7 @@ export class HtmlVideoPlayer {
1296
1305
dropAllAnimations : false ,
1297
1306
libassMemoryLimit : 40 ,
1298
1307
libassGlyphLimit : 40 ,
1299
- targetFps : 24 ,
1308
+ targetFps : videoStream ?. ReferenceFrameRate || videoStream ?. RealFrameRate || 24 ,
1300
1309
prescaleFactor : 0.8 ,
1301
1310
prescaleHeightLimit : 1080 ,
1302
1311
maxRenderHeight : 2160 ,
You can’t perform that action at this time.
0 commit comments