Last active
August 29, 2015 14:10
-
-
Save ivmos/8ce6340f8870f6d91f0a to your computer and use it in GitHub Desktop.
Intro to WebRTC: the offer
This file contains 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
<video id="v"/> |
This file contains 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
error = function (error) { | |
console.log(error) | |
}; | |
pc = new webkitRTCPeerConnection({ | |
"iceServers": [] | |
}); | |
navigator.webkitGetUserMedia({ | |
video: true, | |
audio: true | |
}, | |
function (localMediaStream) { | |
pc.addStream(localMediaStream); | |
pc.createOffer(function (offer) { | |
pc.setLocalDescription(offer, function () { | |
console.log("Offer: \n", offer); | |
console.log(offer.sdp); | |
}); | |
}); | |
}, | |
error); |
This file contains 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
name: Intro to WebRTC | |
description: Let's offer! | |
authors: | |
- Iván Mosquera Paulo | |
normalize_css: no | |
wrap: l | |
panel_js: 0 | |
panel_css: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment