wang-bin / fvp

Flutter video player plugin for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp
BSD 3-Clause "New" or "Revised" License
197 stars 31 forks source link

No sound on iOS #73

Closed scottynoshotty closed 9 months ago

scottynoshotty commented 9 months ago

I am playing mp4s from my server. On Android videos load instantly and audio plays without issue. On iOS videos load instantly but there is no audio.

scottynoshotty commented 9 months ago

I identified the issue. The sound will only play if the phone's ringer is not on silent. The sound should play if the ringer is silent.

Other than that it is working great.

scottynoshotty commented 9 months ago

Also sound plays when you have headphones attached. The sound only doesn't play if the ringer is on silent and you are trying to play the video sound through the phone speakers

wang-bin commented 9 months ago

Can you try https://pub.dev/packages/audio_session

final session = await AudioSession.instance;
await session.configure(AudioSessionConfiguration.music());
scottynoshotty commented 9 months ago

Hi Wang,

I added those two lines to my main.dart main() function and it appears to have fixed it. Thanks!

yemin82 commented 6 months ago

感谢,解决了