Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sound on iOS #73

Closed
scottynoshotty opened this issue Feb 11, 2024 · 5 comments
Closed

No sound on iOS #73

scottynoshotty opened this issue Feb 11, 2024 · 5 comments

Comments

@scottynoshotty
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

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

final session = await AudioSession.instance;
await session.configure(AudioSessionConfiguration.music());

@scottynoshotty
Copy link
Author

Hi Wang,

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

@yemin82
Copy link

yemin82 commented May 24, 2024

感谢,解决了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants