Comment by albert_e

1 year ago

I just opened it in incognito in Chrome on Android

noticed that the YouTube videos continue playing without interruption even when I switch to another tab or minimize chrome altogether and switch to another app.

how can we harness this power to play our favorite audio tracks in background (without any ads to boot ... shhh don't tell Google)

I also notice that the website triggers a browser warning when loading that it is not secure.

There are browsers extensions for this. I can't recommend one because I don't use this anymore. On Android this would mean using Firefox or another browser allowing extensions. Or you can give a YouTube address to MPV with the --no-video parameter. Or use NewPipe or one of its forks and open the YouTube kink with it in audio only mode. Or use invidious, but this last option is harder and harder to use. Or yt-dlp -x to download the audio of course.

  • Background playback just works with Firefox on Android with no extensions required.

There was an iOS app that used to let you do this; it would play music via Youtube embeds in a hidden web view, exposing its own UI for all the functionality you'd expect from a music streaming app.

Whether this was legal is... a gray area, it was a somewhat legitimate company that won some kind of Canadian startup contest on TV, but the music industry was, very predictably, furious at their business model.

Eventually, Apple got scared enough of being sued along with them that they caved in and removed the app, but that took far longer than I thought it would.

There's a good article at https://torrentfreak.com/apple-removes-parasitic-streaming-a...

I use Video Background Play Fix [1] (along with uBlock of course). "Firefox for Android can continue playing video even if you switch to another tab or app. However, sites can detect these user actions with the Page Visibility API and the Fullscreen API. This add-on is designed to block events and properties exposed by the APIs."

[1] https://github.com/mozilla/video-bg-play

Many ways to do that on Android. NewPipe or its fork Tubular, Clipious, LibreTube, or host a local instance of Invidious or ViewTube and access them using the browser.

F-Droid and the ability to still run software outside of Google's walled garden is the last remaining reason preventing me from switching to iPhone. I've tried Yattee on iOS and it's okay on Apple TV but seriously doesn't come close to the power of Tubular on Android.

I use Brave android. No ads and I can close phone or do anything on it and the video will be playing with no problem