Граф коммитов

94 Коммитов

Автор SHA1 Сообщение Дата
Oliver Pope adf8ad9bc6 Bug 1695020 - fix PiP InvalidStateError when PictureInPictureToggle is destroyed r=mtigley,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D107580
2021-03-12 20:38:55 +00:00
Oliver Pope 348505d448 Bug 1676569 - Avoid calling requestIdleCallback when contentWindow is not available r=mtigley,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D103536
2021-02-25 20:24:05 +00:00
Swapnik Katkoori b2263951cf Bug 1679174 - Filter out videos with NaN duration. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D103845
2021-02-19 01:51:25 +00:00
Mike Conley 2e689029d7 Bug 1666739 - Add site-specific PiP toggle visibility threshold to the WebCompat add-on. r=mstriemer,webcompat-reviewers,denschub,twisniewski
This also adds the first threshold of 0.9 for YouTube, which allows us to avoid
hittest false positives on the PiP toggle when the user has one of the YouTube
player menus open.

Differential Revision: https://phabricator.services.mozilla.com/D93124
2020-12-04 19:43:54 +00:00
Chris Jackson 34b8da0a3a Bug 1672623 - Closing PiP window pauses the cloned video element for video conferences. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D96633
2020-11-19 00:09:00 +00:00
Chris Jackson 04b688c697 Bug 1672401 - Picture-in-Picture description is displayed incorrectly on whereby.com. r=mconley,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D95166
2020-11-09 17:10:28 +00:00
Chris Jackson ebde1f9094 Bug 1670254 - Remove Picture-in-Picture toggle experimentation code now that Mode 2 has been settled on. r=mconley,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D93267
2020-10-26 19:16:53 +00:00
Hunter Jones 11ed93a032 Bug 1667840: Refactor Picture-in-Picture to not use global state r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D92976
2020-10-22 22:04:55 +00:00
Neil Deakin 460cc6a899 Bug 1651802, replace willDestroy methods in actors with didDestroy, add null-check in picture-in-picture actor which occurs if removeMouseButtonListeners while tab is closed, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D90737
2020-10-20 23:27:28 +00:00
Hunter Jones 3fc0c60d52 Bug 1671341: Fix PiP not closing from context-menu r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D93740
2020-10-16 17:50:49 +00:00
Hunter Jones 05237ad1d0 Bug 1667409: Create a separate actor to launch a Picture-in-Picture window r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D91460
2020-10-08 13:51:24 +00:00
Narcis Beleuzu 93313c434d Backed out changeset 3722e6ee6ebd (bug 1653496) for bc failures on browser_mediaStreamVideos.js . CLOSED TREE 2020-10-06 00:05:00 +03:00
Reid Shinabarker 917e456342 Bug 1653496 - Picture-in-Picture option not shown for VideoHTMLElement with VideoTrack from Twilio. r=mconley,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D91544
2020-10-05 18:26:35 +00:00
Olli Pettay 56856c98be Bug 1666923 - fission.sessionHistoryInParent set to true breaks Picture-in-Picture r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D91271
2020-09-28 15:32:18 +00:00
Jared Wein b9eef99479 Bug 1661061 - If all videos are paused, choose the longest video as the video for PiP when opened via keyboard shortcut. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D88452
2020-09-14 17:54:46 +00:00
Hunter Jones ce1a0b3c82 Bug 1534986: Fixed Picture-In-Picture to close when fullscreening r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D90021
2020-09-12 20:47:04 +00:00
Thomas Wisniewski b8d5dbfdb0 Bug 1662576 - add ability to disable picture-in-picture hotkeys on specific domains in webcompat addon, and disable PiP-seeking on Netflix; r=mconley,denschub,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D89942
2020-09-11 20:14:09 +00:00
Thomas Wisniewski 7df1839378 Bug 1638426 - Add ability to disable webcompat picture-in-picture interventions, either globally or per-intervention; r=denschub,webcompat-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D87182
2020-09-08 16:59:55 +00:00
Mike Conley fe1b2725e2 Bug 1605527 - Re-evaluate Picture-in-Picture toggle overrides if the documentURI changes via the history API. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D86405
2020-08-07 21:47:01 +00:00
Mike Conley ab31e25884 Bug 1657155 - Add a Telemetry probe scalar for how many times the PiP toggle is shown. r=mstriemer,data-review=chutten
Differential Revision: https://phabricator.services.mozilla.com/D85902
2020-08-05 17:49:39 +00:00
Tracy Walker 444b4a2885 Bug 1656610 - Remove condition that checks the video's currentTime is > 0 r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D85637
2020-08-03 21:02:31 +00:00
Mike Conley 0ecf241b5d Bug 1653663 - Add experimental Picture-in-Picture toggle variations. r=mstriemer,flod
media.videocontrols.picture-in-picture.video-toggle.mode controls the toggle variation.
Valid values are -1 (default, what we currently ship), 1 and 2.

media.videocontrols.picture-in-picture.video-toggle.position controls the toggle variation
position. Valid values are "left" and "right" (default).

Differential Revision: https://phabricator.services.mozilla.com/D84032
2020-07-22 16:02:13 +00:00
Gijs Kruitbosch 46a2f9355a Bug 1633272 - do not track the PiP popped-out video in the Picture in Picture Toggle actor child, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D78727
2020-06-09 18:30:51 +00:00
Mike Conley 3d7fa66343 Bug 1622671 - Make the Picture-in-Picture player background colour solid black. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D66907

--HG--
extra : moz-landing-system : lando
2020-03-16 14:41:15 +00:00
Gijs Kruitbosch c9e459715b Bug 1619630 - remove useless 'dispatcher' argument to various JSWindowActorChild constructors, r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D65126

--HG--
extra : moz-landing-system : lando
2020-03-03 18:40:25 +00:00
Karan Sapolia ef720de9fe Bug 1611634 - Picture-in-Picture keyboard shortcut should open currently playing video. r=jaws
If a page has multiple videos, PiP keyboard shortcut opens the currently playing video.
Opens the first video, if no video is playing.

Differential Revision: https://phabricator.services.mozilla.com/D63780

--HG--
extra : moz-landing-system : lando
2020-02-25 14:27:39 +00:00
Gijs Kruitbosch 3a1283d7da Bug 1613069 - don't trip over null mousemove tasks when destroying PictureInPictureChild actors, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D61551

--HG--
extra : moz-landing-system : lando
2020-02-06 17:32:28 +00:00
Gabriel Luong aa684c0c76 Bug 1602841 - Implement keystroke handling for PiP window for video controls. r=mconley
This implements keystroke handling behind a pref "media.videocontrols.picture-in-picture.keyboard-controls.enabled".
This patch handles all the keystrokes for video controls, which include play, pause,
volume decrease and increase, mute, unmute, seek forward and backward for 15 seconds
or by 10% of the max video duration, seek to beginning and seek to end.
This reuses the key handler logic from https://searchfox.org/mozilla-central/rev/cfd1cc461f1efe0d66c2fdc17c024a203d5a2fd8/toolkit/content/widgets/videocontrols.js#1687-1810.

Differential Revision: https://phabricator.services.mozilla.com/D60631

--HG--
extra : moz-landing-system : lando
2020-01-26 06:21:23 +00:00
Mike Conley 86b88adf07 Bug 1596169 - Do a better job of cleaning up inside of PictureInPictureChild::willDestroy. r=mstriemer
Inside of PictureInPictureChild's willDestroy, we were calling removeMouseButtonListeners();,
which gets rid of all of the event listeners that we use to detect clicks on the page to
check for clicking on the PiP toggle.

There are, however, other event listeners that weren't being removed, and more importantly,
there were DeferredTask's that weren't being disarmed and torn down. This was causing us to
sometimes log error messages to the console when navigating between pages, because the
JSWindowActorChild has gone away by the time the DeferredTask runs.

So now we call stopTrackingMouseOverVideos instead, which also shuts down the DeferredTask's
(and also calls removeMouseButtonListeners).

Differential Revision: https://phabricator.services.mozilla.com/D52903

--HG--
extra : moz-landing-system : lando
2019-11-14 18:38:56 +00:00
Mike Conley 8416f879eb Bug 1592286 - Add URL-mapped policy support to the Picture-in-Picture toggle. r=mstriemer
I went with "policy" rather than "position" since "hidden" isn't really a position.

Differential Revision: https://phabricator.services.mozilla.com/D57177

--HG--
extra : moz-landing-system : lando
2019-12-21 00:24:06 +00:00
Mark Striemer a549522726 Bug 1535437 - Part 2: Resize PiP window when video source resizes r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D50139

--HG--
extra : moz-landing-system : lando
2019-12-05 16:59:04 +00:00
Razvan Maries fbea30c915 Backed out 3 changesets (bug 1535437, bug 1591253) for perma fails on browser_resizeVideo.js. CLOSED TREE
Backed out changeset 8222591127e9 (bug 1591253)
Backed out changeset d95a64f744b0 (bug 1535437)
Backed out changeset d5a82a15e3a5 (bug 1535437)
2019-12-04 23:14:45 +02:00
Mark Striemer 1d76749625 Bug 1535437 - Part 2: Resize PiP window when video source resizes r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D50139

--HG--
extra : moz-landing-system : lando
2019-12-03 21:45:30 +00:00
Andrew McCreight 38dac812ea Bug 1599175, part 1 - Remove unused 'browingContextId' message field in PictureInPictureChild. r=mconley
This field is misspelled. Don't worry though, it is also unused.

Differential Revision: https://phabricator.services.mozilla.com/D54565

--HG--
extra : moz-landing-system : lando
2019-11-25 18:19:01 +00:00
Ciure Andrei c24561eb05 Backed out 3 changesets (bug 1535437, bug 1591253) for causing browser_resizeVideo.js to permafail CLOSED TREE
Backed out changeset f7cc2f6d9640 (bug 1591253)
Backed out changeset bc637c20c7d4 (bug 1535437)
Backed out changeset 46b4eb05f2ae (bug 1535437)
2019-11-14 23:25:26 +02:00
Mark Striemer 54c97d535f Bug 1535437 - Part 2: Resize PiP window when video source resizes r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D50139

--HG--
extra : moz-landing-system : lando
2019-11-12 20:51:51 +00:00
Mike Conley 83b7a85186 Bug 1582600 - Make PiP code handle the case where sometimes calling .get() on a weak reference throws NS_ERROR_XPC_BAD_CONVERT_NATIVE (bug 800957). r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D51939

--HG--
extra : moz-landing-system : lando
2019-11-07 18:31:42 +00:00
Gabriel Luong d1c32b6f80 Bug 1575075 - Add an audio toggle button in PiP to mute and unmute a video. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D51413

--HG--
extra : moz-landing-system : lando
2019-11-04 21:14:50 +00:00
Teja Bayya d5ff37172c Bug 1576915 Port of Picture in Picture to JSWindowActors r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D49797

--HG--
extra : moz-landing-system : lando
2019-11-01 14:15:22 +00:00
Mike Conley 96bc42ea9f Bug 1592729 - Don't allow initting Picture-in-Picture for MediaStream videos. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D51159

--HG--
extra : moz-landing-system : lando
2019-10-31 14:37:26 +00:00
Mark Striemer 8098a9825a Bug 1590780 - Cleanup PiP video listeners when closed r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D50670

--HG--
extra : moz-landing-system : lando
2019-10-25 22:22:23 +00:00
dennisschagt 31a3f7f1d0 Bug 1568373 - Use black background for Picture-in-Picture window r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D49348

--HG--
extra : moz-landing-system : lando
2019-10-17 16:29:43 +00:00
Mike Conley 3c92d6087f Bug 1587362 - Make sure PiP toggle mouse button listeners are attached to the right WindowRoot after tab tear out / in. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D48885

--HG--
extra : moz-landing-system : lando
2019-10-11 23:36:59 +00:00
shindli cc3e1c3110 Backed out 2 changesets (bug 1587362) for causing very frequent bc failures in toolkit/mozapps/extensions/test/browser/browser_about_debugging_link.js CLOSED TREE
Backed out changeset d3142d807c7f (bug 1587362)
Backed out changeset c71f9a59bdfe (bug 1587362)
2019-10-12 02:32:13 +03:00
Mike Conley 8db106d422 Bug 1587362 - Make sure PiP toggle mouse button listeners are attached to the right WindowRoot after tab tear out / in. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D48885

--HG--
extra : moz-landing-system : lando
2019-10-11 21:00:15 +00:00
Mike Conley 51b7a87654 Bug 1585769 - Create a fresh <video> element for the Picture-in-Picture player window rather than cloning the original element. r=JSON_voorhees
Cloning the original node was needed when we needed the MediaInfo copied over, but
HTMLVideoElement::CloneElementVisually copies it over for us, so we can create a
fresh <video> element. This should also be a much healthier thing to do
security-wise, since we're not cloning strange nodes from the web.

Differential Revision: https://phabricator.services.mozilla.com/D48123

--HG--
extra : moz-landing-system : lando
2019-10-10 13:57:48 +00:00
Mike Conley 7429e303ed Bug 1582502 - Don't interpret a click at 0,0 of a fullscreen video as a click on the Picture-in-Picture toggle. r=JSON_voorhees
We weren't handling the case where the toggle has no dimensions, so its X and Y
coordinate would be at 0,0, which would match a click in the top-left corner of
the screen for a video that was fullscreened.

This adds a check that ensures that the toggle has both width and height before
checking whether or not a mouse event occurred within it.

Differential Revision: https://phabricator.services.mozilla.com/D47789

--HG--
extra : moz-landing-system : lando
2019-10-01 18:07:14 +00:00
Mike Conley 5794ef1442 Bug 1549442 - Make sure to hide the Picture-in-Picture toggle when the mouse cursor leaves the window. r=JSON_voorhees
Originally, we were using the :hover pseudoclass to show the Picture-in-Picture toggle,
and using the DevTools InspectorUtils module to manually apply that :hover pseudoclass
in PictureInPictureToggleChild in the event that the <video> element wasn't able to get
the :hover element "naturally".

Removing this pseudoclass when the mouse leaves the browser window (without first
leaving the toggle) doesn't work, since the mouseout event (which we use to detect
the mouse leaving the window) fires _after_ :hover states would normally be cleared,
so it's too late to "unlock" it.

The solution ended up being replacing the :hover pseudoclass with a .hovering class
that PictureInPictureToggleChild continues to manage on its own.

Differential Revision: https://phabricator.services.mozilla.com/D47677

--HG--
extra : moz-landing-system : lando
2019-10-01 18:09:43 +00:00
Mike Conley cf8d0284a0 Bug 1583882 - Close Picture-in-Picture player window if the originating <video> is removed from the DOM. r=JSON_voorhees
Differential Revision: https://phabricator.services.mozilla.com/D47613

--HG--
extra : moz-landing-system : lando
2019-10-01 16:20:51 +00:00
Mike Conley 376b551e6b Bug 1543810 - Regression test to ensure that the Picture-in-Picture works with videos that have pointer-events: none. r=JSON_voorhees
Differential Revision: https://phabricator.services.mozilla.com/D45232

--HG--
extra : moz-landing-system : lando
2019-09-14 14:27:37 +00:00