You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add mediaPlayerPlaybackStateChanged to MediaPlayerClient
Reviewed by Eric Carlson.
https://bugs.webkit.org/show_bug.cgi?id=45263
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.
updatePlayState() is then refactored to take into account the
situation where the backend is already in the correct state but
WebCore is not, so that we update the playback progress timer
and set m_playing correctly.
updatePlayState() changes Should be covered by existing tests.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged):
(WebCore::HTMLMediaElement::updatePlayState):
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::playbackStateChanged):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerPlaybackStateChanged):
Canonical link: https://commits.webkit.org/57714@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
0 commit comments