@@ -339,13 +339,13 @@ export class YouTubeProvider
339339 protected override _onMessage ( { info } : YouTubeMessage , event : MessageEvent ) {
340340 if ( ! info ) return ;
341341
342- const { title, realDuration , playbackRate } = this . _ctx . $state ;
342+ const { title, intrinsicDuration , playbackRate } = this . _ctx . $state ;
343343
344344 if ( isObject ( info . videoData ) && info . videoData . title !== title ( ) ) {
345345 this . _notify ( 'title-change' , info . videoData . title , event ) ;
346346 }
347347
348- if ( isNumber ( info . duration ) && info . duration !== realDuration ( ) ) {
348+ if ( isNumber ( info . duration ) && info . duration !== intrinsicDuration ( ) ) {
349349 if ( isNumber ( info . videoLoadedFraction ) ) {
350350 const buffered = info . progressState ?. loaded ?? info . videoLoadedFraction * info . duration ,
351351 seekable = new TimeRange ( 0 , info . duration ) ;
@@ -369,7 +369,7 @@ export class YouTubeProvider
369369 } = info . progressState ;
370370 this . _onTimeUpdate ( current , event ) ;
371371 this . _onProgress ( loaded , new TimeRange ( seekableStart , seekableEnd ) , event ) ;
372- if ( _duration !== duration ( ) ) {
372+ if ( _duration !== intrinsicDuration ( ) ) {
373373 this . _notify ( 'duration-change' , _duration , event ) ;
374374 }
375375 }
0 commit comments