Bug 138522 - [iOS] video is sometimes allowed to play from the background
Summary: [iOS] video is sometimes allowed to play from the background
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: 2014-11-07 14:52 PST by Eric Carlson
Modified: 2014-11-11 15:12 PST (History)
9 users (show)

See Also:


Attachments
Proposed patch. (6.62 KB, patch)
2014-11-07 15:20 PST, Eric Carlson
jer.noble: review+
Details | Formatted Diff | Diff
Revised patch (7.03 KB, patch)
2014-11-07 18:39 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Updated patch (6.99 KB, patch)
2014-11-08 06:29 PST, Eric Carlson
jer.noble: review+
Details | Formatted Diff | Diff
Patch for landing. (6.96 KB, patch)
2014-11-08 07:52 PST, 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 2014-11-07 14:52:26 PST
Allow video to play when Safari is in the background in some situations.
Comment 1 Eric Carlson 2014-11-07 14:54:07 PST
<rdar://problem/18878671>
Comment 2 Eric Carlson 2014-11-07 15:20:57 PST
Created attachment 241213 [details]
Proposed patch.
Comment 3 Jer Noble 2014-11-07 15:28:48 PST
Comment on attachment 241213 [details]
Proposed patch.

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

> Source/WebCore/ChangeLog:8
> +        Reviewed by NOBODY (OOPS!).
> +
> +        * html/HTMLMediaElement.cpp:

What is actually broken and why does this patch fix it?

> Source/WebCore/platform/audio/MediaSession.cpp:-192
> -    if (m_clientDataBufferingTimer.isActive())
> -        m_clientDataBufferingTimer.stop();
> -

Perhaps an ASSERT(!m_clientDataBufferingTimer.isActive()) ?
Comment 4 Eric Carlson 2014-11-07 18:39:34 PST
Created attachment 241223 [details]
Revised patch
Comment 5 WebKit Commit Bot 2014-11-07 18:40:42 PST
Attachment 241223 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Eric Carlson 2014-11-08 06:29:38 PST
Created attachment 241228 [details]
Updated patch
Comment 7 Jer Noble 2014-11-08 07:44:06 PST
Comment on attachment 241228 [details]
Updated patch

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

R=me with minor nits.

> Source/WebCore/html/HTMLMediaElement.cpp:5988
> +    ASSERT_NOT_REACHED();

This could be a "default:" case.

> Source/WebCore/platform/audio/MediaSession.h:108
> +        Optimized

Nit: a comma here would make future duffs nicer.
Comment 8 Eric Carlson 2014-11-08 07:52:23 PST
Created attachment 241229 [details]
Patch for landing.
Comment 9 Eric Carlson 2014-11-08 09:18:31 PST
Committed r175777: https://trac.webkit.org/r175777
Comment 10 Eric Carlson 2014-11-11 15:12:10 PST
Committed https://trac.webkit.org/r175981 as a follow up.