Bug 172541 - System sleeps while playing to wireless target, ending stream.
Summary: System sleeps while playing to wireless target, ending stream.
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: 2017-05-24 08:30 PDT by Jer Noble
Modified: 2017-05-30 20:24 PDT (History)
3 users (show)

See Also:


Attachments
Patch (27.82 KB, patch)
2017-05-24 08:41 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (27.82 KB, patch)
2017-05-24 09:54 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (27.95 KB, patch)
2017-05-24 10:09 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (28.63 KB, patch)
2017-05-24 11:05 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (28.69 KB, patch)
2017-05-24 11:11 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 2017-05-24 08:30:42 PDT
System sleeps while playing to wireless target, ending stream.
Comment 1 Jer Noble 2017-05-24 08:41:37 PDT
Created attachment 311121 [details]
Patch
Comment 2 Jer Noble 2017-05-24 09:54:38 PDT
Created attachment 311123 [details]
Patch
Comment 3 Jer Noble 2017-05-24 10:09:07 PDT
Created attachment 311126 [details]
Patch
Comment 4 Jer Noble 2017-05-24 11:05:53 PDT
Created attachment 311134 [details]
Patch
Comment 5 Jer Noble 2017-05-24 11:11:59 PDT
Created attachment 311136 [details]
Patch
Comment 6 Eric Carlson 2017-05-24 14:04:58 PDT
Comment on attachment 311136 [details]
Patch

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

> Source/WebCore/ChangeLog:14
> +        one that is playing but not visible, and one that is playing remotely.

Nit: "one that is" => "and one that is"

> Source/WebCore/html/HTMLMediaElement.cpp:6356
> +            m_sleepDisabler = SleepDisabler::create("com.apple.WebCore: HTMLMediaElement playback", type);

Nit: it may help debugging later if the type is in the name string.

> Source/WebCore/html/HTMLMediaElement.cpp:6360
> +        m_player->setShouldDisableSleep(shouldDisableSleep == SleepType::Display);

Nit: setShouldDisableSleep should probably be renamed to something like setShouldDisableDisplaySleep
Comment 7 Jer Noble 2017-05-25 13:03:31 PDT
(In reply to Eric Carlson from comment #6)
> Comment on attachment 311136 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=311136&action=review
> 
> > Source/WebCore/ChangeLog:14
> > +        one that is playing but not visible, and one that is playing remotely.
> 
> Nit: "one that is" => "and one that is"

?

> > Source/WebCore/html/HTMLMediaElement.cpp:6356
> > +            m_sleepDisabler = SleepDisabler::create("com.apple.WebCore: HTMLMediaElement playback", type);
> 
> Nit: it may help debugging later if the type is in the name string.

In `pmset -g assertions` it displays the type immediately before the string passed in here, which is why I didn't add it to the string itself. If we add logging for sleep assertions, we can just add the type to the log string itself.

> > Source/WebCore/html/HTMLMediaElement.cpp:6360
> > +        m_player->setShouldDisableSleep(shouldDisableSleep == SleepType::Display);
> 
> Nit: setShouldDisableSleep should probably be renamed to something like
> setShouldDisableDisplaySleep

Ok, but I'd prefer to do that in a future patch (it'll touch a lot of files).
Comment 8 WebKit Commit Bot 2017-05-25 14:05:29 PDT
Comment on attachment 311136 [details]
Patch

Clearing flags on attachment: 311136

Committed r217447: <http://trac.webkit.org/changeset/217447>
Comment 9 WebKit Commit Bot 2017-05-25 14:05:31 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2017-05-30 20:24:01 PDT
<rdar://problem/32479770>