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

Issue 1470153004: Autoplay experiment metric fixes and additions. (Closed)

Created:
5 years ago by liberato (no reviews please)
Modified:
4 years, 8 months ago
CC:
mlamouri (slow - plz ping), blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, oilpan-reviews, nessy, vcarbune.chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Autoplay experiment metric fixes and additions. This CL fixes the following issues in the autoplay experiment: - "Any media playback" wasn't checking if the media was playing already, so it over-counted quite a bit. - "ifmuted" counting was broken, since the autoplay experiment didn't call autoplayMediaEncountered in all cases. For mute, this could actually allow the media to start playback without preventing additional autoplay metrics for the next playback. - made shouldAutoplay not call autoplayMediaEncountered, since the experiment might not have overridden the gesture requirement yet. This would generate incorrect metrics in SetReadyState. - Adds a metric for "played to completion". - Adds metrics for initial playback that capture whether any user gesture was seen, and / or if one is active curently. This will give us an idea about how often a gesture in the inital load() call is responsible for a playback. - Added counters for "total media elements seen" and "total video elements seen". BUG=561098 Committed: https://crrev.com/af2a826c3fa40d5e7e7895e860aa059ddab80b20 Cr-Commit-Position: refs/heads/master@{#383830}

Patch Set 1 #

Patch Set 2 : added histograms.xml . #

Total comments: 28

Patch Set 3 : cl feedback. #

Total comments: 19

Patch Set 4 : refactored lots of autoplay metrics into AutoplayExperimentHelper #

Patch Set 5 : cl feedback #

Total comments: 8

Patch Set 6 : refactored, unit tests #

Patch Set 7 : EXPECT_EQ => EXPECT_TRUE/FALSE for some compilation issues. #

Patch Set 8 : added CORE_EXPORT. #

Patch Set 9 : removed unneeded const qualifier to try to make msvc happy. #

Patch Set 10 : rebased. #

Total comments: 70

Patch Set 11 : cl feedback. #

Patch Set 12 : removed reference for oilpan. #

Patch Set 13 : yet more oilpan. #

Patch Set 14 : yet more oilpan] #

Total comments: 2

Patch Set 15 : rawptrwillbeuntracedmember #

Patch Set 16 : moved using directives in test. #

Patch Set 17 : stopped using all of namespace testing. #

Patch Set 18 : skipping using directive entirely like some other blink gmock tests.... #

Patch Set 19 : back to using some of ::testing, since it works. #

Total comments: 28

Patch Set 20 : moved AutoplayExperimentHelper and client to the oilpan heap. #

Patch Set 21 : OwnPtrWillBeMember => Persistent in the test. #

Patch Set 22 : fixed trace. #

Total comments: 2

Patch Set 23 : moved RecordMetricsBehavior back into HTMLMediaElement #

Total comments: 9

Patch Set 24 : cl feedback. #

Patch Set 25 : updated AutoplayClient::paused to replace media player state #

Patch Set 26 : fixes for non-oilpan #

Patch Set 27 : removed asymmetry between play and pause metrics #

Patch Set 28 : more oilpan. #

Total comments: 3

Patch Set 29 : fix tests #

Patch Set 30 : ...yet more test fixes for things that compile locally. #

Patch Set 31 : comments. #

Patch Set 32 : simplified paused logic #

Total comments: 1

Patch Set 33 : rebased. #

Patch Set 34 : simplified ended() logic. #

Patch Set 35 : ...because tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+916 lines, -197 lines) Patch
M third_party/WebKit/LayoutTests/media/video-autoplay-experiment-just-once.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +26 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 9 chunks +127 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 16 chunks +184 lines, -66 lines 0 comments Download
A third_party/WebKit/Source/core/html/AutoplayExperimentTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +436 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 6 chunks +10 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 26 chunks +124 lines, -93 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +8 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 58 (14 generated)
liberato (no reviews please)
more fun with autoplay! minor fixes, plus a few additional metrics coming from the first ...
5 years ago (2015-11-24 22:49:07 UTC) #3
philipj_slow
Many questions :) https://codereview.chromium.org/1470153004/diff/20001/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h File third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h (right): https://codereview.chromium.org/1470153004/diff/20001/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h#newcode73 third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h:73: // User gesture was bypassed,and playback ...
5 years ago (2015-11-25 14:03:42 UTC) #4
liberato (no reviews please)
thanks for the feedback. please notice the playInternal change, which should probably be a separate ...
5 years ago (2015-11-25 18:58:54 UTC) #5
mlamouri (slow - plz ping)
Maybe you should tests the histograms to make sure the basic scenarios are actually working ...
5 years ago (2015-11-26 11:44:32 UTC) #7
philipj_slow
https://codereview.chromium.org/1470153004/diff/40001/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h File third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h (right): https://codereview.chromium.org/1470153004/diff/40001/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h#newcode68 third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h:68: // Number of audio elements detected. Clarify that this ...
5 years ago (2015-11-26 15:30:56 UTC) #8
liberato (no reviews please)
i need to do more testing on this, so an in-depth review might not be ...
5 years ago (2015-12-02 00:58:09 UTC) #9
philipj_slow
I've mostly skimmed the split between HTMLMediaElement and the AutoplayExperimentHelper, and it's going in precisely ...
5 years ago (2015-12-02 09:01:46 UTC) #10
mlamouri (slow - plz ping)
On 2015/12/02 at 09:01:46, philipj wrote: > I've mostly skimmed the split between HTMLMediaElement and ...
5 years ago (2015-12-02 10:26:31 UTC) #11
philipj_slow
On 2015/12/02 10:26:31, Mounir Lamouri wrote: > On 2015/12/02 at 09:01:46, philipj wrote: > > ...
5 years ago (2015-12-02 12:25:48 UTC) #12
mlamouri (slow - plz ping)
On 2015/12/02 at 12:25:48, philipj wrote: > On 2015/12/02 10:26:31, Mounir Lamouri wrote: > > ...
5 years ago (2015-12-07 17:52:05 UTC) #13
philipj_slow
On 2015/12/07 17:52:05, Mounir Lamouri wrote: > On 2015/12/02 at 12:25:48, philipj wrote: > > ...
5 years ago (2015-12-08 10:52:36 UTC) #14
liberato (no reviews please)
sorry for the delay. for unit tests, i opted to create a client interface for ...
4 years, 11 months ago (2015-12-30 16:58:24 UTC) #15
liberato (no reviews please)
isherman: PTAL at histograms.xml thanks -fl
4 years, 11 months ago (2016-01-11 22:28:39 UTC) #17
Ilya Sherman
histograms.xml lgtm
4 years, 11 months ago (2016-01-11 23:16:57 UTC) #18
philipj_slow
Happy new year! I skimmed the second half of the unit tests, if someone wants ...
4 years, 11 months ago (2016-01-12 15:12:18 UTC) #19
philipj_slow
Happy new year! I skimmed the second half of the unit tests, if someone wants ...
4 years, 11 months ago (2016-01-12 15:12:19 UTC) #20
liberato (no reviews please)
i finally got back to this. i'm still trying to make oilpan happy, but i ...
4 years, 10 months ago (2016-01-29 08:25:25 UTC) #21
philipj_slow
https://codereview.chromium.org/1470153004/diff/180001/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp File third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp (right): https://codereview.chromium.org/1470153004/diff/180001/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp#newcode97 third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp:97: m_playbackStartedBefore = true; On 2016/01/29 08:25:24, liberato wrote: > ...
4 years, 10 months ago (2016-02-02 08:08:15 UTC) #22
philipj_slow
Oilpan reviewers, can you advise on the situation in AutoplayExperimentHelper.h and HTMLMediaElement.h? This started out ...
4 years, 10 months ago (2016-02-02 08:24:01 UTC) #23
liberato (no reviews please)
@philipj: i believe that RawPtrWillBeUntracedMember is what we want for the oilpan problem. i found ...
4 years, 10 months ago (2016-02-16 07:59:42 UTC) #25
sof
> @philipj: i believe that RawPtrWillBeUntracedMember is what we want for the oilpan problem. i ...
4 years, 10 months ago (2016-02-16 08:40:06 UTC) #27
philipj_slow
On 2016/02/16 07:59:42, liberato wrote: > @philipj: i believe that RawPtrWillBeUntracedMember is what we want ...
4 years, 10 months ago (2016-02-16 09:41:37 UTC) #28
liberato (no reviews please)
@sof: thanks for the detailed feedback. it looks like things are being cleaned up properly ...
4 years, 10 months ago (2016-02-24 18:44:06 UTC) #29
philipj_slow
https://codereview.chromium.org/1470153004/diff/440001/third_party/WebKit/Source/core/html/HTMLMediaElement.h File third_party/WebKit/Source/core/html/HTMLMediaElement.h (left): https://codereview.chromium.org/1470153004/diff/440001/third_party/WebKit/Source/core/html/HTMLMediaElement.h#oldcode71 third_party/WebKit/Source/core/html/HTMLMediaElement.h:71: enum class RecordMetricsBehavior { Given that's it's used for ...
4 years, 10 months ago (2016-02-25 10:53:49 UTC) #30
liberato (no reviews please)
thanks -fl https://codereview.chromium.org/1470153004/diff/440001/third_party/WebKit/Source/core/html/HTMLMediaElement.h File third_party/WebKit/Source/core/html/HTMLMediaElement.h (left): https://codereview.chromium.org/1470153004/diff/440001/third_party/WebKit/Source/core/html/HTMLMediaElement.h#oldcode71 third_party/WebKit/Source/core/html/HTMLMediaElement.h:71: enum class RecordMetricsBehavior { On 2016/02/25 10:53:49, ...
4 years, 10 months ago (2016-02-25 15:30:31 UTC) #31
philipj_slow
I haven't done another full (or even partial) pass but this now LGTM assuming no ...
4 years, 10 months ago (2016-02-25 15:36:20 UTC) #32
sof
thanks for carefully following up - oilpan lgtm. https://codereview.chromium.org/1470153004/diff/460001/third_party/WebKit/Source/core/html/AutoplayExperimentTest.cpp File third_party/WebKit/Source/core/html/AutoplayExperimentTest.cpp (right): https://codereview.chromium.org/1470153004/diff/460001/third_party/WebKit/Source/core/html/AutoplayExperimentTest.cpp#newcode1 third_party/WebKit/Source/core/html/AutoplayExperimentTest.cpp:1: // ...
4 years, 10 months ago (2016-02-25 18:55:44 UTC) #33
liberato (no reviews please)
thanks for the feedback everybody. philipj: the most recent CL requires that the web media ...
4 years, 9 months ago (2016-03-14 17:09:13 UTC) #34
philipj_slow
On 2016/03/14 17:09:13, liberato wrote: > thanks for the feedback everybody. > > philipj: the ...
4 years, 9 months ago (2016-03-15 08:13:03 UTC) #35
liberato (no reviews please)
https://codereview.chromium.org/1470153004/diff/560001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1470153004/diff/560001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode276 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:276: &&!m_element->webMediaPlayer()->paused(); here. sorry, i forgot that i rebased somewhere ...
4 years, 9 months ago (2016-03-15 14:10:49 UTC) #36
mlamouri (slow - plz ping)
(Moving myself to CC. Let me know if I was expected to review something here.)
4 years, 9 months ago (2016-03-16 11:30:08 UTC) #37
philipj_slow
https://codereview.chromium.org/1470153004/diff/560001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1470153004/diff/560001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode276 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:276: &&!m_element->webMediaPlayer()->paused(); On 2016/03/15 14:10:49, liberato wrote: > here. sorry, ...
4 years, 9 months ago (2016-03-16 11:37:43 UTC) #39
liberato (no reviews please)
thanks -fl https://codereview.chromium.org/1470153004/diff/560001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1470153004/diff/560001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode276 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:276: &&!m_element->webMediaPlayer()->paused(); On 2016/03/16 11:37:43, philipj_UTC7 wrote: > ...
4 years, 9 months ago (2016-03-16 14:59:58 UTC) #40
liberato (no reviews please)
turns out that it was easy to move pause metrics reporting into updatePlayState. also fixed ...
4 years, 9 months ago (2016-03-16 17:55:04 UTC) #41
philipj_slow
Just to double check, is this waiting for input from anyone? Me?
4 years, 9 months ago (2016-03-24 10:32:38 UTC) #42
liberato (no reviews please)
thanks for reminding me. do you have any objection to the simplified pause logic in ...
4 years, 9 months ago (2016-03-24 14:25:13 UTC) #43
philipj_slow
https://codereview.chromium.org/1470153004/diff/640001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1470153004/diff/640001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode288 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:288: bool complete() const override Can this simply use HTMLMediaElement::ended()? ...
4 years, 8 months ago (2016-03-29 06:21:09 UTC) #44
liberato (no reviews please)
On 2016/03/29 06:21:09, philipj_UTC7 wrote: > https://codereview.chromium.org/1470153004/diff/640001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp > File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): > > https://codereview.chromium.org/1470153004/diff/640001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode288 > ...
4 years, 8 months ago (2016-03-29 06:44:20 UTC) #45
philipj_slow
On 2016/03/29 06:44:20, liberato wrote: > On 2016/03/29 06:21:09, philipj_UTC7 wrote: > > > https://codereview.chromium.org/1470153004/diff/640001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ...
4 years, 8 months ago (2016-03-29 08:11:35 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1470153004/680001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1470153004/680001
4 years, 8 months ago (2016-03-29 18:55:55 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_oilpan_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_blink_oilpan_rel/builds/22852)
4 years, 8 months ago (2016-03-29 19:09:25 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1470153004/700001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1470153004/700001
4 years, 8 months ago (2016-03-29 20:02:25 UTC) #54
commit-bot: I haz the power
Committed patchset #35 (id:700001)
4 years, 8 months ago (2016-03-29 21:26:50 UTC) #56
commit-bot: I haz the power
4 years, 8 months ago (2016-03-29 21:27:46 UTC) #58
Message was sent while issue was closed.
Patchset 35 (id:??) landed as
https://crrev.com/af2a826c3fa40d5e7e7895e860aa059ddab80b20
Cr-Commit-Position: refs/heads/master@{#383830}

Powered by Google App Engine
This is Rietveld 408576698