Skip to content
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

Playback stops although the progress bar moves #7103

Merged
merged 1 commit into from Dec 6, 2022

Conversation

jyavenard
Copy link
Member

@jyavenard jyavenard commented Dec 2, 2022

384fb5b

Playback stops although the progress bar moves
https://bugs.webkit.org/show_bug.cgi?id=248585
rdar://102846199

Reviewed by Eric Carlson.

When playback has stalled due to insufficient data being buffered, the effective rate
should be 0 as time is no longer progressing.
While the GPU process would indicate that the rate has changed once the player has
stalled, the effective rate reported would remain the same causing the current time
position to continue moving as it's estimated based on the effective rate.

Fly-By fix: set the new rate in HTMLMediaElement if previously the requested rate
is different.

* LayoutTests/http/tests/media/video-play-stall.html: Update test to ensure currentTime doesn't progress
(WebCore::HTMLMediaElement::updatePlaybackRate):
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::updateStates):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::effectiveRate const):

Canonical link: https://commits.webkit.org/257403@main

4638b3e

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv   πŸ§ͺ mac-wk2
βœ… πŸ›  tv-sim   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  watch-sim

@jyavenard jyavenard self-assigned this Dec 2, 2022
@jyavenard jyavenard added the Media Bugs related to the HTML 5 Media elements. label Dec 2, 2022
Copy link
Contributor

@eric-carlson eric-carlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@jyavenard jyavenard added the merge-queue Applied to send a pull request to merge-queue label Dec 3, 2022
@webkit-commit-queue webkit-commit-queue added merging-blocked Applied to prevent a change from being merged and removed merge-queue Applied to send a pull request to merge-queue labels Dec 3, 2022
@jyavenard
Copy link
Member Author

Forgot to check-in the expectation changes :(

@jyavenard jyavenard removed the merging-blocked Applied to prevent a change from being merged label Dec 3, 2022
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Dec 4, 2022
@jyavenard jyavenard removed the merging-blocked Applied to prevent a change from being merged label Dec 6, 2022
@jyavenard jyavenard added the merge-queue Applied to send a pull request to merge-queue label Dec 6, 2022
https://bugs.webkit.org/show_bug.cgi?id=248585
rdar://102846199

Reviewed by Eric Carlson.

When playback has stalled due to insufficient data being buffered, the effective rate
should be 0 as time is no longer progressing.
While the GPU process would indicate that the rate has changed once the player has
stalled, the effective rate reported would remain the same causing the current time
position to continue moving as it's estimated based on the effective rate.

Fly-By fix: set the new rate in HTMLMediaElement if previously the requested rate
is different.

* LayoutTests/http/tests/media/video-play-stall.html: Update test to ensure currentTime doesn't progress
(WebCore::HTMLMediaElement::updatePlaybackRate):
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::updateStates):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::effectiveRate const):

Canonical link: https://commits.webkit.org/257403@main
@webkit-commit-queue
Copy link
Collaborator

Committed 257403@main (384fb5b): https://commits.webkit.org/257403@main

Reviewed commits have been landed. Closing PR #7103 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit 384fb5b into WebKit:main Dec 6, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
5 participants