Bug 211797 - [iOS] REGRESSION: (r261342) Play/pause button doesn't work upon first entering fullscreen mode
Summary: [iOS] REGRESSION: (r261342) Play/pause button doesn't work upon first enterin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-12 13:03 PDT by Jer Noble
Modified: 2020-05-12 17:02 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.32 KB, patch)
2020-05-12 13:11 PDT, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (3.96 KB, patch)
2020-05-12 13:44 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2020-05-12 13:03:56 PDT
[iOS] Play/pause button doesn't work upon first entering fullscreen mode
Comment 1 Jer Noble 2020-05-12 13:06:30 PDT
<rdar://problem/63118008>
Comment 2 Jer Noble 2020-05-12 13:11:33 PDT
Created attachment 399158 [details]
Patch
Comment 3 Darin Adler 2020-05-12 13:13:50 PDT
Comment on attachment 399158 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399158&action=review

> Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm:147
> +        float playbackRate = isStalled() ? 0.000001 : this->playbackRate();

A magic number like this needs a "why" comment. Unless people working on media would immediately understand why this value is correct, and it’s just lack of expertise?
Comment 4 Jer Noble 2020-05-12 13:33:51 PDT
(In reply to Darin Adler from comment #3)
> Comment on attachment 399158 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=399158&action=review
> 
> > Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm:147
> > +        float playbackRate = isStalled() ? 0.000001 : this->playbackRate();
> 
> A magic number like this needs a "why" comment. Unless people working on
> media would immediately understand why this value is correct, and it’s just
> lack of expertise?

Hah, sure. You're right that it's an arbitrary magic number, picked so that even if your stall lasted two weeks, the scrubber would only move forward a second or so.  But yes, I'll move that magic number to a static constant and add a comment before landing.
Comment 5 Jer Noble 2020-05-12 13:44:17 PDT
Created attachment 399169 [details]
Patch for landing
Comment 6 EWS 2020-05-12 17:02:31 PDT
Committed r261587: <https://trac.webkit.org/changeset/261587>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399169 [details].