Jump to content
  • 0

streamIdInUse: Close open WebRTC connections on client side?

lars schwarz


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


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



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...