Bug 146733

Summary: [Mac] Two clicks required to enable AirPlay at youtube.com
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch. none

Description Eric Carlson 2015-07-08 11:13:28 PDT
Some videos at youtube.com don't switch to AirPlay the first time a route is chosen.
Comment 1 Eric Carlson 2015-07-08 11:13:58 PDT
<rdar://problem/21556356>
Comment 2 Eric Carlson 2015-07-08 11:33:46 PDT
Created attachment 256390 [details]
Proposed patch.
Comment 3 Brent Fulgham 2015-07-08 11:41:37 PDT
Comment on attachment 256390 [details]
Proposed patch.

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

r=me. I had a couple of questions about the m_targetChanged flag.

> Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp:203
>      // Do not take the target if another client has it and the client reporting a state change is not playing.

You should revise this comment to match the code below (or get rid of it?)

> Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp:283
> +            state->requestedPicker = false;

Do we ever need to reset the 'm_targetChanged' state? WebMediaSessionManager exists for the life of the process, right? So does that mean future changes to target won't work right?
Comment 4 Eric Carlson 2015-07-08 11:56:01 PDT
(In reply to comment #3)
> Comment on attachment 256390 [details]
> Proposed patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=256390&action=review
> 
> r=me. I had a couple of questions about the m_targetChanged flag.
> 
> > Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp:203
> >      // Do not take the target if another client has it and the client reporting a state change is not playing.
> 
> You should revise this comment to match the code below (or get rid of it?)
> 
Removed.

> > Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp:283
> > +            state->requestedPicker = false;
> 
> Do we ever need to reset the 'm_targetChanged' state? WebMediaSessionManager
> exists for the life of the process, right? So does that mean future changes
> to target won't work right?
>
Good point, fixed.

Thanks!
Comment 5 Eric Carlson 2015-07-08 11:56:22 PDT
Committed r186519: https://trac.webkit.org/r186519