cordova-android icon indicating copy to clipboard operation
cordova-android copied to clipboard

Video does not keep Android device awake when playing in full screen

Open chuchuva opened this issue 2 years ago • 2 comments

Bug Report

HTML5 videos fail to keep a device awake if playing in full screen

Problem

Command or Code

Rerpro:

  1. Create a new Cordova project using cordova create testVideo
  2. Add Android platform: cordova platform add android
  3. Add this code to index.html, inside body tag:
<video controls width="300" src="https://d2zihajmogu5jn.cloudfront.net/big-buck-bunny/bbb.mp4"></video>
  1. Run project on physical device using cordova run android
  2. Start playing video
  3. Switch video to full screen
  4. Wait for some time

What is expected to happen?

Video should play keeping the device awake.

What does actually happen?

The screen goes dark after some time and then the device falls asleep (you can change display timeout in settings).

Information

If you do not switch to full screen the device stays awake as expected.

If you reverse steps 5 and 6 (switch to full screen first then start playing video) then the device stays awake as expected. 😕

Environment, Platform, Device

I tested on a tablet with Android version 9 and on a phone with Android version 8.

Version information

Cordova CLI: 11.1.0 Cordova Android Platform: 10.1.2

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

chuchuva avatar Feb 10 '23 03:02 chuchuva

@chuchuva Please assign it to me I'll work on it

dcode333 avatar May 07 '23 12:05 dcode333

@dcode333 Thank you! Unfortunately I don't have permissions to assign this issue to you but I believe you can still work on it and then submit a pull request, see Get involved in Open Source today - How to contribute a patch to a GitHub hosted Open Source project

chuchuva avatar May 07 '23 23:05 chuchuva