It can be a bit buggy at times, but when it comes to just playing music with the screen locked, it’s perfect.
https://addons.mozilla.org/en-US/firefox/addon/video-background-play-fix/
It can be a bit buggy at times, but when it comes to just playing music with the screen locked, it’s perfect.
https://addons.mozilla.org/en-US/firefox/addon/video-background-play-fix/
For those on iOS: there’s an app called “Vinegar” that replaces the YouTube player with a vanilla HTML5 player that supports background/PiP play without YT Premium.
Alternatively on iPhones with “dynamic island”, minimize Safari while a video is playing, quickly tap-and-hold the dynamic island area and resume playback. After that you can lock your device and audio will continue playing.