For #15368 - Adds telemetry for fullscreen, pip (#16833)

upstream-sync
Codrut Topliceanu 4 years ago committed by GitHub
parent 01db5160ee
commit d0b09b7d69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2932,6 +2932,32 @@ media_state:
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
fullscreen:
type: event
description: |
Video set to fullscreen.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/15368
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/16833
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
picture_in_picture:
type: event
description: |
Video set to picture in picture mode.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/15368
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/16833
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
logins:
open_logins:

@ -1185,6 +1185,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler,
}
final override fun onPictureInPictureModeChanged(enabled: Boolean) {
if (enabled) requireComponents.analytics.metrics.track(Event.MediaPictureInPictureState)
pipFeature?.onPictureInPictureModeChanged(enabled)
}
@ -1217,6 +1218,8 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler,
browserToolbarView.expand()
// Without this, fullscreen has a margin at the top.
engineView.setVerticalClipping(0)
requireComponents.analytics.metrics.track(Event.MediaFullscreenState)
} else {
activity?.exitImmersiveModeIfNeeded()
(activity as? HomeActivity)?.let { activity ->

@ -106,6 +106,8 @@ sealed class Event {
object MediaPlayState : Event()
object MediaPauseState : Event()
object MediaStopState : Event()
object MediaFullscreenState : Event()
object MediaPictureInPictureState : Event()
object InAppNotificationDownloadOpen : Event()
object InAppNotificationDownloadTryAgain : Event()
object NotificationDownloadCancel : Event()

@ -404,6 +404,12 @@ private val Event.wrapper: EventWrapper<*>?
is Event.MediaStopState -> EventWrapper<NoExtraKeys>(
{ MediaState.stop.record(it) }
)
is Event.MediaFullscreenState -> EventWrapper<NoExtraKeys>(
{ MediaState.fullscreen.record(it) }
)
is Event.MediaPictureInPictureState -> EventWrapper<NoExtraKeys>(
{ MediaState.pictureInPicture.record(it) }
)
is Event.InAppNotificationDownloadOpen -> EventWrapper<NoExtraKeys>(
{ DownloadNotification.inAppOpen.record(it) }
)

@ -134,7 +134,9 @@ The following metrics are added to the ping:
| master_password.migration |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Logins were successfully migrated using a master password. |[1](https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534)||2021-03-01 |2 |
| 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), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| 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), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| media_state.fullscreen |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Video set to fullscreen. |[1](https://github.com/mozilla-mobile/fenix/issues/15368)||2021-08-01 |2 |
| 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), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| media_state.picture_in_picture |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Video set to picture in picture mode. |[1](https://github.com/mozilla-mobile/fenix/issues/15368)||2021-08-01 |2 |
| 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), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| 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), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| onboarding.finish |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The user taps starts browsing and ends the onboarding experience. |[1](https://github.com/mozilla-mobile/fenix/pull/11867), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |

Loading…
Cancel
Save