Presentation by Arin Sime, David Alfaro, and Mariana Lopez at the HTML5DevConf May 2014 in San Francisco. Overview of WebRTC and then what we learned in our first 6 months of using it to build a webinar tool.
20. Learnings: API’s are a big help
function publishStream(uuid) {
pubnub.publish({
user: uuid,
stream: myStream
});
pubnub.subscribe({
user: uuid,
stream: function (data, event) {
document.querySelector(‘#call-video’).src =
URL.createObjectUrl(event.stream);
},
disconnect: function (uuid, pc) {
document.querySelector(“#call-video”).src = “”;
$(document).trigger(“call:end”);
}
});
};
From: http://www.pubnub.com/developers/webrtc/
21. Learnings: Echoes not so helpful
agility_webrtc.showStream({ who : "presenter" , container : '#video'});
//If I'm the presenter, mute the video to prevent echos
$(”#video").prop('muted', true);