Commit 2e274a5c authored by Jazz Xu's avatar Jazz Xu Committed by Commit Bot

[Media Controls] Record user metric action for click-anywhere to play/pause

Bug: 896255
Change-Id: I12f394272b9bec2f11ccfaf850ef03fffa8e484c
Reviewed-on: https://chromium-review.googlesource.com/c/1313560Reviewed-by: default avatarTommy Steimel <steimel@chromium.org>
Reviewed-by: default avatarJesse Doherty <jwd@chromium.org>
Commit-Queue: Jazz Xu <jazzhsu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604993}
parent feacccd2
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "third_party/blink/renderer/modules/media_controls/media_controls_impl.h" #include "third_party/blink/renderer/modules/media_controls/media_controls_impl.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h" #include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_size.h" #include "third_party/blink/public/platform/web_size.h"
#include "third_party/blink/renderer/bindings/core/v8/string_or_trusted_html.h" #include "third_party/blink/renderer/bindings/core/v8/string_or_trusted_html.h"
...@@ -1646,11 +1647,13 @@ void MediaControlsImpl::TapTimerFired(TimerBase*) { ...@@ -1646,11 +1647,13 @@ void MediaControlsImpl::TapTimerFired(TimerBase*) {
// and there's nothing to do), or the user is playing by click (in which // and there's nothing to do), or the user is playing by click (in which
// case we need to start playing). // case we need to start playing).
if (is_paused_for_double_tap_) { if (is_paused_for_double_tap_) {
// TODO(https://crbug.com/896255): Add and record useraction. Platform::Current()->RecordAction(
UserMetricsAction("Media.Controls.ClickAnywhereToPause"));
// TODO(https://crbug.com/896252): Show overlay pause animation. // TODO(https://crbug.com/896252): Show overlay pause animation.
is_paused_for_double_tap_ = false; is_paused_for_double_tap_ = false;
} else { } else {
// TODO(https://crbug.com/896255): Add and record useraction. Platform::Current()->RecordAction(
UserMetricsAction("Media.Controls.ClickAnywhereToPlay"));
// TODO(https://crbug.com/896252): Show overlay play animation. // TODO(https://crbug.com/896252): Show overlay play animation.
MediaElement().Play(); MediaElement().Play();
} }
......
...@@ -10135,6 +10135,20 @@ should be able to be added at any place in this file. ...@@ -10135,6 +10135,20 @@ should be able to be added at any place in this file.
<description>The user clicked on the cast overlay button.</description> <description>The user clicked on the cast overlay button.</description>
</action> </action>
<action name="Media.Controls.ClickAnywhereToPause">
<owner>jazzhsu@chromium.org</owner>
<description>
The user clicked anywhere in the video frame to pause.
</description>
</action>
<action name="Media.Controls.ClickAnywhereToPlay">
<owner>jazzhsu@chromium.org</owner>
<description>
The user clicked anywhere in the video frame to play.
</description>
</action>
<action name="Media.Controls.ClosedCaptionHide"> <action name="Media.Controls.ClosedCaptionHide">
<owner>mlamouri@chromium.org</owner> <owner>mlamouri@chromium.org</owner>
<description>The user hid the closed caption from the controls.</description> <description>The user hid the closed caption from the controls.</description>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment