SkyTubeTeam / SkyTube

Copylefted libre / open source YouTube player for Android
GNU General Public License v3.0
2.3k stars 320 forks source link

Dual, parallel audio playback on system event #1297

Open gryzor2 opened 1 month ago

gryzor2 commented 1 month ago

Describe the bug When some Android system event happens, the current playback of a downloaded video starts is restarted. Only one video stream is displayed, but I can hear the audio chanel twice. One is at the current time of the playback at the time of the system event, the other stream is the same video, but started at the start of the video.

To Reproduce Steps to reproduce the behavior:

  1. Download a video
  2. Playback the video
  3. While the video is playing, let a system event (such as "battery is now lower than 25%") occur.
  4. Current video keeps playing, but another audio instance of the same video is started in parallel.

Please note that "battery is now lower than 25%" is a real example that triggers the problem, but I'm quite convinced other events can trigger the same misbehavior.

Expected behavior System events should not impact playback this way. No dual playback should ever occur.

Setup:

Additional context Add any other context about the problem here.

drogga commented 1 month ago

You are a ver. behind, but I guess given that there are no changes made regarding this, that it will be the same with 2.990. Anyway, it was fixed before for the streaming, but it appears not for playback of the DLed.

Flavour: Oss or Extra, since you got it from F-Droid > Oss, I recommend switching to the releases from GitHub in future (this won't fix the issue and you will have to do a clean install, an update won't work, because the signatures are different).