Commit f57d880
[MSE][GStreamer] Make fake preroll asynchronous
https://bugs.webkit.org/show_bug.cgi?id=295289
Reviewed by Alicia Boya Garcia.
With the current implementation the whole seek flow as executed in a
single main loop cycle. As a result, the JS app had no chance to spot
that video.seeking attribute is ever set to true. Also some apps listen
to video.onseeking and expects that video.seeking attribute to be true
in such case. That wasn't a valid assumption.
Also, the behaviour isn't the same in <video> elements that are
audio-only as in <audio> elements.
This happens on the Amlogic platform, that doesn't have asynchronous
state changes on its audio sink. Spotify is broken there because of this
problem.
See:
#1232
#1527
This patch calls didPreroll() also for <video> elements that are
audio-only. Also makes that call async by putting it on the HTML media
element task queue to make sure it is executed after dispatching
'seeking' event to JS so the app has a chance to notice that
HTMLmedia.seeking attribute is 'true'.
Original author: Andrzej Surdej <101130014+asurdej-comcast@users.noreply.github.com>
* Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::doSeek): Find the actual final audio sink. Call didPreroll() asynchronously for any media element having only audio.
Canonical link: https://commits.webkit.org/298239@main1 parent 23491c2 commit f57d880
1 file changed
Lines changed: 32 additions & 11 deletions
Lines changed: 32 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
283 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
284 | 295 | | |
285 | 296 | | |
286 | 297 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
295 | 316 | | |
296 | 317 | | |
297 | 318 | | |
| |||
0 commit comments