Bug 211797

Summary: [iOS] REGRESSION: (r261342) Play/pause button doesn't work upon first entering fullscreen mode
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eric.carlson, ews-watchlist, glenn, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
eric.carlson: review+
Patch for landing none

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].