HTML5 Video Stopped when device is locked

Hi,

I developed an Android App which used to play some videos similar to youtube. For some reason, I am using native webview to load a local HTML file and play the video using the HTML5 video (actually, I am using video.js in the HTML file) within the webview. However, when the device is locked or screen is off, the video will be stopped right away. 

My question is:

is it possible to keep the video playing (actually, it is keeping the video sound play only) when the device is locked?

I am using Corona SDK 2019.3476 (2019.4.22)

And the video.js version is 7.5.4

I tried video.js on Android Chrome. The video will still stop when the device is locked but it will show a dialog box in the lock screen to allow you to keep playing the video sound. Is there any extra permission needed in corona sdk to allow this?

Thanks!

Are you using native.newWebView() for this?

Rob

yes

Our native.newWebView()'s are very minimalistic. But I think the larger problem is that Corona isn’t designed to be an app that runs in the background. I’m sure Google has come up with more modern Chrome based ways to implement web views. We haven’t touched those API’s in years. Our Android support is undergoing a massive rebuilding to get it 64 bit. I have no idea if webViews will get updated in the process. This may be something we depend on the community to address through open source.

Rob

Are you using native.newWebView() for this?

Rob

yes

Our native.newWebView()'s are very minimalistic. But I think the larger problem is that Corona isn’t designed to be an app that runs in the background. I’m sure Google has come up with more modern Chrome based ways to implement web views. We haven’t touched those API’s in years. Our Android support is undergoing a massive rebuilding to get it 64 bit. I have no idea if webViews will get updated in the process. This may be something we depend on the community to address through open source.

Rob