parent
9d5c03c067
commit
ebdfe8184e
|
@ -1446,6 +1446,41 @@ media_notification:
|
||||||
- fenix-core@mozilla.com
|
- fenix-core@mozilla.com
|
||||||
expires: "2020-03-01"
|
expires: "2020-03-01"
|
||||||
|
|
||||||
|
media_state:
|
||||||
|
play:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
Media started playing.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/5705
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/6463
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-03-01"
|
||||||
|
pause:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
Media playback was paused.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/5705
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/6463
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-03-01"
|
||||||
|
stop:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
Media playback has ended.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/5705
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/6463
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-03-01"
|
||||||
|
|
||||||
logins:
|
logins:
|
||||||
open_logins:
|
open_logins:
|
||||||
type: event
|
type: event
|
||||||
|
|
|
@ -27,6 +27,7 @@ import org.mozilla.fenix.GleanMetrics.History
|
||||||
import org.mozilla.fenix.GleanMetrics.Library
|
import org.mozilla.fenix.GleanMetrics.Library
|
||||||
import org.mozilla.fenix.GleanMetrics.Logins
|
import org.mozilla.fenix.GleanMetrics.Logins
|
||||||
import org.mozilla.fenix.GleanMetrics.MediaNotification
|
import org.mozilla.fenix.GleanMetrics.MediaNotification
|
||||||
|
import org.mozilla.fenix.GleanMetrics.MediaState
|
||||||
import org.mozilla.fenix.GleanMetrics.Metrics
|
import org.mozilla.fenix.GleanMetrics.Metrics
|
||||||
import org.mozilla.fenix.GleanMetrics.Pings
|
import org.mozilla.fenix.GleanMetrics.Pings
|
||||||
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingMode
|
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingMode
|
||||||
|
@ -373,6 +374,15 @@ private val Event.wrapper: EventWrapper<*>?
|
||||||
is Event.TabMediaPause -> EventWrapper<NoExtraKeys>(
|
is Event.TabMediaPause -> EventWrapper<NoExtraKeys>(
|
||||||
{ Tab.mediaPause.record(it) }
|
{ Tab.mediaPause.record(it) }
|
||||||
)
|
)
|
||||||
|
is Event.MediaPlayState -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ MediaState.play.record(it) }
|
||||||
|
)
|
||||||
|
is Event.MediaPauseState -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ MediaState.pause.record(it) }
|
||||||
|
)
|
||||||
|
is Event.MediaStopState -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ MediaState.stop.record(it) }
|
||||||
|
)
|
||||||
is Event.NotificationMediaPlay -> EventWrapper<NoExtraKeys>(
|
is Event.NotificationMediaPlay -> EventWrapper<NoExtraKeys>(
|
||||||
{ MediaNotification.play.record(it) }
|
{ MediaNotification.play.record(it) }
|
||||||
)
|
)
|
||||||
|
|
|
@ -11,6 +11,7 @@ import mozilla.components.browser.toolbar.facts.ToolbarFacts
|
||||||
import mozilla.components.feature.contextmenu.facts.ContextMenuFacts
|
import mozilla.components.feature.contextmenu.facts.ContextMenuFacts
|
||||||
import mozilla.components.feature.customtabs.CustomTabsFacts
|
import mozilla.components.feature.customtabs.CustomTabsFacts
|
||||||
import mozilla.components.feature.findinpage.facts.FindInPageFacts
|
import mozilla.components.feature.findinpage.facts.FindInPageFacts
|
||||||
|
import mozilla.components.feature.media.facts.MediaFacts
|
||||||
import mozilla.components.support.base.Component
|
import mozilla.components.support.base.Component
|
||||||
import mozilla.components.support.base.facts.Action
|
import mozilla.components.support.base.facts.Action
|
||||||
import mozilla.components.support.base.facts.Fact
|
import mozilla.components.support.base.facts.Fact
|
||||||
|
@ -113,6 +114,9 @@ sealed class Event {
|
||||||
object PrivateBrowsingStaticShortcutPrivateTab : Event()
|
object PrivateBrowsingStaticShortcutPrivateTab : Event()
|
||||||
object TabMediaPlay : Event()
|
object TabMediaPlay : Event()
|
||||||
object TabMediaPause : Event()
|
object TabMediaPause : Event()
|
||||||
|
object MediaPlayState : Event()
|
||||||
|
object MediaPauseState : Event()
|
||||||
|
object MediaStopState : Event()
|
||||||
object NotificationMediaPlay : Event()
|
object NotificationMediaPlay : Event()
|
||||||
object NotificationMediaPause : Event()
|
object NotificationMediaPause : Event()
|
||||||
object TrackingProtectionTrackerList : Event()
|
object TrackingProtectionTrackerList : Event()
|
||||||
|
@ -328,7 +332,7 @@ private fun Fact.toEvent(): Event? = when (Pair(component, item)) {
|
||||||
Component.FEATURE_CUSTOMTABS to CustomTabsFacts.Items.CLOSE -> Event.CustomTabsClosed
|
Component.FEATURE_CUSTOMTABS to CustomTabsFacts.Items.CLOSE -> Event.CustomTabsClosed
|
||||||
Component.FEATURE_CUSTOMTABS to CustomTabsFacts.Items.ACTION_BUTTON -> Event.CustomTabsActionTapped
|
Component.FEATURE_CUSTOMTABS to CustomTabsFacts.Items.ACTION_BUTTON -> Event.CustomTabsActionTapped
|
||||||
|
|
||||||
Component.FEATURE_MEDIA to "notification" -> {
|
Component.FEATURE_MEDIA to MediaFacts.Items.NOTIFICATION -> {
|
||||||
when (action) {
|
when (action) {
|
||||||
Action.PLAY -> {
|
Action.PLAY -> {
|
||||||
Event.NotificationMediaPlay
|
Event.NotificationMediaPlay
|
||||||
|
@ -339,6 +343,20 @@ private fun Fact.toEvent(): Event? = when (Pair(component, item)) {
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Component.FEATURE_MEDIA to MediaFacts.Items.STATE -> {
|
||||||
|
when (action) {
|
||||||
|
Action.PLAY -> {
|
||||||
|
Event.MediaPlayState
|
||||||
|
}
|
||||||
|
Action.PAUSE -> {
|
||||||
|
Event.MediaPauseState
|
||||||
|
}
|
||||||
|
Action.STOP -> {
|
||||||
|
Event.MediaStopState
|
||||||
|
}
|
||||||
|
else -> null
|
||||||
|
}
|
||||||
|
}
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,9 @@ The following metrics are added to the ping:
|
||||||
| logins.view_password_login |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user viewed a password in an individual saved login |[1](https://github.com/mozilla-mobile/fenix/pull/6352)||2020-03-01 |
|
| logins.view_password_login |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user viewed a password in an individual saved login |[1](https://github.com/mozilla-mobile/fenix/pull/6352)||2020-03-01 |
|
||||||
| media_notification.pause |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the pause icon on the media notification |[1](https://github.com/mozilla-mobile/fenix/pull/5520)||2020-03-01 |
|
| media_notification.pause |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the pause icon on the media notification |[1](https://github.com/mozilla-mobile/fenix/pull/5520)||2020-03-01 |
|
||||||
| media_notification.play |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the play icon on the media notification |[1](https://github.com/mozilla-mobile/fenix/pull/5520)||2020-03-01 |
|
| media_notification.play |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the play icon on the media notification |[1](https://github.com/mozilla-mobile/fenix/pull/5520)||2020-03-01 |
|
||||||
|
| media_state.pause |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media playback was paused. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-03-01 |
|
||||||
|
| media_state.play |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media started playing. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-03-01 |
|
||||||
|
| media_state.stop |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media playback has ended. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-03-01 |
|
||||||
| private_browsing_mode.garbage_icon |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the garbage can icon on the private browsing home page, deleting all private tabs. |[1](https://github.com/mozilla-mobile/fenix/pull/4968)||2020-03-01 |
|
| private_browsing_mode.garbage_icon |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the garbage can icon on the private browsing home page, deleting all private tabs. |[1](https://github.com/mozilla-mobile/fenix/pull/4968)||2020-03-01 |
|
||||||
| private_browsing_mode.notification_delete |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the private browsing mode notification's "Delete and Open" button. |[1](https://github.com/mozilla-mobile/fenix/pull/4968)||2020-03-01 |
|
| private_browsing_mode.notification_delete |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the private browsing mode notification's "Delete and Open" button. |[1](https://github.com/mozilla-mobile/fenix/pull/4968)||2020-03-01 |
|
||||||
| private_browsing_mode.notification_open |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the private browsing mode notification's "Open" button. |[1](https://github.com/mozilla-mobile/fenix/pull/4968)||2020-03-01 |
|
| private_browsing_mode.notification_open |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the private browsing mode notification's "Open" button. |[1](https://github.com/mozilla-mobile/fenix/pull/4968)||2020-03-01 |
|
||||||
|
|
Loading…
Reference in New Issue