Jump to content
  • 0

streamIdInUse: Close open WebRTC connections on client side?


lars schwarz
 Share

Question

Sometimes we experience the streamIdInUse error, because the user still has an open

connection on the same device, but in another tab/window. 

We tried to automatically tackle this by calling the REST API's /broadcasts/<streamid>/stop/ whenever the same client tries to connect/start publish, but due autoRepublishEnabled publishing will be resumed after a short break. 

Disabling autoRepublishEnabled doesn't seem to be a good idea, because doing so will cause more troubles. 

 

Anyone had the same issue and implemented a way to stop publishing across all open windows/tab on the client side?

 

Example scenario: User has an open tab/window (A) on mobile where he already started a broadcast/connection and forgot to stop the stream. He opens another tab/window (B) and see "streamIdInUse" when he tries to publish. 

 

Instead of telling him "check your open tabs/windows and disconnect" we want to this automatically. 

 

Thanks: Lars

Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0

Hi,

Thank you for your detailed explanation. Have you tried this REST command? https://antmedia.io/rest/#/BroadcastRestService/deleteBroadcast

Currently, there is no option to stop publishing across all open windows/tabs on the client side. But we might look into that if this issue is not solved here, you are always welcome to open a Github issue on Ant Media Server GitHub page https://github.com/ant-media/Ant-Media-Server/issues

Regards,
Cem

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...