-
Notifications
You must be signed in to change notification settings - Fork 149
wpe2.38 [GSTMediaPlayer] Make fake preroll asynchronous #1232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wpe2.38 [GSTMediaPlayer] Make fake preroll asynchronous #1232
Conversation
1) Call didPreroll() also for <video> elements that are audio-only 2) Make didPreroll() call async and put in onto HTML media element task queue to make sure it is executed after dispatching 'seeking' event to JS so app has a chance to note HTMLmedia.seeking attribute is 'true'
I couldn't reproduce the issue with a video (video only, no audio) on wpe-2.38 on RPI3 ( Approving and merging this PR. |
…ed#1232) 1) Call didPreroll() also for <video> elements that are audio-only 2) Make didPreroll() call async and put in onto HTML media element task queue to make sure it is executed after dispatching 'seeking' event to JS so app has a chance to note HTMLmedia.seeking attribute is 'true'
https://bugs.webkit.org/show_bug.cgi?id=295289 Reviewed by NOBODY (OOPS!). 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: WebPlatformForEmbedded/WPEWebKit#1232 WebPlatformForEmbedded/WPEWebKit#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 <[email protected]> * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek): Call didPreroll() asynchronously for any media element having only audio.
https://bugs.webkit.org/show_bug.cgi?id=295289 Reviewed by NOBODY (OOPS!). 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: WebPlatformForEmbedded/WPEWebKit#1232 WebPlatformForEmbedded/WPEWebKit#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 <[email protected]> * 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.
task queue to make sure it is executed after dispatching
'seeking' event to JS so app has a chance to note HTMLmedia.seeking
attribute is 'true'
With previous implementation the whole seek flow as executed in a single main loop cycle. As a result 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 attr will be true in such case that was not valid assumption.
This change fixes Spotify audio only playback seeking to buffered range on Amlogic platform that doesn't have async state changes in audio sync
The test case is to simply seek MSE audio only plaback to buffered range on proper platform and check if video.seeking attribute is ever "true"