Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

HTML5 Video Stopped when device is locked
Started by apps30 May 14 2019 01:14 AM

3 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

apps30

[GLOBAL: userInfoPane.html]
apps30
  • Enthusiast

  • 76 posts
  • Corona SDK

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!



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,786 posts
  • Enterprise

Are you using native.newWebView() for this?

 

Rob



[TOPIC: post.html]
#3

apps30

[GLOBAL: userInfoPane.html]
apps30
  • Enthusiast

  • 76 posts
  • Corona SDK

yes



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,786 posts
  • Enterprise

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




[topic_controls]
[/topic_controls]