Skip to content

Instantly share code, notes, and snippets.

View shacharz's full-sized avatar

Shachar Zohar shacharz

  • Peer5
  • Palo Alto, CA
View GitHub Profile
(function (exports) {
function Dictionary(size, default_val) {
this.myDict = {}; //<keys : <val,index>>
this.keys = [];
if (size) {
if (!default_val) {
default_val = 1;
}
function PeerConnectionImpl(originId,targetId,initiator,reliability){
this.reliable = reliability;
this.originId = originId;
this.targetId = targetId;
//you can use adapter.js instead
if (window.webkitRTCPeerConnection) {
this.RTCPeerConnection = webkitRTCPeerConnection;
this.RTCSessionDescription = RTCSessionDescription;
} else if (window.mozRTCPeerConnection) {
//delete turn servers due to incompatablitiy now