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 when phone screen off or application is on background #65

Open
fullflash opened this issue Oct 17, 2022 · 4 comments
Open

no sound when phone screen off or application is on background #65

fullflash opened this issue Oct 17, 2022 · 4 comments

Comments

@fullflash
Copy link

there are plugins to achive this with playing audio files like https://pub.dev/packages/just_audio_background
but how to make it work with mediasoup consuming audio ?

@Blancduman
Copy link
Owner

Hello. You need permission to work in background.

@duyjack
Copy link

duyjack commented Jul 18, 2023

Hi @Blancduman ,

I have problem about audio in background at IOS. I have enabled VOIP at setting when build IOS but sometimes, I can't listen anyone even app consume success.
Do you have any idea for this?

@fullflash
Copy link
Author

Hello. You need permission to work in background.

we have configured project to support ios background modes for android you need permission to run foreground service but how to achieve running mediasoup when app is in background screen has been turned off and event when app is terminated.

<key>UIBackgroundModes</key>
	<array>
		<string>audio</string>
		<string>fetch</string>
		<string>remote-notification</string>
		<string>voip</string>
	</array>

@fullflash
Copy link
Author

in our to properly support push to talk you need to integrate IOS Native Push To Talk framework.
https://developer.apple.com/documentation/pushtotalk/creating_a_push_to_talk_app

we manage to play in the background, wake app from suspended state and even from terminated state.
The only issue is that this framework handles Audio Session and there is option to disable audio session handling for flutter_webrtc plugin.

image

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