Switching rtmp published video elements during ongoing video call

Rahul

New Member
Is it possible to change the video element that has been published to rtmp while an ongoing video conference(many users) call(without user being asked for camera/mic permissions again?)
Also can we publish multiple video elements (something like split screen mode) to rtmp during a conference?
 

Max

Administrator
Staff member
Is it possible to change the video element that has been published to rtmp while an ongoing video conference(many users) call(without user being asked for camera/mic permissions again?)
No. You can't change publisher on the fly.
For example, you have WebRTC stream stream1 published to YouTube Live by RTMP to rtmp://host/live2/xy2-3m4c
Then to switch to stream2 you have to stop stream1 and stop stream2, then publish stream2 to the same RTMP URL rtmp://host/live2/xy2-3m4c
Code:
var stream1 = sesson.createStream({name:'stream1',rtmpUrl:'rtmp://host/live2/xy2-3m4c'}).publish();
var stream2 = sesson.createStream({name:'stream2'}).publish();
stream1.stop();
stream2.stop();
stream2 = sesson.createStream({name:'stream2', rtmpUrl:'rtmp://host/live2/xy2-3m4c'}).publish();
The switching will take a time. So it won't be on the fly switch.
without user being asked for camera/mic permissions again?
In Chrome if you are using HTTPS, you will not be asked on second visit of the page.
For example on our demo page: https://wcs5-eu.flashphoner.com
If you allowed camera and microphone once, your decision will be preserved in the browser and won't be asked again.
Also can we publish multiple video elements (something like split screen mode) to rtmp during a conference?
No. This feature is not currently supported but we are considering this in our roadmap.
 
Top