bluefireteam / audioplayers

A Flutter package to play multiple audio files simultaneously (Android/iOS/web/Linux/Windows/macOS)
https://pub.dartlang.org/packages/audioplayers
MIT License
2.01k stars 844 forks source link

If a very short sound source is played exactly 10 times consecutively, the asset file is not recognized after that. #1472

Open kang86h opened 1 year ago

kang86h commented 1 year ago

Checklist

Current bug behaviour

This is a bug that has existed since version 3.0.1.

This happens when building for web and accessing this web from a device with an Android OS, but not when accessing from iOS or any other platform.

This is a bug that occurs when several very short sound sources of about 2 to 3 seconds are played in a hurry. As a result of repeated experiments, after playing exactly the 10th sound source on an Android phone, other asset files do not play or there is a problem with playback. has been created.

This did not occur when the playback interval of each sound source was played at some time interval.

Strangely, the problem does not occur until the 9th sound source, but the problem occurs the next time the 10th sound source is played.

Expected behaviour

Even if a short sound source is played repeatedly several times in a hurry, it should be played without problems and should not affect other asset files.

Steps to reproduce

  1. Execute flutter run on the code sample
  2. ...
  3. ...

The code I'm using only works on my site, so it's difficult to briefly write it here.

After making a sound source of about 2 to 3 seconds to be played on one audio player, each sound source is played 10 times in a hurry, and then other types of media files (such as video playback using a video player) cannot be called This happens.

I can't reproduce it briefly here, so I'm revealing the web application I've implemented and github.

https://github.com/kang86h/Dissonance_survey/tree/2b736945220ba0a787ffb2dbaefd35aa9d869518

My flutter project works only when built with the --no-sound-null-safety option added.

The web application is in Korean, but if you follow what I say, you will be able to reproduce it without difficulty.

This is an Android phone only issue.

https://dissonance-survey-1.web.app/#/main

This is a survey web application using audioplayer and videoplayer.

If you quickly play exactly 10 sound sources, including the sound source for volume control at the beginning of the survey, and then move on to the tutorial video step, the video file does not load.

Mysterious thing is, if you play it fast to exactly 9 times and move on to the step with the video, there is no problem.

And if you leave a time interval of about 2 seconds between each sound source, even if you play more than 10 sound sources, there will be no problem that the asset file is not loaded afterwards.

I am currently suffering from this problem very much. I'd appreciate it if you could resolve this issue as quickly as possible.

Code sample

Code sample ```dart void main() { } ```

Affected platforms

web

Platform details

It occurs when a web distribution is entered through an Android 12 and 13 device, and it does not occur when entered through a browser on iOS or Windows.

AudioPlayers Version

3.0.1, 4.0.1

Build mode

release

Audio Files/URLs/Sources

https://github.com/kang86h/Dissonance_survey

There is a sound source in asset here.

Screenshots

I am uploading a YouTube video of the problem that was not explained by the screenshot.

https://youtu.be/fOO-428PpGY

Logs

my relevant logs
Full Logs ``` my full logs or a link to a gist ``` Flutter doctor: ``` Output of: flutter doctor -v ```

Related issues / more information

No response

Working on PR

no way

kang86h commented 1 year ago

Oh.. And if there is also a problem, it has been a problem since the version older than version 3.0.1, when accessing the web application to the iOS platform, the volume cannot be adjusted within the browser. You can check it at the same hosting address.

Gustl22 commented 1 year ago

Thanks for the detailed explanation. Unfortunately I have not the resources / time to debug your code. I understand that this is frustrating, but maybe you can narrow down your steps, so that it fits in a project which is as minimal as possible to reproduce the issue, without any additional resources and packages needed. Plz understant that I would have to do the same :)