I have found that audio and video files don’t play if the phone goes to the lock screen or the site is in the background, in the case the user is accessing the forum through the PWA setting (having downloaded it to their home screen).
Is there a way to change this, to enable lock screen/background playback when accessed by PWA?
Here’s what’s surprising to me: When you access the forum straight from the web, audio and video are able to play when the phone is locked and when the site goes to the background. The main issue arises when in PWA.
I see this behavior on iphone.
Further Detail
When a user is on their phone, I’m hoping that audio and media files can keep playing when the phone is locked or the site itself is in the background.
On iOS, I find the basic behavior is ok in both cases, if the user accesses the site from the mobile web:
–For audio files (mp3, etc.), the file keeps playing when the phone is on lock and when the site goes to the background. That’s perfect.
–For video files (mp4, etc.), the file stops playing when the phone is on lock or when the site goes to the background. But, there is a play button the users can hit on the lock screen to start it again, and the users can start playing the video again when the site is in the background by opening up the control center and hitting play.
However, if the user accesses the site through the PWA, neither work. When the phone goes to lock or the site goes to background, all playback is stopped, and there is no option to start playing again (until unlocking and going into the site again).
The youtube vid seems to act the same for mobile mobile safari and pwa–you can’t play it in the background or on lock screen. That could be bc youtube is unique (they block background playing unless you subscribe to youtube premium, for example, and that could have impact here).
Here’s some other examples:
Vimeo embed:
And audio embed:
I find that both work as I have described on iphone:
–on mobile safari access, you can play both in the background and on lock screen (only difference is that the video stops playing when the phone changes state to lock/background, and you have to hit play again)
–on pwa access, neither play in background or lock screen (there is no further play option in either case once app goes to background or phone goes to lock screen)
Yes. I only have an iphone to test with. Can’t speak to android. (And all of these embeds–both video and audio–play in the background fine for Mac chrome and Mac safari, and also PWA on desktop. Issue here is mobile, and in my case iphone.)