Skip to content

Commit

Permalink
chore: correct video event error propagation on freeze check (#2909)
Browse files Browse the repository at this point in the history
  • Loading branch information
pravusjif authored Nov 28, 2024
1 parent 4b1903c commit a3f6658
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ private static VideoState GetCurrentVideoState(in MediaPlayerComponent mediaPlay
state = mediaPlayerControl.IsSeeking() ? VideoState.VsSeeking : VideoState.VsBuffering;

// If the seeking/buffering never ends, update state with error so the scene can react
if ((Time.realtimeSinceStartup - mediaPlayer.LastStateChangeTime) > MAX_VIDEO_FROZEN_SECONDS_BEFORE_ERROR &&
mediaPlayer.LastPropagatedState != VideoState.VsPaused &&
mediaPlayer.LastPropagatedState != VideoState.VsBuffering &&
mediaPlayer.LastPropagatedState != VideoState.VsSeeking)
if ((Time.realtimeSinceStartup - mediaPlayer.LastStateChangeTime) > MAX_VIDEO_FROZEN_SECONDS_BEFORE_ERROR
&& mediaPlayer.LastPropagatedState != VideoState.VsPaused)
{
state = VideoState.VsError;
}
Expand Down

0 comments on commit a3f6658

Please sign in to comment.