Open vinodvulupala opened 3 years ago
Hi there, I'm not very good with github, so perhaps email me to stephenanning@gmail.com , but I am trying to achieve this with audio only. So you're saying that your webRTC audio stream continued in the background when you had those background modes enabled?!
Hi @vinodvulupala and @riotbroadcast
I've encountered the same problem previously. This is not related to Ant Media, but to browsers. Modern browsers try to save battery by stopping rendering graphics & video when in background. If I remember correctly, this should not happen to outgoing WebRTC streams, like screen sharing, but I don't know the entire WebRTC specification.
My hacky workaround is to draw periodically the stream on canvas and only then send it to Ant Media. You could achieve that with setTimeout(), but this is again not reliable (when in a background, the browsers runs those tasks with lower frequency, it can even do not run it at all). That's why I decided to use a web worker (a script running on a separate thread, check MDN for info & examples):
@riotbroadcast I've never had issues with audio not being published, but I had issues with audio not being played on Safari. One option is to play it on an
Thank you for your great explanation @kputyra
Is there anything you want Ant Media team to take a look? @vinodvulupala @riotbroadcast
Btw, sorry for the late reply.
Our issue is on iOS and Android. The streams work perfectly when the devices are connected to Wi-Fi. Streams will not start on LTE/4g on iOS and on Android LTE/4g the streams will start but they constantly pause/drop out.
Warm regards, Stephen Anning 0403 881 700
Sent from Stephen's iPhone
On 26 Oct 2021, at 21:57, Ahmet Oğuz Mermerkaya @.***> wrote:
Thank you for your great explanation @kputyra
Is there anything you want Ant Media team to take a look? @vinodvulupala @riotbroadcast
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
We are also only streaming audio, we have video disabled.
Warm regards, Stephen Anning 0403 881 700
Sent from Stephen's iPhone
On 26 Oct 2021, at 22:48, Stephen Anning @.***> wrote:
Our issue is on iOS and Android. The streams work perfectly when the devices are connected to Wi-Fi. Streams will not start on LTE/4g on iOS and on Android LTE/4g the streams will start but they constantly pause/drop out.
Warm regards, Stephen Anning 0403 881 700
Sent from Stephen's iPhone
On 26 Oct 2021, at 21:57, Ahmet Oğuz Mermerkaya @.***> wrote:
Thank you for your great explanation @kputyra
Is there anything you want Ant Media team to take a look? @vinodvulupala @riotbroadcast
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Hi Stephen, I think the problem you're mentioning is not directly related to this issue.
Our issue is on iOS and Android. The streams work perfectly when the devices are connected to Wi-Fi. Streams will not start on LTE/4g on iOS and on Android LTE/4g the streams will start but they constantly pause/drop out.
Your problem seems like a connection issue. Workaround solution can be something using TURN server. Alternatively, we can schedule a meeting to understand the problem.
Hi Team,
I integrated Ant media in my project for screen sharing, it is working fine in Foreground mode, but when app enters in "background mode" screen sharing is pausing but still audio is working.Please let me know the way to work even in background mode.
Enabled background modes