avoid screen turning off while playing video in mobile app
Question
Application Type
Mobile

Hi All,

I have used the default video player in my mobile app. but I am facing issue that while the video is playing the screen gets turned off after the screen timeout set in the phone's settings is done. 

Can anyone please help me how to avoid turning off the screen while playing the video? and how to disable this 3 dots menu shown below.

 

Hi Kaustubh ,

Did you check the KeepAwake Plugin?


Cheers,

António Pereira

Champion

Hello Kaustubh 

In Addition, You can use Insomnia Plugin to keep Mobile Awake - https://www.outsystems.com/forge/component-overview/1740/insomnia-plugin 


If you want to keep Mobile Awake while playing the video you might need to track event for Play and Pause accordingly the client actions can be called 

  • Call the client action KeepAwake to prevent the sceen from falling asleep
  • Call the AllowSleepAgain to allow the screen to fall asleep


You can also try the Video with UI Widget: https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Patterns/Using_Traditional_Web_Patterns/Controls/Video 

Hi Manish,

I was using the plugin earlier but as per the requirement I am not allowed to use third party plugins. Can you please suggest javascript to keep the screen awake.

Regards,

Kaustubh

mvp_badge
MVP

Does restrictions don't make sense, the 3th party plugins are also JavaScript. Already tested for you. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.