I want to make a data channel for the local peer connection and remote peer connection to connect to.
Can I run peerConnection.createDataChannel('datachannel');
on BOTH the local and remote clients so that they both connect to the same data channel? Or does the caller (aka the client running createOffer
) have to be the one to run this command and the answerer (aka the client running createAnswer
) have to run peerConnection.ondatachannel = ...
?
Just trying to see if I can simplify it or if the caller has to be the one to create the data channel.