Skip to content

Commit 46455f0

Browse files
[GST][MSE] Skip playback state update while EOS
Playback state change notification syncs Media Client (HTMLMediaElement) state with current player state: commit fb0730e: The platform backend may change state, for example as a result of an external plugin controlling the backend, so we need to react to this situation by syncing up the WebCore state with the platform backend. We call playInternal()/pauseInternal() depending on the backend state, to trigger the corresponding DOM events to match the state. Sending that notification on EOS condition may effectively pause the pipeline without user request becasue the GST player reports it is paused m_isEndReached is set.
1 parent d84ad81 commit 46455f0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,15 @@ void MediaPlayerPrivateGStreamerMSE::updateStates()
477477
}
478478
}
479479

480+
if (m_isEndReached) {
481+
// m_isEndReached always makes HTMLMediaElement think playback is paused,
482+
// despite the actual pipeline state. Notifying playback state change
483+
// here would sync HTMLMediaElement state to paused while the pipeline
484+
// could be in PLAYING state. That could effectively pause the pipeline
485+
// without any pause request from the user.
486+
shouldUpdatePlaybackState = false;
487+
}
488+
480489
if (!shouldUpdatePlaybackState)
481490
return;
482491

0 commit comments

Comments
 (0)