Update SimpleWebRTC to 1.7.6

master
Daniel Berteaud 11 years ago
parent 6a916d7ba7
commit c2df8a16c6
  1. 166
      public/js/simplewebrtc.bundle.js

@ -172,7 +172,7 @@ SimpleWebRTC.prototype = Object.create(WildEmitter.prototype, {
SimpleWebRTC.prototype.leaveRoom = function () {
if (this.roomName) {
this.connection.emit('leave', this.roomName);
this.connection.emit('leave');
this.webrtc.peers.forEach(function (peer) {
peer.end();
});
@ -180,6 +180,7 @@ SimpleWebRTC.prototype.leaveRoom = function () {
this.stopScreenShare();
}
this.emit('leftRoom', this.roomName);
this.roomName = undefined;
}
};
@ -366,6 +367,7 @@ SimpleWebRTC.prototype.shareScreen = function (cb) {
}
});
} else {
err.media = 'screen';
self.emit('localMediaError', err);
}
@ -424,7 +426,45 @@ SimpleWebRTC.prototype.sendFile = function () {
module.exports = SimpleWebRTC;
},{"attachmediastream":5,"getscreenmedia":6,"mockconsole":7,"socket.io-client":8,"webrtc":2,"webrtcsupport":4,"wildemitter":3}],3:[function(require,module,exports){
},{"attachmediastream":5,"getscreenmedia":6,"mockconsole":7,"socket.io-client":8,"webrtc":2,"webrtcsupport":4,"wildemitter":3}],4:[function(require,module,exports){
// created by @HenrikJoreteg
var prefix;
var isChrome = false;
var isFirefox = false;
var ua = window.navigator.userAgent.toLowerCase();
// basic sniffing
if (ua.indexOf('firefox') !== -1) {
prefix = 'moz';
isFirefox = true;
} else if (ua.indexOf('chrome') !== -1) {
prefix = 'webkit';
isChrome = true;
}
var PC = window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate;
var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription;
var MediaStream = window.webkitMediaStream || window.MediaStream;
var screenSharing = window.location.protocol === 'https:' && window.navigator.userAgent.match('Chrome') && parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;
var AudioContext = window.webkitAudioContext || window.AudioContext;
// export support flags and constructors.prototype && PC
module.exports = {
support: !!PC,
dataChannel: isChrome || isFirefox || (PC && PC.prototype && PC.prototype.createDataChannel),
prefix: prefix,
webAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
mediaStream: !!(MediaStream && MediaStream.prototype.removeTrack),
screenSharing: !!screenSharing,
AudioContext: AudioContext,
PeerConnection: PC,
SessionDescription: SessionDescription,
IceCandidate: IceCandidate
};
},{}],3:[function(require,module,exports){
/*
WildEmitter.js is a slim little event emitter by @henrikjoreteg largely based
on @visionmedia's Emitter from UI Kit.
@ -561,44 +601,6 @@ WildEmitter.prototype.getWildcardCallbacks = function (eventName) {
return result;
};
},{}],4:[function(require,module,exports){
// created by @HenrikJoreteg
var prefix;
var isChrome = false;
var isFirefox = false;
var ua = window.navigator.userAgent.toLowerCase();
// basic sniffing
if (ua.indexOf('firefox') !== -1) {
prefix = 'moz';
isFirefox = true;
} else if (ua.indexOf('chrome') !== -1) {
prefix = 'webkit';
isChrome = true;
}
var PC = window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate;
var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription;
var MediaStream = window.webkitMediaStream || window.MediaStream;
var screenSharing = window.location.protocol === 'https:' && window.navigator.userAgent.match('Chrome') && parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;
var AudioContext = window.webkitAudioContext || window.AudioContext;
// export support flags and constructors.prototype && PC
module.exports = {
support: !!PC,
dataChannel: isChrome || isFirefox || (PC && PC.prototype && PC.prototype.createDataChannel),
prefix: prefix,
webAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
mediaStream: !!(MediaStream && MediaStream.prototype.removeTrack),
screenSharing: !!screenSharing,
AudioContext: AudioContext,
PeerConnection: PC,
SessionDescription: SessionDescription,
IceCandidate: IceCandidate
};
},{}],5:[function(require,module,exports){
module.exports = function (stream, el, options) {
var URL = window.URL;
@ -4605,44 +4607,6 @@ window.addEventListener('message', function (event) {
});
},{"getusermedia":9}],10:[function(require,module,exports){
// created by @HenrikJoreteg
var prefix;
var isChrome = false;
var isFirefox = false;
var ua = navigator.userAgent.toLowerCase();
// basic sniffing
if (ua.indexOf('firefox') !== -1) {
prefix = 'moz';
isFirefox = true;
} else if (ua.indexOf('chrome') !== -1) {
prefix = 'webkit';
isChrome = true;
}
var PC = window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate;
var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription;
var MediaStream = window.webkitMediaStream || window.MediaStream;
var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;
var AudioContext = window.webkitAudioContext || window.AudioContext;
// export support flags and constructors.prototype && PC
module.exports = {
support: !!PC,
dataChannel: isChrome || isFirefox || (PC && PC.prototype && PC.prototype.createDataChannel),
prefix: prefix,
webAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
mediaStream: !!(MediaStream && MediaStream.prototype.removeTrack),
screenSharing: !!screenSharing,
AudioContext: AudioContext,
PeerConnection: PC,
SessionDescription: SessionDescription,
IceCandidate: IceCandidate
};
},{}],11:[function(require,module,exports){
// getUserMedia helper by @HenrikJoreteg
var func = (navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
@ -4706,6 +4670,44 @@ module.exports = function (constraints, cb) {
});
};
},{}],11:[function(require,module,exports){
// created by @HenrikJoreteg
var prefix;
var isChrome = false;
var isFirefox = false;
var ua = navigator.userAgent.toLowerCase();
// basic sniffing
if (ua.indexOf('firefox') !== -1) {
prefix = 'moz';
isFirefox = true;
} else if (ua.indexOf('chrome') !== -1) {
prefix = 'webkit';
isChrome = true;
}
var PC = window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate;
var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription;
var MediaStream = window.webkitMediaStream || window.MediaStream;
var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;
var AudioContext = window.webkitAudioContext || window.AudioContext;
// export support flags and constructors.prototype && PC
module.exports = {
support: !!PC,
dataChannel: isChrome || isFirefox || (PC && PC.prototype && PC.prototype.createDataChannel),
prefix: prefix,
webAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
mediaStream: !!(MediaStream && MediaStream.prototype.removeTrack),
screenSharing: !!screenSharing,
AudioContext: AudioContext,
PeerConnection: PC,
SessionDescription: SessionDescription,
IceCandidate: IceCandidate
};
},{}],9:[function(require,module,exports){
// getUserMedia helper by @HenrikJoreteg
var func = (window.navigator.getUserMedia ||
@ -5231,7 +5233,7 @@ Peer.prototype.handleDataChannelAdded = function (channel) {
module.exports = WebRTC;
},{"getusermedia":11,"hark":13,"mediastream-gain":14,"mockconsole":7,"rtcpeerconnection":12,"webrtcsupport":10,"wildemitter":3}],15:[function(require,module,exports){
},{"getusermedia":10,"hark":13,"mediastream-gain":14,"mockconsole":7,"rtcpeerconnection":12,"webrtcsupport":11,"wildemitter":3}],15:[function(require,module,exports){
var events = require('events');
exports.isArray = isArray;
@ -7427,7 +7429,7 @@ PeerConnection.prototype.createDataChannel = function (name, opts) {
module.exports = PeerConnection;
},{"sdp-jingle-json":20,"traceablepeerconnection":19,"underscore":17,"util":15,"webrtcsupport":10,"wildemitter":18}],14:[function(require,module,exports){
},{"sdp-jingle-json":20,"traceablepeerconnection":19,"underscore":17,"util":15,"webrtcsupport":11,"wildemitter":18}],14:[function(require,module,exports){
var support = require('webrtcsupport');
@ -7474,7 +7476,7 @@ GainController.prototype.on = function () {
module.exports = GainController;
},{"webrtcsupport":10}],21:[function(require,module,exports){
},{"webrtcsupport":11}],21:[function(require,module,exports){
// shim for using process in browser
var process = module.exports = {};
@ -8230,7 +8232,7 @@ TraceablePeerConnection.prototype.getStats = function (callback, errback) {
module.exports = TraceablePeerConnection;
},{"util":15,"webrtcsupport":10,"wildemitter":18}],23:[function(require,module,exports){
},{"util":15,"webrtcsupport":11,"wildemitter":18}],23:[function(require,module,exports){
var parsers = require('./parsers');
var idCounter = Math.random();

Loading…
Cancel
Save