Created
October 4, 2022 11:03
-
-
Save valterbarros/becb07c8195bccbe2fbaddcbb1cb6b0f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var signalingChannel = new SignalingChannel(); | |
var pc = new RTCPeerConnection({}); | |
navigator.getUserMedia({ "audio": true }, gotStream, logError); | |
function gotStream(stream) { | |
pc.addStream(stream); | |
pc.createOffer(function(offer) { | |
pc.setLocalDescription(offer); | |
signalingChannel.send(offer.sdp); | |
}); | |
} | |
function logError() { ... } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment