# picture-in-picture

Picture-in-Picture is a web platform specification and API that lets websites create and control an always-on-top floating video window.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Firefox 160 released

DevFeed: [Firefox 160 released](<https://devfeed.tech/articles/firefox-160-released-126811.md>)

Original publisher: [Read original article](<https://lwn.net/Articles/1106542/>)

Author: jzb

Published: 2026-11-10T15:37:42Z

Content type: release

Language: en

Sources: [LWN.net](<https://devfeed.tech/sources/lwn-net.md>)

Topics: [Firefox](<https://devfeed.tech/topics/firefox.md>), [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>)

Tags: [audio](<https://devfeed.tech/tags/audio.md>), [block](<https://devfeed.tech/tags/block.md>), [browser](<https://devfeed.tech/tags/browser.md>), [controls](<https://devfeed.tech/tags/controls.md>), [feature](<https://devfeed.tech/tags/feature.md>), [features](<https://devfeed.tech/tags/features.md>), [files](<https://devfeed.tech/tags/files.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [flac](<https://devfeed.tech/tags/flac.md>), [handle](<https://devfeed.tech/tags/handle.md>), [links](<https://devfeed.tech/tags/links.md>), [mp3](<https://devfeed.tech/tags/mp3.md>), [pcm](<https://devfeed.tech/tags/pcm.md>), [picture-in-picture](<https://devfeed.tech/tags/picture-in-picture.md>), [play](<https://devfeed.tech/tags/play.md>), [playback](<https://devfeed.tech/tags/playback.md>), [release](<https://devfeed.tech/tags/release.md>), [sites](<https://devfeed.tech/tags/sites.md>), [speed](<https://devfeed.tech/tags/speed.md>), [version](<https://devfeed.tech/tags/version.md>)

### AI overview

Firefox 160 adds an option to block websites from asking to handle mailto: links, support for Matroska video with FLAC, MP3, or PCM audio, and playback speed controls in picture-in-picture. It also introduces Mini Window, which is still in early development.

### Source excerpt

Version 160 of the Firefox web browser has been released. Notable features in this release include the ability to block sites from asking to handle "mailto:" links, ability to play Matroska files with FLAC, MP3, or PCM audio, playback speed controls in the picture-in-picture video player, and a new Mini Window feature that is in early development.

## Firefox 160 release brings new floating 'mini window' mode

DevFeed: [Firefox 160 release brings new floating 'mini window' mode](<https://devfeed.tech/articles/firefox-160-release-brings-new-floating-mini-window-mode-127483.md>)

Original publisher: [Read original article](<https://www.omgubuntu.co.uk/2026/11/firefox-160-released-mini-window>)

Author: Joey Sneddon

Published: 2026-11-09T23:59:00Z

Content type: news

Language: en

Sources: [OMG! Ubuntu](<https://devfeed.tech/sources/omg-ubuntu.md>)

Topics: [Firefox](<https://devfeed.tech/topics/firefox.md>), [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>), [project release](<https://devfeed.tech/topics/project-release.md>), [Mozilla](<https://devfeed.tech/topics/mozilla.md>)

Tags: [app-updates](<https://devfeed.tech/tags/app-updates.md>), [beta](<https://devfeed.tech/tags/beta.md>), [browsing](<https://devfeed.tech/tags/browsing.md>), [feedback](<https://devfeed.tech/tags/feedback.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [information](<https://devfeed.tech/tags/information.md>), [keep](<https://devfeed.tech/tags/keep.md>), [mini](<https://devfeed.tech/tags/mini.md>), [multitasking](<https://devfeed.tech/tags/multitasking.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [news](<https://devfeed.tech/tags/news.md>), [option](<https://devfeed.tech/tags/option.md>), [pages](<https://devfeed.tech/tags/pages.md>), [picture](<https://devfeed.tech/tags/picture.md>), [picture-in-picture](<https://devfeed.tech/tags/picture-in-picture.md>), [release](<https://devfeed.tech/tags/release.md>), [right](<https://devfeed.tech/tags/right.md>), [select](<https://devfeed.tech/tags/select.md>), [sources](<https://devfeed.tech/tags/sources.md>), [top](<https://devfeed.tech/tags/top.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>), [window](<https://devfeed.tech/tags/window.md>)

### AI overview

Firefox 160 adds a beta Mini Window that can keep an entire tab or a selected page section in a compact, resizable always-on-top window. Open it from a tab's Move Tab menu, the toolbar icon, or a section's right-click menu; Mozilla invites feedback. Picture-in-Picture adds playback speed controls from 0.25x to 2x when the window is large enough. The address bar now offers "Paste and Search" for plain text and reserves "Paste and Go" for URLs. Other listed changes include dragging sidebar history entries to the tab strip, Matroska support, Web Speech API speech-to-text, and blocking sites from handling links such as mailto. The excerpt says existing users receive updates through their current distribution channel; Ubuntu users get a background Snap Store update.

### Source excerpt

Firefox 160 released today with some new features. A new "Mini Window" option lets you move a tab or select a portion of a web page to an always-on-top window, so you can keep an eye on it while browsing. The feature is in beta and Mozilla invite feedback on it. Mozilla say the feature is "useful when you're multitasking and need to keep a few sources of information in view at once" - think Picture-in-Picture mode, but to see sections or entire web pages, basically. Using it is easy. You can right click a tab, mouse into the Move [...] You're reading Firefox 160 release brings new floating 'mini window' mode, a blog post from OMG! Ubuntu. Do not reproduce elsewhere without permission.

## Firefox 159 released with Wayland Linux fixes

DevFeed: [Firefox 159 released with Wayland Linux fixes](<https://devfeed.tech/articles/firefox-159-released-with-wayland-linux-fixes-101035.md>)

Original publisher: [Read original article](<https://www.omgubuntu.co.uk/2026/10/firefox-159-released>)

Author: Joey Sneddon

Published: 2026-10-27T01:28:51Z

Content type: release

Language: en

Sources: [OMG! Ubuntu](<https://devfeed.tech/sources/omg-ubuntu.md>)

Topics: [Firefox](<https://devfeed.tech/topics/firefox.md>), [Wayland](<https://devfeed.tech/topics/wayland.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [AI Chat](<https://devfeed.tech/topics/ai-chat.md>), [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [app-updates](<https://devfeed.tech/tags/app-updates.md>), [css](<https://devfeed.tech/tags/css.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [linux](<https://devfeed.tech/tags/linux.md>), [news](<https://devfeed.tech/tags/news.md>), [wayland](<https://devfeed.tech/tags/wayland.md>)

### AI overview

Firefox 159 fixes Wayland tab behavior on Linux: tabs no longer detach when clicked in some situations, and dragging a tab upward can now detach it. It also resolves excessive memory use reported on AMD systems when Mapbox GL JS maps appeared. The Passwords sidebar is now enabled by default, and Ctrl+Shift+A on Windows or Linux opens tab search, including matches from synced devices when signed in. Smart Window testers can use `/watch` to monitor pages, with configurable checks and notifications. In the AI sidebar, page summaries now send the site address to the provider rather than page text. Firefox 159 also adds scroll-driven animation support and assorted bug and security fixes. Existing users receive updates through their installed distribution channel; Ubuntu users get the update through the Snap Store.

### Source excerpt

Firefox 159 is out, with a fresh set of improvements and some Linux-specific fixes. Now that Mozilla's browser hews to a faster release cadence, with two releases a month rather than one, some changelogs may look minor on their own, as they're smaller, if more frequent slices. So what's changed? The Passwords tool in the browser sidebar (added as an option in Firefox 145) is now shown by default. This lets you find credentials in the same window as a web page, no mousing through menus or juggling with floating dialogs. It's also a smidgen easier to search your open [...] You're reading Firefox 159 released with Wayland Linux fixes, a blog post from OMG! Ubuntu. Do not reproduce elsewhere without permission.

## Arc-like automatic picture-in-picture in Chromium

DevFeed: [Arc-like automatic picture-in-picture in Chromium](<https://devfeed.tech/articles/arc-like-automatic-picture-in-picture-in-chromium-100730.md>)

Original publisher: [Read original article](<https://daverupert.com/2026/10/arc-like-automatic-picture-in-picture-in-chromium/>)

Author: Dave Rupert

Published: 2026-10-26T15:31:00Z

Content type: article

Language: en

Sources: [Dave Rupert](<https://devfeed.tech/sources/daverupert-com.md>)

Topics: [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>), [Chromium](<https://devfeed.tech/topics/chromium.md>), [Chrome extension](<https://devfeed.tech/topics/chrome-extension.md>)

Tags: [about](<https://devfeed.tech/tags/about.md>), [all](<https://devfeed.tech/tags/all.md>), [animations](<https://devfeed.tech/tags/animations.md>), [apis](<https://devfeed.tech/tags/apis.md>), [arc](<https://devfeed.tech/tags/arc.md>), [area](<https://devfeed.tech/tags/area.md>), [automatic](<https://devfeed.tech/tags/automatic.md>), [based](<https://devfeed.tech/tags/based.md>), [browser](<https://devfeed.tech/tags/browser.md>), [building](<https://devfeed.tech/tags/building.md>), [but](<https://devfeed.tech/tags/but.md>), [canary](<https://devfeed.tech/tags/canary.md>), [change](<https://devfeed.tech/tags/change.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [chromium](<https://devfeed.tech/tags/chromium.md>), [configure](<https://devfeed.tech/tags/configure.md>), [custom](<https://devfeed.tech/tags/custom.md>), [like](<https://devfeed.tech/tags/like.md>), [picture](<https://devfeed.tech/tags/picture.md>), [picture-in-picture](<https://devfeed.tech/tags/picture-in-picture.md>)

### AI overview

Chrome 142's `browser-initiated-automatic-picture-in-picture` flag reproduces Arc's automatic video PiP behavior: switching tabs moves a video into a floating window, and returning to its tab restores it to the player. The excerpt says the feature later appeared in Edge Canary and is available in mainline Edge 156 by enabling the flag. The author's earlier extension attempt was cumbersome, requiring site configuration and scripts tied to the WebExtensions, PageVisibility, and MediaSession APIs. The Edge implementation is described as missing Arc's physics-based gestures for moving and resizing the PiP window.

### Source excerpt

There's a lot to miss about Arc (RIP), but the feature I miss the most has got to be automatic picture-in-picture. You start a video and when you change tabs to jump to another task, the video anchored itself to the corner of your desktop. Go back to the video tab and it slurps up into the video player area. A perfect experience with no interruption. I switched back to Edge (for work) and missed Auto-PiP a lot. I tried building a custom browser extension to restore the functionality myself but hit a platform limitation with the mix of WebExtensions, PageVisibility , and MediaSession APIs you need to get it to work seamlessly. You had to configure each site in a dropdown and run a script each MediaSession... it asked a lot of the user. There's been a handful of Chromium flags and experiments to add "Auto-PiP" over the years, but nothing did it as well as Arc did... until... about://flags#browser-initiated-automatic-picture-in-picture Chrome 142 introduced a new browser-initiated-automatic-picture-in-picture flag and it behaves the same as Arc. The browser does all the work popping the video in-and-out when expected. I couldn't believe this near-exact replica was hiding in plain sight all this time! But I couldn't use it because the flag didn't exist in Edge 😭 I started up a couple internal threads about it last year but it went nowhere. When the topic came up again this year, I mentioned to Greg Whitworth, "Y'know there's a flag in Chrome that does Auto-PiP great..." and that next week the flag showed up in Canary and I'm happy to say it's available today in mainline Edge 156. If you missed that feature in Arc and didn't know it existed in Chrome or felt crushed by it not existing in Edge... then head over and turn on the flag today, I think you'll be happy. The only thing it's missing for me are the juicy physics-based animations that let you two-finger swipe and throw the picture-in-picture window around and pinch-zoom to resize. But it feels like the bones are there. And it

## KDE Plasma 6.9 Stabilizes KWin's Wayland Picture-In-Picture Support

DevFeed: [KDE Plasma 6.9 Stabilizes KWin's Wayland Picture-In-Picture Support](<https://devfeed.tech/articles/kde-plasma-6-9-stabilizes-kwin-s-wayland-picture-in-picture-support-98580.md>)

Original publisher: [Read original article](<https://www.phoronix.com/news/KDE-Plasma-6.9-Wayland-PiP>)

Author: Michael Larabel

Published: 2026-10-24T00:56:16Z

Content type: news

Language: en

Sources: [Phoronix](<https://devfeed.tech/sources/phoronix.md>)

Topics: [Wayland](<https://devfeed.tech/topics/wayland.md>), [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [compositor](<https://devfeed.tech/tags/compositor.md>), [desktop-linux](<https://devfeed.tech/tags/desktop-linux.md>), [integration](<https://devfeed.tech/tags/integration.md>), [kde](<https://devfeed.tech/tags/kde.md>), [kde-plasma](<https://devfeed.tech/tags/kde-plasma.md>), [linux-benchmarking](<https://devfeed.tech/tags/linux-benchmarking.md>), [linux-hardware-benchmarks](<https://devfeed.tech/tags/linux-hardware-benchmarks.md>), [linux-hardware-reviews](<https://devfeed.tech/tags/linux-hardware-reviews.md>), [linux-how-to](<https://devfeed.tech/tags/linux-how-to.md>), [linux-performance](<https://devfeed.tech/tags/linux-performance.md>), [linux-server-benchmarks](<https://devfeed.tech/tags/linux-server-benchmarks.md>), [open-source-graphics](<https://devfeed.tech/tags/open-source-graphics.md>), [phoronix](<https://devfeed.tech/tags/phoronix.md>), [phoronix-test-suite](<https://devfeed.tech/tags/phoronix-test-suite.md>), [picture-in-picture](<https://devfeed.tech/tags/picture-in-picture.md>), [pip](<https://devfeed.tech/tags/pip.md>), [plasma](<https://devfeed.tech/tags/plasma.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [stable](<https://devfeed.tech/tags/stable.md>), [support](<https://devfeed.tech/tags/support.md>), [ubuntu-benchmarks](<https://devfeed.tech/tags/ubuntu-benchmarks.md>), [ubuntu-hardware](<https://devfeed.tech/tags/ubuntu-hardware.md>), [wayland](<https://devfeed.tech/tags/wayland.md>)

### AI overview

KDE Plasma 6.9 will enable KWin's Wayland Picture-In-Picture protocol support by default after developers declared it stable, giving browsers and other users an out-of-the-box PiP experience. The excerpt also notes that Plasma Browser Integration now supports Brave, while Plasma 6.8.2 is receiving fixes for multi-monitor setups and other regressions.

### Source excerpt

With the wonderful KDE Plasma 6.8 having shipped just more than one week ago, KDE developers are beginning to go heavy on new features for Plasma 6.9...

## New to the web platform in July

DevFeed: [New to the web platform in July](<https://devfeed.tech/articles/new-to-the-web-platform-in-july-85521.md>)

Original publisher: [Read original article](<https://web.dev/blog/web-platform-07-2026?hl=en>)

Author: Rachel Andrew Technical Writer GitHub LinkedIn Mastodon Bluesky Homepage

Published: 2026-07-31T07:00:00Z

Content type: news

Language: en

Sources: [web.dev](<https://devfeed.tech/sources/web-dev-blog.md>)

Topics: [Web platform](<https://devfeed.tech/topics/web-platform.md>), [Web](<https://devfeed.tech/topics/web.md>), [CSS](<https://devfeed.tech/topics/css.md>), [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>), [Interop2027](<https://devfeed.tech/topics/interop2027.md>)

Tags: [anchor-positioning](<https://devfeed.tech/tags/anchor-positioning.md>), [animation](<https://devfeed.tech/tags/animation.md>), [api](<https://devfeed.tech/tags/api.md>), [beta](<https://devfeed.tech/tags/beta.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [children](<https://devfeed.tech/tags/children.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [cookies](<https://devfeed.tech/tags/cookies.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [css](<https://devfeed.tech/tags/css.md>), [features](<https://devfeed.tech/tags/features.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [has](<https://devfeed.tech/tags/has.md>), [html](<https://devfeed.tech/tags/html.md>), [stable](<https://devfeed.tech/tags/stable.md>), [web](<https://devfeed.tech/tags/web.md>), [web-browsers](<https://devfeed.tech/tags/web-browsers.md>), [web-platform](<https://devfeed.tech/tags/web-platform.md>)

### AI overview

A monthly roundup of web platform features arriving in stable and beta browsers during July 2026. It covers updates to HTML parsing and APIs, CSS features, browser support, and fixes across Chrome, Firefox, and Safari.

### Source excerpt

Discover some of the interesting features that have landed in stable and beta web browsers during July 2026.

## New to the web platform in May

DevFeed: [New to the web platform in May](<https://devfeed.tech/articles/new-to-the-web-platform-in-may-4174.md>)

Original publisher: [Read original article](<https://web.dev/blog/web-platform-05-2026?hl=en>)

Author: Rachel Andrew GitHub LinkedIn Mastodon Bluesky Homepage

Published: 2026-05-29T07:00:00Z

Content type: article

Language: en

Sources: [web.dev](<https://devfeed.tech/sources/web-dev-blog.md>)

Topics: [Web platform](<https://devfeed.tech/topics/web-platform.md>), [Web](<https://devfeed.tech/topics/web.md>), [browser](<https://devfeed.tech/topics/browser.md>), [CSS](<https://devfeed.tech/topics/css.md>), [HTML](<https://devfeed.tech/topics/html.md>), [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>), [API](<https://devfeed.tech/topics/api.md>), [Firefox](<https://devfeed.tech/topics/firefox.md>), [Google Chrome](<https://devfeed.tech/topics/google-chrome.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [audio](<https://devfeed.tech/tags/audio.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [css](<https://devfeed.tech/tags/css.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [html](<https://devfeed.tech/tags/html.md>), [performance](<https://devfeed.tech/tags/performance.md>), [picture-in-picture](<https://devfeed.tech/tags/picture-in-picture.md>), [web](<https://devfeed.tech/tags/web.md>), [web-browsers](<https://devfeed.tech/tags/web-browsers.md>), [web-platform](<https://devfeed.tech/tags/web-platform.md>)

### AI overview

A roundup of notable web platform features that became available in stable or beta browsers during May 2026, including CSS pseudo-classes, name-only container queries, container style queries for custom properties, native lazy loading for video and audio, and the Document Picture-in-Picture API.

### Source excerpt

Discover some of the interesting features that have landed in stable and beta web browsers during May 2026.

## Multi-tasking with Minimized Custom Tabs

DevFeed: [Multi-tasking with Minimized Custom Tabs](<https://devfeed.tech/articles/multi-tasking-with-minimized-custom-tabs-4185.md>)

Original publisher: [Read original article](<https://blog.chromium.org/2024/05/multi-tasking-with-minimized-custom-tabs.html>)

Author: Chromium Blog (noreply@blogger.com)

Published: 2024-05-29T16:08:00Z

Content type: release

Language: en

Sources: [Chromium Blog](<https://devfeed.tech/sources/chromium-blog.md>)

Topics: [Google Chrome](<https://devfeed.tech/topics/google-chrome.md>), [in-app-browsers](<https://devfeed.tech/topics/in-app-browsers.md>), [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>), [browser](<https://devfeed.tech/topics/browser.md>)

Tags: [browsing](<https://devfeed.tech/tags/browsing.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [none](<https://devfeed.tech/tags/none.md>), [picture-in-picture](<https://devfeed.tech/tags/picture-in-picture.md>)

### AI overview

Chrome M124 adds Minimized Custom Tabs: users can tap the down button in the Chrome Custom Tab toolbar to shrink a tab into a floating picture-in-picture window, then tap the window to restore it. The browser-level change applies automatically to developers using Chrome Custom Tabs. The source says this is a Chrome change and expresses hope that other browsers adopt similar functionality.

### Source excerpt

In the latest release of Chrome, we're introducing Minimized Custom Tabs, a feature that allows users to effortlessly transition between native app and web content. With a simple tap on the down button in the Chrome Custom Tabs toolbar, users can minimize a Custom Tab into a compact, floating picture-in-picture window. This seamless integration enables multi-tasking across surfaces, enhancing the in-app web browsing experience. By tapping on the floating window, users can easily maximize the tab, restoring it to its original size. How to get started Because this change happens at the browser level, developers who use Chrome Custom Tabs will see this change automatically applied starting with Chrome version M124. End users will see the Minimize icon in the Chrome Custom Tab toolbar. Please note that this is a change in Chrome, and we hope other browsers will adopt similar functionality. Posted by Victor Gallet, Senior Product Manager

## Day 17: the :picture-in-picture pseudo-class

DevFeed: [Day 17: the :picture-in-picture pseudo-class](<https://devfeed.tech/articles/day-17-the-picture-in-picture-pseudo-class-52183.md>)

Original publisher: [Read original article](<https://www.matuzo.at/blog/2022/100daysof-day17>)

Author: Manuel Matuzović

Published: 2022-10-18T00:00:00Z

Content type: tutorial

Language: en

Sources: [Manuel Matuzović](<https://devfeed.tech/sources/manuel-matuzovic-blog.md>)

Topics: [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>), [CSS](<https://devfeed.tech/topics/css.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [browsers](<https://devfeed.tech/tags/browsers.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [css](<https://devfeed.tech/tags/css.md>), [edge](<https://devfeed.tech/tags/edge.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [has](<https://devfeed.tech/tags/has.md>), [opera](<https://devfeed.tech/tags/opera.md>), [picture-in-picture](<https://devfeed.tech/tags/picture-in-picture.md>), [safari](<https://devfeed.tech/tags/safari.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

A CSS tutorial examines the :picture-in-picture pseudo-class for styling video elements in picture-in-picture mode. It describes browser support for picture-in-picture and reports that, based on the author's tests, Safari was the only listed browser supporting the pseudo-class.

### Source excerpt

You can use the :picture-in-picture pseudo-class to style an element, usually a <video>, which is currently in picture-in-picture mode (PIP). Clicking the following button puts the video in picture-in-picture mode in supporting browsers (Chrome, Edge, Safari, Opera). Firefox doesn't support the API, but you can right-click the video and select "Watch in Picture-in-Picture". Toggle PIP Sorry, your browser doesn't support embedded videos. When the video is playing in PIP mode, the placeholder for the video switches to the :picture-in-picture state. Contrary to the information in the support table on MDN, none of the browsers, except for Safari, supports the pseudo-class. At least, according to my tests. :picture-in-picture { opacity: 0.3; filter: blur(5px); } Here's how the video placeholder, which by default is not blurred and has a black background color, looks like in Safari. My blog doesn't support comments yet, but you can reply via blog@matuzo.at.

## Drop-in Android Video -- Exoplayer2 with Picture in Picture

DevFeed: [Drop-in Android Video -- Exoplayer2 with Picture in Picture](<https://devfeed.tech/articles/drop-in-android-video-exoplayer2-with-picture-in-picture-26010.md>)

Original publisher: [Read original article](<https://medium.com/s23nyc-tech/drop-in-android-video-exoplayer2-with-picture-in-picture-e2d4f8c1eb30?source=rss-2ffcf6104135------2>)

Author: Stacy Devino

Published: 2018-09-13T15:58:58Z

Content type: tutorial

Language: en

Sources: [Stacy Devino](<https://devfeed.tech/sources/stories-by-stacy-devino-on-medium.md>)

Topics: [ExoPlayer](<https://devfeed.tech/topics/exoplayer.md>), [Android](<https://devfeed.tech/topics/android.md>), [picture-in-picture](<https://devfeed.tech/topics/picture-in-picture.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [exoplayer2](<https://devfeed.tech/tags/exoplayer2.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [nike](<https://devfeed.tech/tags/nike.md>), [picture-in-picture](<https://devfeed.tech/tags/picture-in-picture.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

The excerpt shows how to build an in-app Android player with ExoPlayer2: use SimpleExoPlayer with PlayerView, add the core, HLS, UI, and MediaSession extension libraries, select HLS or extractor media sources by URL type, and release the player in onStop(). For Picture-in-Picture (PiP), check Android version and device feature support, hide player controls, and enter PiP from onUserLeaveHint() and optionally onBackPressed(). The article reports that the Android Studio API available to its author could not check the user's PiP permission directly; it suggests checking whether the activity entered PiP after a short delay and falling back to back navigation if it did not. It also recommends finishAndRemoveTask() when the PiP activity stops, and a MediaSessionConnector for PiP playback controls. The excerpt warns that PiP can outlive the main app and proposes an onTaskRemoved() service signal to close the player activity. These are the article's version-specific workarounds; the excerpt does not establish their behavior on current Android versions.

### Source excerpt

Beautiful, interactive video content done easy. Video has been shown to increase engagement in apps and with content. How else could gif servicing apps be worth tens of millions and Youtube influencers be selling billions of dollars of product? The problem is that video in Android can be difficult. You are given the assumption that the video types you will support are pretty basic : embedded MPEG video, URLs to MP4/AVI files, and HLS Streaming. A naive approach would be to use the embedded video player sent with Intents, but that takes the user out of your app. You think, 🤔 " I'll just use the Android VideoView class with AppCompat ." Then you realize that it is nearly impossible to make the experience consistent across users because of codec support and whatever the phone manufacturer may have customized in the video player. Finally you settle on Exoplayer2 because it is the package everyone, including Google, uses. Upon further inspection, you quickly realize that it requires a lot of code to make it work and the example application on the Github is confusing, far too extensive for what you are doing. Another route you could take is ExoMedia by Brian Wernick, but it trades extensibility, theming, and control for simplicity. Fortunately, you only need the Exoplayer2 libraries to have a fantastic video player experience within your app. SimpleExoplayer "2" the Rescue First you need to make an app which can receive a URL and play it using Exoplayer. For this, you will need SimpleExoplayer and the Playerview from the UI package. Playerview has easy to manipulate styling/theming elements as well as available media controls. SimpleExoPlayer gives you a preconfigured player to work with without having to handle deeper logic yourself. Start by adding the Gradle dependencies to your build.gradle : implementation 'com.google.android.exoplayer:exoplayer-core:2.X.X' implementation 'com.google.android.exoplayer:exoplayer-hls:2.X.X' implementation 'com.google.android.exoplayer: