Bug 245739 - [GStreamer] Fix player stucking in buffering (paused) state for progressive streaming
Summary: [GStreamer] Fix player stucking in buffering (paused) state for progressive s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Enrique Ocaña
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-27 09:18 PDT by Enrique Ocaña
Modified: 2022-10-04 01:27 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Ocaña 2022-09-27 09:18:20 PDT
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
Comment 1 Enrique Ocaña 2022-09-27 09:32:26 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4757
Comment 2 EWS 2022-10-04 01:26:35 PDT
Committed 255113@main (b72b805d48b6): <https://commits.webkit.org/255113@main>

Reviewed commits have been landed. Closing PR #4757 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-10-04 01:27:21 PDT
<rdar://problem/100752694>