Nightly 190904 18:02 (Build #12471814)
📦: 11.0.0, 0c63c199a
🦎: 70.0a1-20190901094958
Can someone please re-test? I tried with a 15sec screen sleep, for me the phone didn't get locked. Tried on: Oneplus 7T pro and Samsung Note 10
Hi, I've just checked this matter on the latest Nightly #20490606 from 2/18 having the following devices set to sleep after 15 seconds of inactivity :
• Google Pixel 3a XL (Android 10)
• Google Pixel 3a (Android 9)
• Huawei Mate 20 Lite (Android 8.1.0)
• Samsung Galaxy S7 (Android 7.0.0)
• One Plus A3 (Android 6.0.1)
✔️ The screen will not go to sleep.
►Video

❌The screen goes to sleep and the playback is paused.
Managed to reproduce this on:
• Google Pixel 3a XL (Android 10)
• Google Pixel 3a (Android 9)
• Huawei Mate 20 Lite (Android 8.1.0)
►Video

❌ The screen goes to sleep and the playback is not paused.
Managed to reproduce this on:
• Samsung Galaxy S7 (Android 7.0.0)
• One Plus A3 (Android 6.0.1)
As a daily user of the music.youtube app, the screen should not go to sleep on any circumstance while audio/video playback is performed.
This issue reproduces also on Fennec (and GeckoView Sample), therefore it's most likely a GV issue. I'm assuming it's either the video encoding for the image+audio combo that gets treated as simple audio and doesn't acquire a wakelock.
Last place I was looking into was HTMLMediaElement.h in gecko, which has MediaInfo class, with hasVideo() and hasAudio() methods. The difference between the working ones and non-working ones could be hasVideo() = false.
Added a bugzilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1617591
I came to report the same issue playing BBC audio streams, like https://www.bbc.co.uk/sounds/play/live:bbc_world_service. Chromium-based browsers keep the audio playing so I can listen to the radio when reading another tab or with the screen off.