Mozilla laid the groundwork for site-specific video encapsulation scripts in this week’s release of Firefox Nightly, the cutting-edge development version of the Firefox browser.
These video wrapper scripts enhance the browser’s picture-in-picture mode by adding support for site-specific controls and features, such as subtitles or captions.
Picture-in-Picture modes are supported by many modern web browsers. The mode allows users to move media playback to a standalone overlay interface that displays on top of the browser. Users get basic controls, for example, to play and pause videos, and can use the browser to navigate to other tabs or pages without losing focus on media playback.
Work on site-specific video player adapters began about a year ago when bug 1670108 was opened on Mozilla’s bug tracking site. The main reasons for wanting to implement scripts for specific services were compatibility, as global functionality sometimes caused unwanted breaks. Mike Conley, the original poster on the bug-tracking site, gave an example where a simple function that changed the current time of the video would cause Netflix to stop playing.
The introduction of site-specific fixes for Firefox’s Picture-in-Picture mode brings advanced controls to the mode and reduces the risk of breakage.
Mozilla mentions four video streaming services in its announcement. According to the organization, users can expect scripts for Netflix, YouTube and Amazon, and other services that weren’t mentioned in the announcement.
The latest version of Firefox Nightly includes the infrastructure that powers these site-specific video encapsulation scripts. Mozilla has implemented a proof-of-concept script for YouTube that synchronizes the mute button of the Picture-in-Picture window with the mute state of the video player on YouTube.
Mozilla will keep functionality limited to Firefox Nightly for the time being to address potential bugs and issues reported to the organization. The feature will then be upgraded to Firefox Stable.
Firefox’s Picture-in-Picture mode will benefit from this, especially if site-specific features such as subtitles or captions are supported by wrapper scripts. Firefox users who use the browser’s Picture-in-Picture mode will likely find the enhanced feature useful, provided the sites they use the feature on are supported by it.
Now you: Are you using the Picture-in-Picture mode in the browser of your choice?