Bug 159078 - Media elements should not lose playback controls when muted by a user gesture
Summary: Media elements should not lose playback controls when muted by a user gesture
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: 2016-06-23 17:56 PDT by Jer Noble
Modified: 2016-06-24 16:01 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.02 KB, patch)
2016-06-23 18:00 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (3.02 KB, patch)
2016-06-24 15:12 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 2016-06-23 17:56:14 PDT
Media elements should not lose playback controls when muted by a user gesture
Comment 1 Jer Noble 2016-06-23 17:59:19 PDT
<rdar://problem/26925904>
Comment 2 Jer Noble 2016-06-23 18:00:22 PDT
Created attachment 281949 [details]
Patch
Comment 3 Jon Lee 2016-06-24 00:56:37 PDT
Comment on attachment 281949 [details]
Patch

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

> Source/WebCore/html/MediaElementSession.cpp:239
> +    }

Is it ok to return true even if any of the conditions below in the "if (m_element.isVideo())" block would otherwise return false? Should both these checks happen after that block?
Comment 4 Jer Noble 2016-06-24 09:58:18 PDT
Comment on attachment 281949 [details]
Patch

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

>> Source/WebCore/html/MediaElementSession.cpp:239
>> +    }
> 
> Is it ok to return true even if any of the conditions below in the "if (m_element.isVideo())" block would otherwise return false? Should both these checks happen after that block?

We don't want to do the size check if we already have had a user gesture, which is why this was moved before.  The only case that changes here is that videos which are not in the DOM but are playing due to a user gesture will now show up in the DFR. So in that sense, it's the same as a playing <audio> element, and I think that's fine.
Comment 5 Jer Noble 2016-06-24 15:12:57 PDT
Created attachment 282018 [details]
Patch
Comment 6 WebKit Commit Bot 2016-06-24 16:01:24 PDT
Comment on attachment 282018 [details]
Patch

Clearing flags on attachment: 282018

Committed r202459: <http://trac.webkit.org/changeset/202459>
Comment 7 WebKit Commit Bot 2016-06-24 16:01:27 PDT
All reviewed patches have been landed.  Closing bug.