Bug 144892 - [Mac] Refine media playback target client configuration
Summary: [Mac] Refine media playback target client configuration
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-05-11 18:19 PDT by Eric Carlson
Modified: 2015-05-12 09:44 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch. (22.13 KB, patch)
2015-05-11 18:52 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Updated patch. (22.19 KB, patch)
2015-05-11 19:18 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2015-05-11 18:19:05 PDT
Refine media playback target client configuration
Comment 1 Radar WebKit Bug Importer 2015-05-11 18:25:09 PDT
<rdar://problem/20909871>
Comment 2 Eric Carlson 2015-05-11 18:52:20 PDT
Created attachment 252921 [details]
Proposed patch.
Comment 3 Eric Carlson 2015-05-11 19:18:32 PDT
Created attachment 252923 [details]
Updated patch.
Comment 4 Brent Fulgham 2015-05-12 09:27:18 PDT
Comment on attachment 252923 [details]
Updated patch.

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

r=me. I had a couple of minor questions, but nothing that needs to be addressed before landing.

> Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp:37
> +static double taskDelayInterval = 1. / 10.;

Do we use this style of constant elsewhere? I thought we always said "1.0 / 10.0" (for example).

> Source/WebCore/html/HTMLMediaSession.cpp:389
> +        client().setShouldPlayToPlaybackTarget(true);

I'm just curious here -- did you encounter raciness with the m_shouldPlayToPlaybackTarget state? Because it seems like the original version should have worked.
Comment 5 Eric Carlson 2015-05-12 09:38:20 PDT
(In reply to comment #4)
> Comment on attachment 252923 [details]
> Updated patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=252923&action=review
> 
> r=me. I had a couple of minor questions, but nothing that needs to be
> addressed before landing.
> 
> > Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp:37
> > +static double taskDelayInterval = 1. / 10.;
> 
> Do we use this style of constant elsewhere? I thought we always said "1.0 /
> 10.0" (for example).
> 
Hmm, not sure what I was thinking.

> > Source/WebCore/html/HTMLMediaSession.cpp:389
> > +        client().setShouldPlayToPlaybackTarget(true);
> 
> I'm just curious here -- did you encounter raciness with the
> m_shouldPlayToPlaybackTarget state? Because it seems like the original
> version should have worked.

It worked, but the "if (m_shouldPlayToPlaybackTarget)" above means we actually always call "client().setShouldPlayToPlaybackTarget(true)" so I just made it explicit.

Thanks!
Comment 6 Eric Carlson 2015-05-12 09:43:54 PDT
Committed r184204: https://trac.webkit.org/r184204