When play state is changed from PAUSED to PLAYING and buffering is detected in the same updateStates() run, the pipeline state is changed back to PAUSED just before triggering playbackStateChanged() notification. As a result, at the time of running playbackStateChanged() player is already marked as paused, triggering pauseInternal() from HTMLMediaElement. Once the buffering is completed and the player tries to change pipeline state from PAUSED back to PLAYING (setting ReadyState and NetworkState accordingly), it is instantly blocked by HTMLMediaElement (from setReadyState()->updatePlayState()) as according to the HTMLMediaPlayer object the player should be paused (shouldBePlaying evaluates to false). In that case, m_player->pause() is called, bringing player back to PAUSED state. As a result, the player can't really exit buffering state by its own and requires external input (like HTMLMediaElement::play()). See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/945
Pull request: https://github.com/WebKit/WebKit/pull/4757
Committed 255113@main (b72b805d48b6): <https://commits.webkit.org/255113@main> Reviewed commits have been landed. Closing PR #4757 and removing active labels.
<rdar://problem/100752694>