Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Issue 2075563003: [Android, Media] Don't unlock MediaStream elements; instead allow MS to autoplay without a gesture. (Closed)

Created:
4 years, 6 months ago by whywhat
Modified:
4 years, 5 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, mlamouri+watch-blink_chromium.org, nessy, vcarbune.chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixes the issue when the media element could be assigned a MediaStream object and then a src= URL that would autoplay as the element was unlocked for MediaStream. BUG=620319 TEST=manual + a layout test Committed: https://crrev.com/49e3b076201542b38774c2137e097f52ea15110f Cr-Commit-Position: refs/heads/master@{#402777}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Changed the implementation to the suggested one #

Patch Set 3 : Added a null check for m_currentSrc. #

Patch Set 4 : Changed the test to not use getUserMedia #

Total comments: 2

Patch Set 5 : Whitespace changes #

Total comments: 4

Patch Set 6 : Shuffled the logic for MediaSource in load resource a bit #

Total comments: 13

Patch Set 7 : Addressed follow up comments #

Patch Set 8 : Fixed media source test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -22 lines) Patch
A third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 6 7 5 chunks +11 lines, -22 lines 0 comments Download

Messages

Total messages: 61 (22 generated)
whywhat
PTaL
4 years, 6 months ago (2016-06-16 11:17:18 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2075563003/1
4 years, 6 months ago (2016-06-16 11:17:37 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-16 13:15:45 UTC) #6
foolip
Might it work to instead change HTMLMediaElement::isGestureNeededForPlayback to never require a user gesture for MediaStreams, ...
4 years, 6 months ago (2016-06-22 15:25:56 UTC) #9
mlamouri (slow - plz ping)
So I was thinking of a similar solution. We should always autoplay if srcObject is ...
4 years, 6 months ago (2016-06-22 15:48:31 UTC) #10
foolip
On 2016/06/22 15:48:31, Mounir Lamouri (slow) wrote: > So I was thinking of a similar ...
4 years, 6 months ago (2016-06-22 16:08:14 UTC) #11
whywhat
Changed the implementation to the suggested one
4 years, 6 months ago (2016-06-24 19:10:16 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2075563003/20001
4 years, 6 months ago (2016-06-24 19:12:23 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/93556)
4 years, 6 months ago (2016-06-24 20:20:29 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2075563003/40001
4 years, 5 months ago (2016-06-26 19:44:46 UTC) #18
whywhat
Changed the test to not use getUserMedia
4 years, 5 months ago (2016-06-26 19:52:46 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2075563003/60001
4 years, 5 months ago (2016-06-26 19:55:20 UTC) #21
whywhat
PTAL
4 years, 5 months ago (2016-06-26 19:55:37 UTC) #22
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-26 22:21:27 UTC) #24
mlamouri (slow - plz ping)
lgtm. I would like foolip@ to have a look in case of there is obvious ...
4 years, 5 months ago (2016-06-27 12:28:09 UTC) #25
whywhat
Whitespace changes
4 years, 5 months ago (2016-06-27 14:02:14 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2075563003/80001
4 years, 5 months ago (2016-06-27 14:50:05 UTC) #28
whywhat
https://codereview.chromium.org/2075563003/diff/60001/third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html File third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html (right): https://codereview.chromium.org/2075563003/diff/60001/third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html#newcode12 third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html:12: async_test(function(t) { On 2016/06/27 at 12:28:09, Mounir Lamouri (slow) ...
4 years, 5 months ago (2016-06-27 14:50:16 UTC) #29
sof
https://codereview.chromium.org/2075563003/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2075563003/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1035 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1035: if (isStreamOrBlobUrl) { The logic looks a bit strange ...
4 years, 5 months ago (2016-06-27 15:10:47 UTC) #31
whywhat
https://codereview.chromium.org/2075563003/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2075563003/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1035 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1035: if (isStreamOrBlobUrl) { On 2016/06/27 at 15:10:47, sof wrote: ...
4 years, 5 months ago (2016-06-27 15:35:58 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-27 16:07:34 UTC) #34
sof
https://codereview.chromium.org/2075563003/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2075563003/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1035 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1035: if (isStreamOrBlobUrl) { On 2016/06/27 15:35:58, whywhat wrote: > ...
4 years, 5 months ago (2016-06-27 18:54:06 UTC) #35
whywhat
Shuffled the logic for MediaSource in load resource a bit
4 years, 5 months ago (2016-06-27 18:59:26 UTC) #36
whywhat
https://codereview.chromium.org/2075563003/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2075563003/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1035 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1035: if (isStreamOrBlobUrl) { On 2016/06/27 at 18:54:06, sof wrote: ...
4 years, 5 months ago (2016-06-27 19:00:50 UTC) #37
sof
https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1036 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1036: if (isStreamOrBlobUrl && !source.isMediaStream() && (!source.isURL() || !isMediaStreamURL(url.getString()))) { ...
4 years, 5 months ago (2016-06-27 19:28:48 UTC) #38
foolip
https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1034 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1034: // MediaSource is a blob URL that is not ...
4 years, 5 months ago (2016-06-28 15:28:51 UTC) #39
whywhat
Addressed follow up comments
4 years, 5 months ago (2016-06-28 16:07:07 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2075563003/120001
4 years, 5 months ago (2016-06-28 16:10:05 UTC) #43
whywhat
PTAL https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1034 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1034: // MediaSource is a blob URL that is ...
4 years, 5 months ago (2016-06-28 16:13:51 UTC) #44
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/253818)
4 years, 5 months ago (2016-06-28 17:34:50 UTC) #46
whywhat
Fixed media source test
4 years, 5 months ago (2016-06-28 18:03:42 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2075563003/140001
4 years, 5 months ago (2016-06-28 18:05:32 UTC) #49
whywhat
https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1034 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1034: // MediaSource is a blob URL that is not ...
4 years, 5 months ago (2016-06-28 18:06:34 UTC) #50
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/254064)
4 years, 5 months ago (2016-06-28 19:46:49 UTC) #52
foolip
Adding wolenetz@. Previous review around this was https://codereview.chromium.org/2049513002/ https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2075563003/diff/100001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1034 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1034: // ...
4 years, 5 months ago (2016-06-29 09:30:27 UTC) #54
foolip
As discussed briefly over chat, lgtm as-is to leave the MSE change as a follow-up. ...
4 years, 5 months ago (2016-06-29 10:06:59 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2075563003/140001
4 years, 5 months ago (2016-06-29 10:13:08 UTC) #58
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 5 months ago (2016-06-29 11:25:21 UTC) #59
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 11:26:36 UTC) #61
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/49e3b076201542b38774c2137e097f52ea15110f
Cr-Commit-Position: refs/heads/master@{#402777}

Powered by Google App Engine
This is Rietveld 408576698