SimformSolutionsPvtLtd / audio_waveforms

Use this plugin to generate waveforms while recording audio in any file formats supported by given encoders or from audio files. We can use gestures to scroll through the waveforms or seek to any position while playing audio and also style waveforms
https://pub.dev/packages/audio_waveforms
MIT License
280 stars 146 forks source link

PlayerController on iOS plays without sound (physical device only) #349

Open KestasVenslauskas opened 4 days ago

KestasVenslauskas commented 4 days ago

Describe the bug If a PlayerController is used to play audio file it plays without sound. It's waveform is visible and you can seek to parts of the audio but there is no sound. Once you use RecordController and record something then PlayerController starts to work with sound. This bug happens on physical iOS device only. Tried few different ones the outcome is the same.

To Reproduce

  1. Run the example app
  2. Before you record anything press play on any message
  3. Observe the problem
  4. Additionally - start & stop recording and then try playing any audio again.
  5. Problem is gone.

Expected behavior Player should play from cold start with sound.

Smartphone (please complete the following information):

Additional context This bug happens on physical iOS devices only.

jay-simformsolutions commented 3 days ago

Hi @KestasVenslauskas I have tried your issue from iOS 15 to 17 version but still it's not reproducible. Can you please share minimal reproducible code or more clarification on your issue?

iOS version: 16 device: iPhone 12

https://github.com/user-attachments/assets/e4cc8d23-844c-4a70-b80e-5da29d03fe08

KestasVenslauskas commented 3 days ago

I am able to reproduce it on the example project no need to any other repo. Not sure what is the trigger for the cause, it's important that you do not try to record before you press play. Even after you pressed record you have to re-build the app, flutter restart is not enough you have to kill the app and this issue should be present on first run

jay-simformsolutions commented 2 days ago

@KestasVenslauskas As you can see in the shared video, we are unable to reproduce the issue, so we’re unable to dig deeper. Just to double-check, are any other apps playing sound? If that is the case then you may try to use ios AudioSession to override this behavior.

suesitran commented 2 days ago

I second this issue. The behaviour is exactly as described,

When I use player controller, there's no sound although volume is max and waveform is animated.

But if I turn to record a short audio, then return to play audio, then audio works as normal.

lqchuong commented 1 day ago

I have the same issue on iOS device

https://github.com/user-attachments/assets/8004f2d8-c386-4adf-93d5-cbb6d91600ed