Bug 1756703 - Add extra keys to pictureinpicture.create telemetry event. r=pip-reviewers,mconley,kpatenio

Differential Revision: https://phabricator.services.mozilla.com/D140252
This commit is contained in:
Niklas Baumgardner 2022-03-13 00:45:01 +00:00
Родитель 050ccade21
Коммит 63217c3efe
4 изменённых файлов: 24 добавлений и 8 удалений

Просмотреть файл

@ -157,6 +157,8 @@ class PictureInPictureLauncherChild extends JSWindowActorChild {
videoHeight: video.videoHeight,
videoWidth: video.videoWidth,
videoRef,
ccEnabled: DISPLAY_TEXT_TRACKS_PREF,
webVTTSubtitles: !!video.textTracks?.length,
});
}

Просмотреть файл

@ -362,7 +362,8 @@ var PictureInPicture = {
tab.addEventListener("TabSwapPictureInPicture", this);
win.setupPlayer(gNextWindowID.toString(), wgp, videoData.videoRef);
let pipId = gNextWindowID.toString();
win.setupPlayer(pipId, wgp, videoData.videoRef);
gNextWindowID++;
this.weakWinToBrowser.set(win, browser);
@ -372,6 +373,23 @@ var PictureInPicture = {
"media.videocontrols.picture-in-picture.video-toggle.has-used",
true
);
let args = {
width: win.innerWidth.toString(),
height: win.innerHeight.toString(),
screenX: win.screenX.toString(),
screenY: win.screenY.toString(),
ccEnabled: videoData.ccEnabled.toString(),
webVTTSubtitles: videoData.webVTTSubtitles.toString(),
};
Services.telemetry.recordEvent(
"pictureinpicture",
"create",
"player",
pipId,
args
);
},
/**

Просмотреть файл

@ -194,13 +194,6 @@ let Player = {
this.lastScreenX = window.screenX;
this.lastScreenY = window.screenY;
this.recordEvent("create", {
width: window.outerWidth.toString(),
height: window.outerHeight.toString(),
screenX: window.screenX.toString(),
screenY: window.screenY.toString(),
});
this.computeAndSetMinimumSize(window.outerWidth, window.outerHeight);
// alwaysontop windows are not focused by default, so we have to do it

Просмотреть файл

@ -2502,6 +2502,8 @@ pictureinpicture:
height: The height that the window was created at
screenX: The screen X coordinate that the window was created at
screenY: The screen Y coordinate that the window was created at
ccEnabled: Are subtitles enabled for PiP
webVTTSubtitles: Are the subtitles WebVTT
notification_emails:
- mconley@mozilla.com
products:
@ -2512,6 +2514,7 @@ pictureinpicture:
- 1560590
- 1678202
- 1730039
- 1756703
expiry_version: "never"
release_channel_collection: opt-out
resize: