File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -651,6 +651,12 @@ var MediaSession = /** @class */ (function () {
651651 */
652652 MediaSession . prototype . logMediaContentEnd = function ( options ) {
653653 this . mediaContentComplete = true ;
654+ if ( this . currentPlaybackStartTimestamp ) {
655+ this . storedPlaybackTime =
656+ this . storedPlaybackTime +
657+ ( Date . now ( ) - this . currentPlaybackStartTimestamp ) ;
658+ this . currentPlaybackStartTimestamp = undefined ;
659+ }
654660 var event = this . createMediaEvent ( MediaEventType . ContentEnd , options ) ;
655661 this . logEvent ( event ) ;
656662 } ;
Original file line number Diff line number Diff line change @@ -652,6 +652,12 @@ var MediaSession = (function () {
652652 */
653653 MediaSession . prototype . logMediaContentEnd = function ( options ) {
654654 this . mediaContentComplete = true ;
655+ if ( this . currentPlaybackStartTimestamp ) {
656+ this . storedPlaybackTime =
657+ this . storedPlaybackTime +
658+ ( Date . now ( ) - this . currentPlaybackStartTimestamp ) ;
659+ this . currentPlaybackStartTimestamp = undefined ;
660+ }
655661 var event = this . createMediaEvent ( MediaEventType . ContentEnd , options ) ;
656662 this . logEvent ( event ) ;
657663 } ;
You can’t perform that action at this time.
0 commit comments