mediathekview / zapp

German public broadcasting live streams as an Android app
https://mediathekview.de/news/zapp/
MIT License
206 stars 34 forks source link

Unlocked screen / background playback: (live) streaming stops. #384

Closed WebworkrNet closed 8 months ago

WebworkrNet commented 12 months ago

Device: Samsung Galaxy A13 5G (SM-A136B/DSN) Operating System: Android 13

The screen is unlocked.

Without the snooze function (https://github.com/mediathekview/zapp/issues/194) activated, playback occasionally stops after a while without resuming.

Related to question https://github.com/mediathekview/zapp/issues/241.

Related to #74, #148, #273 and especially #383.

WebworkrNet commented 11 months ago

Active downloads and queued downloads during backround playback presumably prevent this unwanted behavior.

cemrich commented 11 months ago

Thanks for reporting!

Is this only an issue with live streaming or with mediathek shows too? Do you play back in background or with the video on screen?

cemrich commented 10 months ago

Do you see an error message (notification) after the stream has stopped?

WebworkrNet commented 9 months ago

The error still occurs:

Device: Samsung Galaxy A13 5G (SM-A136B/DSN) Operating System: Android 14, One-UI 6.0

The stream stops unexpectedly without an error message.

WebworkrNet commented 9 months ago

Thanks for reporting!

Is this only an issue with live streaming or with mediathek shows too? Do you play back in background or with the video on screen?

As far as I remember, it only affects live streaming. The phenomenon only occurs with background playback (i.e. no image visible, only sound).

WebworkrNet commented 9 months ago

Could temporary overheating of the device be the cause?

If this is the case, can this be prevented by a timely notification, but at the latest after the end of the stream with an error message?

cemrich commented 8 months ago

I suspect aggresive Android power optimization as the main cause. I can reproduce this issue reliably by activating "Restricted battery usage" on stock Android.

@WebworkrNet Can you please check your energy settings for Zapp?

WebworkrNet commented 8 months ago

I've now changed the settings from "optimized" (probably the default setting on Android) to "unrestricted" and will keep an eye on it.

Screenshot_20240204_193834_Settings.jpg

Screenshot_20240204_193846_Settings.jpg

cemrich commented 8 months ago

Funny, "optimized" works fine on my device. Maybe it's device specific. Thanks for testing!

WebworkrNet commented 8 months ago

So far I haven't noticed any improvement after adjusting the battery settings. My suspicion of temporary device overheating is confirmed by further observations.

cemrich commented 8 months ago

Thanks for investigating. As this seems to be a very device specific bug, that cannot be fixed by Zapp, I'll close this issue. Feel free to open a new one if you're seeing buggy behaviour again.

WebworkrNet commented 8 months ago

The stream also stops if the ad blocker used crashes. As usual, the app uses the VPN interface to control network traffic. Otherwise, this would not be possible if the Android device is not rooted. It is understandable that the data stream stops. In this case, the ZAPP app does not rebuild the video stream. I'll have to check again whether this is true in every case or only occurs intermittently.