Jump to content
  • 1

Broadcast camera and screen as separate streams/tracks



Hello, everyone.

Using JavaScript SDK, when we are broadcasting in "screen+camera" mode, both streams are combined into one on the client side and sent to the server as a single stream.


Is there a way to broadcast camera and screen streams as a separate streams/tracks simultaneously?


  • Like 1
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

Hi @dmitry027

We are adding camera to stream with canvas in "screen+camera" option in our example. 

I have some options for you:

1- You may send 2 stream with seperately. One of them is screen, the other one is camera. On the viewer side, you can show streams with separated video tags.

2- Combine localstreams with canvas as "screen+camera" example. I'm adding guide pages to you:



I hope, I could help you.

Best Regards,


  • Like 1
Link to comment
Share on other sites

  • 0

Hello, @Selim. Thank you for your answer.

As far as I understand WebRTCAdaptor provides no ability to broadcast multiple streams simultaneously, as stated in webrtc_adaptor.js:

 * This is the Stream Id for the publisher. One @WebRCTCAdaptor supports only one publishing
 * session for now (23.02.2022).
 * ...
this.publishStreamId = null;

So, do I need to create two instances of WebRTCAdaptor (one for camera and one for screen) to broadcast them separately?

  • Like 1
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...