How to seamlessly switch from data only channel to video/audio in multitrack conference without re-initializing webrtc adaptor #5367
timantmedia
started this conversation in
General
Replies: 1 comment
-
Hi @timantmedia, In order to have a seamless switch, I've created an issue here Fortunately, we've already merged the development and SNAPSHOT release is already available in npmjs for testing. Let me quick info for the developers:
var webRTCAdaptor = new WebRTCAdaptor({
websocket_url: "wss://test.antmedia.io:5443/WebRTCAppEE/websocket",
localVideoElement: document.getElementById("localVideo"),
mediaConstraints: {
video:"dummy",
audio:"dummy"
}
});
webRTCAdaptor.publish("your_stream_id");
webRTCAdaptor.openStream({video:true, audio:true}, "your_stream_id"); Please pay attention that second parameter is critical and it is the stream id of your current active broadcast. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When a user joins a room, they start with
webrtcadaptor.onlyDataChannel = true
(data channel only), Then they can start a video or audio call.When sending the command
webrtcadaptor.onlyDataChannel = false;
and then start a video or audio stream the Id of the A/V stream is changed to a new stream id (not the same id as when in datachannel only).It appears that when switching from
webrtcadaptor.onlyDataChannel = true
towebrtcadaptor.onlyDataChannel = false
, the connection is disconnected and a new connection is established with a new stream ID of the A/V stream.What is needed is to go from datachannel only mode to normal conference mode without closing the datachannel connection and reconnecting with
webrtcadaptor.onlyDataChannel = true
, basically dynamically switches from one mode to the other maintaining the connection and the same stream id.It seems to me when starting a live stream with
onlyDataChannel=true
then no video/audio track is created, so trying to then turn on the video/audio when the data channel is already publishing, an error is triggerederror callback: "already_publishing"
.So how is it possible to create a video track on the fly when already publishing the data channel?
Beta Was this translation helpful? Give feedback.
All reactions