| Summary: | [GStreamer] Don't emit playbackStateChanged() event after a seek | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Enrique Ocaña <eocanha> |
| Component: | Media | Assignee: | Enrique Ocaña <eocanha> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Pull request: https://github.com/WebKit/WebKit/pull/9934 Committed 260314@main (5d8787383e48): <https://commits.webkit.org/260314@main> Reviewed commits have been landed. Closing PR #9934 and removing active labels. |
It is not possible to pause the playback during a seek. Sink elements lose their states entering ASYNC PAUSED->PAUSED transition. Calling HTML video.pause() during a seek doesn't result in pipeline state change call as player reports it's paused already. Forcing gst_element_set_state() doesn't really help in this case as pipeline enters inconsistent state after a seek that everything is playing but sinks are paused. In addition, triggering playbackStateChanged() at seek end causes HTMLMediaElement::playInternal() that cleans up all signs of previous pause() call. Don't emit playbackStateChanged() at seek end so HTML won't force playInternal() and HTMLMediaElement will call pauseInternal() again after a seek (from updatePlayState()). This fixes following scenario: video.currentTime = x.xx video.play(); setTimeout(()=>{ video.pause(); }, 1} // ensure async duringn a seek (video didn't pause after initial seek had finished) See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1013