fenix icon indicating copy to clipboard operation
fenix copied to clipboard

[Bug] Phone goes to sleep while audio is playing

Open emilio opened this issue 7 years ago • 9 comments

Steps to reproduce

  • Go to music.youtube.com
  • Play a song without maximizing the video.
  • Wait

Expected behavior

  • Song keeps playing.

Actual behavior

  • After a bit the phone gets locked and the music stops playing. This doesn't happen if you maximize the video.

Device information

  • Android device: Galaxy A20 with Android 9
  • Fenix version:

Nightly 190904 18:02 (Build #12471814) 📦: 11.0.0, 0c63c199a 🦎: 70.0a1-20190901094958

┆Issue is synchronized with this Jira Task

emilio avatar Sep 05 '19 14:09 emilio

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

BranescuMihai avatar Feb 18 '20 14:02 BranescuMihai

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)

If you play any song that has an actual video

✔️ The screen will not go to sleep.

►Video 20200218-172146

If you play the audio (doesn't have an actual 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 20200218-172301

❌ 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.

AndiAJ avatar Feb 18 '20 15:02 AndiAJ

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

BranescuMihai avatar Feb 24 '20 13:02 BranescuMihai

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.

elcste avatar Mar 03 '20 14:03 elcste

I encountered this issue on the 1/17 Firefox Nightly build with www.rockfm.ro with Sony Xperia Z5 Premium (Android 7.1.1).

lobontiumira avatar Jan 18 '21 13:01 lobontiumira

I was able to reproduce the issue on the 86.0.0-beta.2 build with Samsung Galaxy Tab A6 (Android 5.1.1) on www.guerrilla.ro/player/ , and on rockfm.ro.

lobontiumira avatar Feb 02 '21 13:02 lobontiumira

I reproduced this issue on rockfm.ro, on RC 89.1.1 with Samsung Galaxy Tab A6 (Android 5.1.1).

lobontiumira avatar May 28 '21 09:05 lobontiumira

I was able to reproduce this issue on 90.1.2 build with HTC 10 (Android 8).

lobontiumira avatar Jul 20 '21 13:07 lobontiumira

See: https://github.com/mozilla-mobile/fenix/issues/17373 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 16 '22 14:01 stale[bot]