Then you are doomed. ;-) (On mobile, it's your browser anyway that mutes any not currently on top and visible web sources, without any "help" by the particular website.)
I know this is an old topic now, but that's not true. I've installed a firefox plugin that disables the visibility API. Result - now youtube in a firefox tab keeps playing even with my screen locked.