Update to version v2.2.0

pull/88/merge v2.2.0
jenkinsopenvidu 2018-06-27 14:29:31 +00:00
parent 82d69bf05a
commit 863c0bf96a
42 changed files with 7908 additions and 187704 deletions

View File

@ -40,7 +40,7 @@ export declare class Connection {
/**
* @hidden
*/
sendIceCandidate(candidate: any): void;
sendIceCandidate(candidate: RTCIceCandidate): void;
/**
* @hidden
*/

View File

@ -1 +1 @@
{"version":3,"file":"Connection.js","sourceRoot":"","sources":["../../src/OpenVidu/Connection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAGH,mCAAkC;AAOlC;;;GAGG;AACH;IAiCI;;OAEG;IACH,oBAAoB,OAAgB,EAAE,IAAwB;QAA1C,YAAO,GAAP,OAAO,CAAS;QARpC;;WAEG;QACH,aAAQ,GAAG,KAAK,CAAC;QAOb,IAAI,GAAG,GAAG,uBAAuB,CAAC;QAClC,IAAI,CAAC,CAAC,IAAI,EAAE;YACR,GAAG,IAAI,gCAAgC,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;SAC3D;aAAM;YACH,GAAG,IAAI,SAAS,CAAC;SACpB;QACD,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,CAAC,IAAI,EAAE;YACR,uBAAuB;YACvB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC;YAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;aAC7B;YACD,IAAI,IAAI,CAAC,OAAO,EAAE;gBACd,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACxC;SACJ;QAED,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAC7C,CAAC;IAGD,oBAAoB;IAEpB;;OAEG;IACH,qCAAgB,GAAh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BACzB,SAAS,EAAE,IAAI,CAAC,WAAW;gBAC3B,SAAS,EAAE,IAAI,CAAC,WAAW;gBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;aAChC,CAAC;YACF,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,KAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YAEvD,KAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,IAAI,CAAC,2CAA2C,GAAG,IAAI,CAAC,YAAY,GAAG,0DAA0D,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC9K,CAAC;IAED;;OAEG;IACH,8BAAS,GAAT,UAAU,MAAc;QACpB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,iCAAY,GAAZ,UAAa,QAAgB;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,4BAAO,GAAP;QACI,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,CAAC,MAAM,CAAC;SACtB;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;IAEL,iBAAC;AAAD,CAAC,AAvID,IAuIC;AAvIY,gCAAU"}

View File

@ -27,6 +27,14 @@ export declare class OpenVidu {
* @hidden
*/
recorder: boolean;
/**
* @hidden
*/
iceServers: RTCIceServer[];
/**
* @hidden
*/
role: string;
/**
* @hidden
*/

View File

@ -328,38 +328,40 @@ var OpenVidu = /** @class */ (function () {
}
if (!!publisherProperties.videoSource && typeof publisherProperties.videoSource === 'string') {
if (publisherProperties.videoSource === 'screen') {
if (platform.name !== 'Chrome' && platform.name !== 'Firefox') {
if (platform.name !== 'Chrome' && platform.name.indexOf('Firefox') === -1) {
var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED, 'You can only screen share in desktop Chrome and Firefox. Detected browser: ' + platform.name);
console.error(error);
reject(error);
}
else {
if (!!_this.advancedConfiguration.screenShareChromeExtension) {
if (!!_this.advancedConfiguration.screenShareChromeExtension && !(platform.name.indexOf('Firefox') !== -1)) {
// Custom screen sharing extension for Chrome
var extensionId = _this.advancedConfiguration.screenShareChromeExtension.split('/').pop().trim();
screenSharing.getChromeExtensionStatus(extensionId, function (status) {
if (status === 'installed-enabled') {
screenSharing.getScreenConstraints(function (error, screenConstraints) {
if (!!error && error === 'permission-denied') {
var error_1 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');
console.error(error_1);
reject(error_1);
}
else {
mediaConstraints.video = screenConstraints;
resolve(mediaConstraints);
}
});
screenSharing.getScreenConstraints(function (error, screenConstraints) {
if (!!error || !!screenConstraints.mandatory && screenConstraints.mandatory.chromeMediaSource === 'screen') {
if (error === 'permission-denied' || error === 'PermissionDeniedError') {
var error_1 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');
console.error(error_1);
reject(error_1);
}
else {
var extensionId = _this.advancedConfiguration.screenShareChromeExtension.split('/').pop().trim();
screenSharing.getChromeExtensionStatus(extensionId, function (status) {
if (status === 'installed-disabled') {
var error_2 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');
console.error(error_2);
reject(error_2);
}
if (status === 'not-installed') {
var error_3 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, _this.advancedConfiguration.screenShareChromeExtension);
console.error(error_3);
reject(error_3);
}
});
}
}
if (status === 'installed-disabled') {
var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');
console.error(error);
reject(error);
}
if (status === 'not-installed') {
var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, _this.advancedConfiguration.screenShareChromeExtension);
console.error(error);
reject(error);
else {
mediaConstraints.video = screenConstraints;
resolve(mediaConstraints);
}
});
}
@ -368,20 +370,22 @@ var OpenVidu = /** @class */ (function () {
screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {
if (!!error) {
if (error === 'not-installed') {
var error_2 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');
console.error(error_2);
reject(error_2);
}
else if (error === 'installed-disabled') {
var error_3 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');
console.error(error_3);
reject(error_3);
}
else if (error === 'permission-denied') {
var error_4 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');
var extensionUrl = !!_this.advancedConfiguration.screenShareChromeExtension ? _this.advancedConfiguration.screenShareChromeExtension :
'https://chrome.google.com/webstore/detail/openvidu-screensharing/lfcgfepafnobdloecchnfaclibenjold';
var error_4 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, extensionUrl);
console.error(error_4);
reject(error_4);
}
else if (error === 'installed-disabled') {
var error_5 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');
console.error(error_5);
reject(error_5);
}
else if (error === 'permission-denied') {
var error_6 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');
console.error(error_6);
reject(error_6);
}
}
else {
mediaConstraints.video = screenConstraints.video;
@ -423,7 +427,7 @@ var OpenVidu = /** @class */ (function () {
onreconnected: this.reconnectedCallback.bind(this)
},
rpc: {
requestTimeout: 15000,
requestTimeout: 10000,
participantJoined: this.session.onParticipantJoined.bind(this.session),
participantPublished: this.session.onParticipantPublished.bind(this.session),
participantUnpublished: this.session.onParticipantUnpublished.bind(this.session),

File diff suppressed because one or more lines are too long

View File

@ -65,7 +65,9 @@ var Publisher = /** @class */ (function (_super) {
* @param value `true` to publish the audio stream, `false` to unpublish it
*/
Publisher.prototype.publishAudio = function (value) {
this.stream.getWebRtcPeer().audioEnabled = value;
this.stream.getMediaStream().getAudioTracks().forEach(function (track) {
track.enabled = value;
});
console.info("'Publisher' has " + (value ? 'published' : 'unpublished') + ' its audio stream');
};
/**
@ -73,7 +75,9 @@ var Publisher = /** @class */ (function (_super) {
* @param value `true` to publish the video stream, `false` to unpublish it
*/
Publisher.prototype.publishVideo = function (value) {
this.stream.getWebRtcPeer().videoEnabled = value;
this.stream.getMediaStream().getVideoTracks().forEach(function (track) {
track.enabled = value;
});
console.info("'Publisher' has " + (value ? 'published' : 'unpublished') + ' its video stream');
};
/**

File diff suppressed because one or more lines are too long

View File

@ -579,16 +579,17 @@ var Session = /** @class */ (function () {
var candidate = {
candidate: msg.candidate,
sdpMid: msg.sdpMid,
sdpMLineIndex: msg.sdpMLineIndex
sdpMLineIndex: msg.sdpMLineIndex,
toJSON: function () {
return { candidate: msg.candidate };
}
};
this.getConnection(msg.endpointName, 'Connection not found for endpoint ' + msg.endpointName + '. Ice candidate will be ignored: ' + candidate)
.then(function (connection) {
var stream = connection.stream;
stream.getWebRtcPeer().addIceCandidate(candidate, function (error) {
if (error) {
console.error('Error adding candidate for ' + stream.streamId
+ ' stream of endpoint ' + msg.endpointName + ': ' + error);
}
stream.getWebRtcPeer().addIceCandidate(candidate)["catch"](function (error) {
console.error('Error adding candidate for ' + stream.streamId
+ ' stream of endpoint ' + msg.endpointName + ': ' + error);
});
})["catch"](function (openViduError) {
console.error(openViduError);
@ -613,14 +614,16 @@ var Session = /** @class */ (function () {
* @hidden
*/
Session.prototype.onLostConnection = function () {
if (!this.connection) {
/*if (!this.connection) {
console.warn('Not connected to session: if you are not debugging, this is probably a certificate error');
var url = 'https://' + this.openvidu.getWsUri().split('wss://')[1].split('/openvidu')[0];
const url = 'https://' + this.openvidu.getWsUri().split('wss://')[1].split('/openvidu')[0];
if (window.confirm('If you are not debugging, this is probably a certificate error at \"' + url + '\"\n\nClick OK to navigate and accept it')) {
location.assign(url + '/accept-certificate');
}
return;
}
}*/
console.warn('Lost connection in Session ' + this.sessionId);
if (!!this.sessionId && !this.connection.disposed) {
this.leave(true, 'networkDisconnect');
@ -801,12 +804,28 @@ var Session = /** @class */ (function () {
this.sessionId = url.searchParams.get('sessionId');
var secret = url.searchParams.get('secret');
var recorder = url.searchParams.get('recorder');
var turnUsername = url.searchParams.get('turnUsername');
var turnCredential = url.searchParams.get('turnCredential');
var role = url.searchParams.get('role');
if (!!secret) {
this.openvidu.secret = secret;
}
if (!!recorder) {
this.openvidu.recorder = true;
}
if (!!turnUsername && !!turnCredential) {
var stunUrl = 'stun:' + url.hostname + ':3478';
var turnUrl1 = 'turn:' + url.hostname + ':3478';
var turnUrl2 = turnUrl1 + '?transport=tcp';
this.openvidu.iceServers = [
{ urls: [stunUrl] },
{ urls: [turnUrl1, turnUrl2], username: turnUsername, credential: turnCredential }
];
console.log('TURN temp credentials [' + turnUsername + ':' + turnCredential + ']');
}
if (!!role) {
this.openvidu.role = role;
}
this.openvidu.wsUri = 'wss://' + url.host + '/openvidu';
};
return Session;

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,7 @@ import { Session } from './Session';
import { StreamManager } from './StreamManager';
import { InboundStreamOptions } from '../OpenViduInternal/Interfaces/Private/InboundStreamOptions';
import { OutboundStreamOptions } from '../OpenViduInternal/Interfaces/Private/OutboundStreamOptions';
import { WebRtcPeer } from '../OpenViduInternal/WebRtcPeer/WebRtcPeer';
import EventEmitter = require('wolfy87-eventemitter');
/**
* Represents each one of the media streams available in OpenVidu Server for certain session.
@ -90,7 +91,7 @@ export declare class Stream {
/**
* @hidden
*/
getWebRtcPeer(): any;
getWebRtcPeer(): WebRtcPeer;
/**
* @hidden
*/
@ -151,13 +152,26 @@ export declare class Stream {
* @hidden
*/
disableSpeakingEvents(): void;
private initWebRtcPeerSend;
private initWebRtcPeerReceive;
private processSdpAnswer;
private initWebRtcStats;
private stopWebRtcStats;
/**
* @hidden
*/
isLocal(): boolean;
/**
* @hidden
*/
getSelectedIceCandidate(): Promise<any>;
/**
* @hidden
*/
getRemoteIceCandidateList(): RTCIceCandidate[];
/**
* @hidden
*/
getLocalIceCandidateList(): RTCIceCandidate[];
private initWebRtcPeerSend;
private initWebRtcPeerReceive;
private remotePeerSuccesfullyEstablished;
private initWebRtcStats;
private stopWebRtcStats;
private getIceServersConf;
}

View File

@ -16,10 +16,11 @@
*
*/
exports.__esModule = true;
var WebRtcPeer_1 = require("../OpenViduInternal/WebRtcPeer/WebRtcPeer");
var WebRtcStats_1 = require("../OpenViduInternal/WebRtcStats/WebRtcStats");
var PublisherSpeakingEvent_1 = require("../OpenViduInternal/Events/PublisherSpeakingEvent");
var EventEmitter = require("wolfy87-eventemitter");
var kurentoUtils = require("../OpenViduInternal/KurentoUtils/kurento-utils-js");
var hark = require("hark");
/**
* Represents each one of the media streams available in OpenVidu Server for certain session.
* Each [[Publisher]] and [[Subscriber]] has an attribute of type Stream, as they give access
@ -59,17 +60,14 @@ var Stream = /** @class */ (function () {
this.outboundStreamOpts = options;
if (this.isSendVideo()) {
if (this.isSendScreen()) {
this.streamId = 'SCREEN';
this.typeOfVideo = 'SCREEN';
}
else {
this.streamId = 'CAMERA';
this.typeOfVideo = 'CAMERA';
}
this.frameRate = this.outboundStreamOpts.publisherProperties.frameRate;
}
else {
this.streamId = 'MICRO';
delete this.typeOfVideo;
}
this.hasAudio = this.isSendAudio();
@ -109,7 +107,7 @@ var Stream = /** @class */ (function () {
* @hidden
*/
Stream.prototype.getRTCPeerConnection = function () {
return this.webRtcPeer.peerConnection;
return this.webRtcPeer.pc;
};
/**
* @hidden
@ -228,7 +226,7 @@ var Stream = /** @class */ (function () {
var harkOptions = this.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions || {};
harkOptions.interval = (typeof harkOptions.interval === 'number') ? harkOptions.interval : 50;
harkOptions.threshold = (typeof harkOptions.threshold === 'number') ? harkOptions.threshold : -50;
this.speechEvent = kurentoUtils.WebRtcPeer.hark(this.mediaStream, harkOptions);
this.speechEvent = hark(this.mediaStream, harkOptions);
}
};
/**
@ -266,6 +264,35 @@ var Stream = /** @class */ (function () {
this.speechEvent.stop();
this.speechEvent = undefined;
};
/**
* @hidden
*/
Stream.prototype.isLocal = function () {
// inbound options undefined and outbound options defined
return (!this.inboundStreamOpts && !!this.outboundStreamOpts);
};
/**
* @hidden
*/
Stream.prototype.getSelectedIceCandidate = function () {
var _this = this;
return new Promise(function (resolve, reject) {
_this.webRtcStats.getSelectedIceCandidateInfo()
.then(function (report) { return resolve(report); })["catch"](function (error) { return reject(error); });
});
};
/**
* @hidden
*/
Stream.prototype.getRemoteIceCandidateList = function () {
return this.webRtcPeer.remoteCandidatesQueue;
};
/**
* @hidden
*/
Stream.prototype.getLocalIceCandidateList = function () {
return this.webRtcPeer.localCandidatesQueue;
};
/* Private methods */
Stream.prototype.initWebRtcPeerSend = function () {
var _this = this;
@ -275,15 +302,13 @@ var Stream = /** @class */ (function () {
video: _this.isSendVideo()
};
var options = {
videoStream: _this.mediaStream,
mediaStream: _this.mediaStream,
mediaConstraints: userMediaConstraints,
onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection),
iceServers: _this.session.openvidu.advancedConfiguration.iceServers
iceServers: _this.getIceServersConf(),
simulcast: false
};
var successCallback = function (error, sdpOfferParam, wp) {
if (error) {
reject(new Error('(publish) SDP offer error: ' + JSON.stringify(error)));
}
var successCallback = function (sdpOfferParam) {
console.debug('Sending SDP offer to publish as '
+ _this.streamId, sdpOfferParam);
_this.session.openvidu.sendRequest('publishVideo', {
@ -298,15 +323,15 @@ var Stream = /** @class */ (function () {
reject('Error on publishVideo: ' + JSON.stringify(error));
}
else {
_this.processSdpAnswer(response.sdpAnswer)
_this.webRtcPeer.processAnswer(response.sdpAnswer)
.then(function () {
_this.streamId = response.id;
_this.isLocalStreamPublished = true;
if (_this.displayMyRemote()) {
// If remote now we can set the srcObject value of video elements
// 'streamPlaying' event will be triggered
_this.updateMediaStreamInVideos();
_this.remotePeerSuccesfullyEstablished();
}
_this.ee.emitEvent('stream-created-by-publisher');
_this.initWebRtcStats();
resolve();
})["catch"](function (error) {
reject(error);
@ -316,21 +341,16 @@ var Stream = /** @class */ (function () {
});
};
if (_this.displayMyRemote()) {
_this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (err) {
if (err) {
reject(err);
}
_this.webRtcPeer.generateOffer(successCallback);
});
_this.webRtcPeer = new WebRtcPeer_1.WebRtcPeerSendrecv(options);
}
else {
_this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) {
if (error) {
reject(error);
}
_this.webRtcPeer.generateOffer(successCallback);
});
_this.webRtcPeer = new WebRtcPeer_1.WebRtcPeerSendonly(options);
}
_this.webRtcPeer.generateOffer().then(function (offer) {
successCallback(offer);
})["catch"](function (error) {
reject(new Error('(publish) SDP offer error: ' + JSON.stringify(error)));
});
});
};
Stream.prototype.initWebRtcPeerReceive = function () {
@ -343,12 +363,11 @@ var Stream = /** @class */ (function () {
console.debug("'Session.subscribe(Stream)' called. Constraints of generate SDP offer", offerConstraints);
var options = {
onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection),
mediaConstraints: offerConstraints
mediaConstraints: offerConstraints,
iceServers: _this.getIceServersConf(),
simulcast: false
};
var successCallback = function (error, sdpOfferParam, wp) {
if (error) {
reject(new Error('(subscribe) SDP offer error: ' + JSON.stringify(error)));
}
var successCallback = function (sdpOfferParam) {
console.debug('Sending SDP offer to subscribe to '
+ _this.streamId, sdpOfferParam);
_this.session.openvidu.sendRequest('receiveVideoFrom', {
@ -359,7 +378,9 @@ var Stream = /** @class */ (function () {
reject(new Error('Error on recvVideoFrom: ' + JSON.stringify(error)));
}
else {
_this.processSdpAnswer(response.sdpAnswer).then(function () {
_this.webRtcPeer.processAnswer(response.sdpAnswer).then(function () {
_this.remotePeerSuccesfullyEstablished();
_this.initWebRtcStats();
resolve();
})["catch"](function (error) {
reject(error);
@ -367,42 +388,24 @@ var Stream = /** @class */ (function () {
}
});
};
_this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) {
if (error) {
reject(error);
}
_this.webRtcPeer.generateOffer(successCallback);
_this.webRtcPeer = new WebRtcPeer_1.WebRtcPeerRecvonly(options);
_this.webRtcPeer.generateOffer()
.then(function (offer) {
successCallback(offer);
})["catch"](function (error) {
reject(new Error('(subscribe) SDP offer error: ' + JSON.stringify(error)));
});
});
};
Stream.prototype.processSdpAnswer = function (sdpAnswer) {
var _this = this;
return new Promise(function (resolve, reject) {
var answer = new RTCSessionDescription({
type: 'answer',
sdp: sdpAnswer
});
console.debug(_this.streamId + ': set peer connection with recvd SDP answer', sdpAnswer);
var streamId = _this.streamId;
var peerConnection = _this.webRtcPeer.peerConnection;
peerConnection.setRemoteDescription(answer, function () {
// Update remote MediaStream object except when local stream
if (!_this.isLocal() || _this.displayMyRemote()) {
_this.mediaStream = peerConnection.getRemoteStreams()[0];
console.debug('Peer remote stream', _this.mediaStream);
if (!!_this.mediaStream) {
_this.ee.emitEvent('mediastream-updated');
if (!!_this.mediaStream.getAudioTracks()[0] && _this.session.speakingEventsEnabled) {
_this.enableSpeakingEvents();
}
}
}
_this.initWebRtcStats();
resolve();
}, function (error) {
reject(new Error(_this.streamId + ': Error setting SDP to the peer connection: ' + JSON.stringify(error)));
});
});
Stream.prototype.remotePeerSuccesfullyEstablished = function () {
this.mediaStream = this.webRtcPeer.pc.getRemoteStreams()[0];
console.debug('Peer remote stream', this.mediaStream);
if (!!this.mediaStream) {
this.ee.emitEvent('mediastream-updated');
if (!this.displayMyRemote() && !!this.mediaStream.getAudioTracks()[0] && this.session.speakingEventsEnabled) {
this.enableSpeakingEvents();
}
}
};
Stream.prototype.initWebRtcStats = function () {
this.webRtcStats = new WebRtcStats_1.WebRtcStats(this);
@ -413,12 +416,20 @@ var Stream = /** @class */ (function () {
this.webRtcStats.stopWebRtcStats();
}
};
/**
* @hidden
*/
Stream.prototype.isLocal = function () {
// inbound options undefined and outbound options defined
return (!this.inboundStreamOpts && !!this.outboundStreamOpts);
Stream.prototype.getIceServersConf = function () {
var returnValue;
if (!!this.session.openvidu.advancedConfiguration.iceServers) {
returnValue = this.session.openvidu.advancedConfiguration.iceServers === 'freeice' ?
undefined :
this.session.openvidu.advancedConfiguration.iceServers;
}
else if (this.session.openvidu.iceServers) {
returnValue = this.session.openvidu.iceServers;
}
else {
returnValue = undefined;
}
return returnValue;
};
return Stream;
}());

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,12 @@
/**
* See [[OpenVidu.setAdvancedConfiguration]]
*/
export interface OpenViduAdvancedConfiguration {
/**
* Array of [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer) to be used by OpenVidu Browser instead of the default free ice server array (got from [freeice](https://github.com/DamonOehlman/freeice) library)
* Array of [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer) to be used by OpenVidu Browser. By default OpenVidu will generate the required credentials to use the COTURN server hosted along OpenVidu Server
* You can also set this property to string 'freeice' to force the use of free STUN servers instead (got thanks to [freeice](https://github.com/DamonOehlman/freeice) library).
*/
iceServers?: RTCIceServer[];
iceServers?: RTCIceServer[] | string;
/**
* URL to a custom screen share extension for Chrome (always based on ours: [openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension)) to be used instead of the default one.
* Must be something like this: `https://chrome.google.com/webstore/detail/YOUR_WEBSTORE_EXTENSION_NAME/YOUR_EXTENSION_ID`

View File

@ -1,4 +1,10 @@
window.getScreenId = function (callback) {
window.getScreenId = function (callback, custom_parameter) {
if (navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveOrOpenBlob || !!navigator.msSaveBlob)) {
callback({
video: true
});
return;
}
if (!!navigator.mozGetUserMedia) {
callback(null, 'firefox', {
video: {
@ -17,7 +23,7 @@ window.getScreenId = function (callback) {
callback('permission-denied');
}
else {
callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId));
callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId, event.data.canRequestAudioTrack));
}
window.removeEventListener('message', onIFrameCallback);
}
@ -26,9 +32,16 @@ window.getScreenId = function (callback) {
window.removeEventListener('message', onIFrameCallback);
}
}
setTimeout(postGetSourceIdMessage, 100);
if (!custom_parameter) {
setTimeout(postGetSourceIdMessage, 100);
}
else {
setTimeout(function () {
postGetSourceIdMessage(custom_parameter);
}, 100);
}
};
function getScreenConstraints(error, sourceId) {
function getScreenConstraints(error, sourceId, canRequestAudioTrack) {
var screen_constraints = {
audio: false,
video: {
@ -40,25 +53,64 @@ function getScreenConstraints(error, sourceId) {
optional: []
}
};
if (!!canRequestAudioTrack) {
screen_constraints.audio = {
mandatory: {
chromeMediaSource: error ? 'screen' : 'desktop',
},
optional: []
};
}
if (sourceId) {
screen_constraints.video.mandatory.chromeMediaSourceId = sourceId;
if (screen_constraints.audio && screen_constraints.audio.mandatory) {
screen_constraints.audio.mandatory.chromeMediaSourceId = sourceId;
}
}
return screen_constraints;
}
var iframe;
function postGetSourceIdMessage() {
function postGetSourceIdMessage(custom_parameter) {
if (!iframe) {
loadIFrame(postGetSourceIdMessage);
loadIFrame(function () {
postGetSourceIdMessage(custom_parameter);
});
return;
}
if (!iframe.isLoaded) {
setTimeout(postGetSourceIdMessage, 100);
setTimeout(function () {
postGetSourceIdMessage(custom_parameter);
}, 100);
return;
}
iframe.contentWindow.postMessage({
captureSourceId: true
}, '*');
if (!custom_parameter) {
iframe.contentWindow.postMessage({
captureSourceId: true
}, '*');
}
else if (!!custom_parameter.forEach) {
iframe.contentWindow.postMessage({
captureCustomSourceId: custom_parameter
}, '*');
}
else {
iframe.contentWindow.postMessage({
captureSourceIdWithAudio: true
}, '*');
}
}
var iframe;
window.getScreenConstraints = function (callback) {
loadIFrame(function () {
getScreenId(function (error, sourceId, screen_constraints) {
if (!screen_constraints) {
screen_constraints = {
video: true
};
}
callback(error, screen_constraints.video);
});
});
};
function loadIFrame(loadCallback) {
if (iframe) {
loadCallback();
@ -69,7 +121,7 @@ function loadIFrame(loadCallback) {
iframe.isLoaded = true;
loadCallback();
};
iframe.src = 'https://www.webrtc-experiment.com/getSourceId/';
iframe.src = 'https://openvidu.github.io/openvidu-screen-sharing-chrome-extension/';
iframe.style.display = 'none';
(document.body || document.documentElement).appendChild(iframe);
}
@ -84,8 +136,8 @@ window.getChromeExtensionStatus = function (callback) {
return;
if (event.data.chromeExtensionStatus) {
callback(event.data.chromeExtensionStatus);
window.removeEventListener('message', onIFrameCallback);
}
window.removeEventListener('message', onIFrameCallback);
}
setTimeout(postGetChromeExtensionStatusMessage, 100);
};

View File

@ -1 +1 @@
{"version":3,"file":"Screen-Capturing-Auto.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js"],"names":[],"mappings":"AAuBA,MAAM,CAAC,WAAW,GAAG,UAAU,QAAQ;IAInC,IAAI,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE;QAC7B,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE;YACtB,KAAK,EAAE;gBACH,cAAc,EAAE,QAAQ;gBACxB,WAAW,EAAE,QAAQ;aACxB;SACJ,CAAC,CAAC;QACH,OAAO;KACV;IAED,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IAEr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ACpE,CAAC;AAED,MAAM,CAAC,wBAAwB,GAAG,UAAU,QAAQ;IAEhD,IAAI,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE;QAC7B,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC9B,OAAO;KACV;IAED,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IAErD,0BAA0B,KAAK;QAC3B,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,OAAO;QAExB,IAAI,KAAK,CAAC,IAAI,CAAC,qBAAqB,EAAE;YAClC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YAG3C,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;SAC3D;IACL,CAAC;IAED,UAAU,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAC;AACzD,CAAC,CAAC;AAEF;IACI,IAAI,CAAC,MAAM,EAAE;QACT,UAAU,CAAC,mCAAmC,CAAC,CAAC;QAChD,OAAO;KACV;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QAClB,UAAU,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAC;QACrD,OAAO;KACV;IAED,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC;QAC7B,wBAAwB,EAAE,IAAI;KACjC,EAAE,GAAG,CAAC,CAAC;AACZ,CAAC;AAED,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC"}

View File

@ -1,4 +1,5 @@
var chromeMediaSource = 'screen';
var sourceId;
var screenCallback;
var isFirefox = typeof window.InstallTrigger !== 'undefined';
var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
@ -11,7 +12,6 @@ window.addEventListener('message', function (event) {
});
function onMessageCallback(data) {
if (data == 'PermissionDeniedError') {
chromeMediaSource = 'PermissionDeniedError';
if (screenCallback)
return screenCallback('PermissionDeniedError');
else
@ -21,21 +21,21 @@ function onMessageCallback(data) {
chromeMediaSource = 'desktop';
}
if (data.sourceId && screenCallback) {
screenCallback(sourceId = data.sourceId);
screenCallback(sourceId = data.sourceId, data.canRequestAudioTrack === true);
}
}
function isChromeExtensionAvailable(callback) {
if (isFirefox)
return callback(false);
if (!callback)
return;
if (chromeMediaSource == 'desktop')
return callback('isFirefox');
return callback(true);
window.postMessage('are-you-there', '*');
setTimeout(function () {
if (chromeMediaSource == 'screen') {
callback('unavailable');
callback(false);
}
else
callback('available');
callback(true);
}, 2000);
}
function getSourceId(callback) {
@ -46,12 +46,32 @@ function getSourceId(callback) {
screenCallback = callback;
window.postMessage('get-sourceId', '*');
}
function getCustomSourceId(arr, callback) {
if (!arr || !arr.forEach)
throw '"arr" parameter is mandatory and it must be an array.';
if (!callback)
throw '"callback" parameter is mandatory.';
if (sourceId)
return callback(sourceId);
screenCallback = callback;
window.postMessage({
'get-custom-sourceId': arr
}, '*');
}
function getSourceIdWithAudio(callback) {
if (!callback)
throw '"callback" parameter is mandatory.';
if (sourceId)
return callback(sourceId);
screenCallback = callback;
window.postMessage('audio-plus-tab', '*');
}
function getChromeExtensionStatus(extensionid, callback) {
if (isFirefox)
return callback('not-chrome');
if (arguments.length != 2) {
callback = extensionid;
extensionid = 'ajhifddimkapgcifgcodmmfdlknahffk';
extensionid = 'lfcgfepafnobdloecchnfaclibenjold';
}
var image = document.createElement('img');
image.src = 'chrome-extension://' + extensionid + '/icon.png';
@ -60,7 +80,7 @@ function getChromeExtensionStatus(extensionid, callback) {
window.postMessage('are-you-there', '*');
setTimeout(function () {
if (chromeMediaSource == 'screen') {
callback(extensionid == extensionid ? 'installed-enabled' : 'installed-disabled');
callback('installed-disabled');
}
else
callback('installed-enabled');
@ -70,7 +90,10 @@ function getChromeExtensionStatus(extensionid, callback) {
callback('not-installed');
};
}
function getScreenConstraints(callback) {
function getScreenConstraintsWithAudio(callback) {
getScreenConstraints(callback, true);
}
function getScreenConstraints(callback, captureSourceIdWithAudio) {
sourceId = '';
var firefoxScreenConstraints = {
mozMediaSource: 'window',
@ -87,10 +110,21 @@ function getScreenConstraints(callback) {
optional: []
};
if (chromeMediaSource == 'desktop' && !sourceId) {
getSourceId(function () {
screen_constraints.mandatory.chromeMediaSourceId = sourceId;
callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints);
});
if (captureSourceIdWithAudio) {
getSourceIdWithAudio(function (sourceId, canRequestAudioTrack) {
screen_constraints.mandatory.chromeMediaSourceId = sourceId;
if (canRequestAudioTrack) {
screen_constraints.canRequestAudioTrack = true;
}
callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints);
});
}
else {
getSourceId(function (sourceId) {
screen_constraints.mandatory.chromeMediaSourceId = sourceId;
callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints);
});
}
return;
}
if (chromeMediaSource == 'desktop') {
@ -99,6 +133,7 @@ function getScreenConstraints(callback) {
callback(null, screen_constraints);
}
exports.getScreenConstraints = getScreenConstraints;
exports.getScreenConstraintsWithAudio = getScreenConstraintsWithAudio;
exports.isChromeExtensionAvailable = isChromeExtensionAvailable;
exports.getChromeExtensionStatus = getChromeExtensionStatus;
exports.getSourceId = getSourceId;

View File

@ -1 +1 @@
{"version":3,"file":"Screen-Capturing.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/ScreenSharing/Screen-Capturing.js"],"names":[],"mappings":"AACA,IAAI,iBAAiB,GAAG,QAAQ,CAAC;AACjC,IAAI,cAAc,CAAC;AACnB,IAAI,SAAS,GAAG,OAAO,MAAM,CAAC,cAAc,KAAK,WAAW,CAAC;AAC7D,IAAI,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC1E,IAAI,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC;AAE3C,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAU,KAAK;IAC9C,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B,CAAC,CAAC;YACxF,CAAC,CAAC,CAAC;SACN;aACI;YACD,WAAW,CAAC,UAAU,QAAQ;gBAC1B,kBAAkB,CAAC,SAAS,CAAC,mBAAmB,GAAG,QAAQ,CAAC;gBAC5D,QAAQ,CAAC,QAAQ,IAAI,uBAAuB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;YACxF,CAAC,CAAC,CAAC;SACN;QACD,OAAO;KACV;IAGD,IAAI,iBAAiB,IAAI,SAAS,EAAE;QAChC,kBAAkB,CAAC,SAAS,CAAC,mBAAmB,GAAG,QAAQ,CAAC;KAC/D;IAGD,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;AACvC,CAAC;AAED,OAAO,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;AACpD,OAAO,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;AACtE,OAAO,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;AAChE,OAAO,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;AAC5D,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC"}

View File

@ -9,6 +9,7 @@ export declare class WebRtcStats {
isEnabled(): boolean;
initWebRtcStats(): void;
stopWebRtcStats(): void;
getSelectedIceCandidateInfo(): Promise<any>;
private sendStatsToHttpEndpoint;
private standardizeReport;
private getStatsAgnostic;

View File

@ -77,6 +77,70 @@ var WebRtcStats = /** @class */ (function () {
console.warn('WebRtc stats stopped for disposed stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId);
}
};
WebRtcStats.prototype.getSelectedIceCandidateInfo = function () {
var _this = this;
return new Promise(function (resolve, reject) {
_this.getStatsAgnostic(_this.stream.getRTCPeerConnection(), function (stats) {
if ((platform.name.indexOf('Chrome') !== -1) || (platform.name.indexOf('Opera') !== -1)) {
var localCandidateId = void 0, remoteCandidateId = void 0, googCandidatePair = void 0;
var localCandidates = {};
var remoteCandidates = {};
for (var key in stats) {
var stat = stats[key];
if (stat.type === 'localcandidate') {
localCandidates[stat.id] = stat;
}
else if (stat.type === 'remotecandidate') {
remoteCandidates[stat.id] = stat;
}
else if (stat.type === 'googCandidatePair' && (stat.googActiveConnection === 'true')) {
googCandidatePair = stat;
localCandidateId = stat.localCandidateId;
remoteCandidateId = stat.remoteCandidateId;
}
}
var finalLocalCandidate_1 = localCandidates[localCandidateId];
if (!!finalLocalCandidate_1) {
var candList = _this.stream.getLocalIceCandidateList();
var cand = candList.filter(function (c) {
return (!!c.candidate &&
c.candidate.indexOf(finalLocalCandidate_1.ipAddress) >= 0 &&
c.candidate.indexOf(finalLocalCandidate_1.portNumber) >= 0 &&
c.candidate.indexOf(finalLocalCandidate_1.priority) >= 0);
});
finalLocalCandidate_1.raw = !!cand[0] ? cand[0].candidate : 'ERROR: Cannot find local candidate in list of sent ICE candidates';
}
else {
finalLocalCandidate_1 = 'ERROR: No active local ICE candidate. Probably ICE-TCP is being used';
}
var finalRemoteCandidate_1 = remoteCandidates[remoteCandidateId];
if (!!finalRemoteCandidate_1) {
var candList = _this.stream.getRemoteIceCandidateList();
var cand = candList.filter(function (c) {
return (!!c.candidate &&
c.candidate.indexOf(finalRemoteCandidate_1.ipAddress) >= 0 &&
c.candidate.indexOf(finalRemoteCandidate_1.portNumber) >= 0 &&
c.candidate.indexOf(finalRemoteCandidate_1.priority) >= 0);
});
finalRemoteCandidate_1.raw = !!cand[0] ? cand[0].candidate : 'ERROR: Cannot find remote candidate in list of received ICE candidates';
}
else {
finalRemoteCandidate_1 = 'ERROR: No active remote ICE candidate. Probably ICE-TCP is being used';
}
resolve({
googCandidatePair: googCandidatePair,
localCandidate: finalLocalCandidate_1,
remoteCandidate: finalRemoteCandidate_1
});
}
else {
reject('Selected ICE candidate info only available for Chrome');
}
}, function (error) {
reject(error);
});
});
};
WebRtcStats.prototype.sendStatsToHttpEndpoint = function (instrumentation) {
var _this = this;
var sendPost = function (json) {
@ -174,7 +238,7 @@ var WebRtcStats = /** @class */ (function () {
}
});
}
else if (platform.name.indexOf('Chrome') !== -1) {
else if ((platform.name.indexOf('Chrome') !== -1) || (platform.name.indexOf('Opera') !== -1)) {
for (var _i = 0, _a = Object.keys(stats); _i < _a.length; _i++) {
var key = _a[_i];
var stat = stats[key];
@ -256,10 +320,14 @@ var WebRtcStats = /** @class */ (function () {
this.getStatsAgnostic(this.stream.getRTCPeerConnection(), f, function (error) { console.log(error); });
};
WebRtcStats.prototype.standardizeReport = function (response) {
console.log(response);
var standardReport = {};
if (platform.name.indexOf('Firefox') !== -1) {
Object.keys(response).forEach(function (key) {
console.log(response[key]);
});
return response;
}
var standardReport = {};
response.result().forEach(function (report) {
var standardStats = {
id: report.id,
@ -277,12 +345,12 @@ var WebRtcStats = /** @class */ (function () {
var _this = this;
if (platform.name.indexOf('Firefox') !== -1) {
// getStats takes args in different order in Chrome and Firefox
return pc.getStats(null, function (response) {
return pc.getStats(null).then(function (response) {
var report = _this.standardizeReport(response);
successCb(report);
}, failureCb);
})["catch"](failureCb);
}
else if (platform.name.indexOf('Chrome') !== -1) {
else if ((platform.name.indexOf('Chrome') !== -1) || (platform.name.indexOf('Opera') !== -1)) {
// In Chrome, the first two arguments are reversed
return pc.getStats(function (response) {
var report = _this.standardizeReport(response);

File diff suppressed because one or more lines are too long

View File

@ -1,48 +1,48 @@
{
"author": "OpenVidu",
"author": "OpenVidu",
"dependencies": {
"@types/node": "10.3.2",
"@types/platform": "1.3.1",
"freeice": "2.2.0",
"hark": "1.2.0",
"platform": "1.3.5",
"uuid": "3.2.1",
"webrtc-adapter": "6.2.1",
"@types/node": "10.3.2",
"@types/platform": "1.3.1",
"freeice": "2.2.0",
"hark": "1.2.0",
"platform": "1.3.5",
"uuid": "3.2.1",
"webrtc-adapter": "6.2.1",
"wolfy87-eventemitter": "5.2.4"
},
"description": "OpenVidu Browser",
},
"description": "OpenVidu Browser",
"devDependencies": {
"browserify": "16.2.2",
"grunt": "1.0.3",
"grunt-autoprefixer": "3.0.4",
"grunt-cli": "1.2.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-sass": "1.0.0",
"grunt-contrib-uglify": "3.3.0",
"grunt-contrib-watch": "1.1.0",
"grunt-string-replace": "1.3.1",
"grunt-ts": "6.0.0-beta.19",
"tsify": "4.0.0",
"tslint": "5.10.0",
"typedoc": "0.11.1",
"typedoc-plugin-sourcefile-url": "1.0.3",
"typescript": "2.9.1",
"browserify": "16.2.2",
"grunt": "1.0.3",
"grunt-autoprefixer": "3.0.4",
"grunt-cli": "1.2.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-sass": "1.0.0",
"grunt-contrib-uglify": "3.3.0",
"grunt-contrib-watch": "1.1.0",
"grunt-string-replace": "1.3.1",
"grunt-ts": "6.0.0-beta.19",
"tsify": "4.0.0",
"tslint": "5.10.0",
"typedoc": "0.11.1",
"typedoc-plugin-sourcefile-url": "1.0.3",
"typescript": "2.9.1",
"uglify-js": "3.4.0"
},
"license": "Apache-2.0",
"main": "lib/index.js",
"name": "openvidu-browser",
},
"license": "Apache-2.0",
"main": "lib/index.js",
"name": "openvidu-browser",
"repository": {
"type": "git",
"type": "git",
"url": "git://github.com/OpenVidu/openvidu"
},
},
"scripts": {
"browserify": "VERSION=${VERSION:-}; cd src && browserify Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../static/js/openvidu-browser-$VERSION.js -v",
"browserify-prod": "VERSION=${VERSION:-}; cd src && browserify --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | uglifyjs --source-map content=inline --output ../static/js/openvidu-browser-$VERSION.min.js",
"build": "cd src/OpenVidu && tsc && cd ../.. && tsc --declaration src/index.ts --outDir ./lib --sourceMap --lib dom,es5,es2015.promise,scripthost",
"docs": "grunt --gruntfile config/typedoc/custom-theme/gruntfile.js && typedoc --options ./config/typedoc/typedoc.js --out ./docs ./src && rm -rf ../../openvidu.io/api/openvidu-browser/* && cp -R ./docs/. ../../openvidu.io/api/openvidu-browser",
"browserify": "VERSION=${VERSION:-}; cd src && browserify Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../static/js/openvidu-browser-$VERSION.js -v",
"browserify-prod": "VERSION=${VERSION:-}; cd src && browserify --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | uglifyjs --source-map content=inline --output ../static/js/openvidu-browser-$VERSION.min.js",
"build": "cd src/OpenVidu && tsc && cd ../.. && tsc --declaration src/index.ts --outDir ./lib --sourceMap --lib dom,es5,es2015.promise,scripthost",
"docs": "grunt --gruntfile config/typedoc/custom-theme/gruntfile.js && typedoc --options ./config/typedoc/typedoc.js --out ./docs ./src && rm -rf ../../openvidu.io/api/openvidu-browser/* && cp -R ./docs/. ../../openvidu.io/api/openvidu-browser",
"test": "echo \"Error: no test specified\" && exit 1"
},
"types": "lib/index.d.ts",
"version": "2.1.0"
},
"types": "lib/index.d.ts",
"version": "2.2.0"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
<packaging>jar</packaging>
<name>OpenVidu Server</name>
<version>2.1.0</version>
<version>2.2.0</version>
<description>OpenVidu Server</description>
<url>https://github.com/OpenVidu/openvidu</url>

View File

@ -1,44 +1,44 @@
{
"dependencies": {
"@angular/animations": "6.0.3",
"@angular/cdk": "6.2.1",
"@angular/common": "6.0.3",
"@angular/compiler": "6.0.3",
"@angular/core": "6.0.3",
"@angular/flex-layout": "^6.0.0-beta.15",
"@angular/forms": "6.0.3",
"@angular/http": "6.0.3",
"@angular/material": "6.2.1",
"@angular/platform-browser": "6.0.3",
"@angular/platform-browser-dynamic": "6.0.3",
"@angular/router": "6.0.3",
"core-js": "^2.5.7",
"hammerjs": "2.0.8",
"openvidu-browser": "2.1.0",
"rxjs": "^6.2.0",
"@angular/animations": "6.0.3",
"@angular/cdk": "6.2.1",
"@angular/common": "6.0.3",
"@angular/compiler": "6.0.3",
"@angular/core": "6.0.3",
"@angular/flex-layout": "^6.0.0-beta.15",
"@angular/forms": "6.0.3",
"@angular/http": "6.0.3",
"@angular/material": "6.2.1",
"@angular/platform-browser": "6.0.3",
"@angular/platform-browser-dynamic": "6.0.3",
"@angular/router": "6.0.3",
"core-js": "^2.5.7",
"hammerjs": "2.0.8",
"openvidu-browser": "2.2.0",
"rxjs": "^6.2.0",
"zone.js": "0.8.26"
},
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.6.8",
"@angular/cli": "6.0.7",
"@angular/compiler-cli": "6.0.3",
"@types/jasmine": "2.8.8",
"@types/node": "10.3.1",
"codelyzer": "4.3.0",
"ts-node": "6.1.0",
"tslint": "5.10.0",
"@angular-devkit/build-angular": "^0.6.8",
"@angular/cli": "6.0.7",
"@angular/compiler-cli": "6.0.3",
"@types/jasmine": "2.8.8",
"@types/node": "10.3.1",
"codelyzer": "4.3.0",
"ts-node": "6.1.0",
"tslint": "5.10.0",
"typescript": "2.7.2"
},
"license": "Apache-2.0",
"name": "frontend",
"private": true,
},
"license": "Apache-2.0",
"name": "frontend",
"private": true,
"scripts": {
"build": "ng build",
"e2e": "ng e2e",
"lint": "ng lint",
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"e2e": "ng e2e",
"lint": "ng lint",
"ng": "ng",
"start": "ng serve",
"test": "ng test"
},
},
"version": "0.0.0"
}

File diff suppressed because it is too large Load Diff

View File

@ -12,12 +12,12 @@
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
</head>
<link rel="stylesheet" href="styles.3aeb2b08ae81545ecaf9.css"></head>
<body>
<app-root>
<mat-spinner></mat-spinner>
</app-root>
<script type="text/javascript" src="runtime.js"></script><script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="styles.js"></script><script type="text/javascript" src="vendor.js"></script><script type="text/javascript" src="main.js"></script></body>
<script type="text/javascript" src="runtime.a66f828dca56eeb90e02.js"></script><script type="text/javascript" src="polyfills.3582350dd6075fd34141.js"></script><script type="text/javascript" src="main.f2fbb21fb437ac40d44d.js"></script></body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,137 +0,0 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ };
/******/ function checkDeferredModules() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/ return result;
/******/ }
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "runtime": 0
/******/ };
/******/
/******/ var deferredModules = [];
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // run deferred modules from other chunks
/******/ checkDeferredModules();
/******/ })
/************************************************************************/
/******/ ([]);
//# sourceMappingURL=runtime.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,48 +1,48 @@
{
"dependencies": {
"@angular/animations": "6.0.3",
"@angular/cdk": "6.2.0",
"@angular/common": "6.0.3",
"@angular/compiler": "6.0.3",
"@angular/core": "6.0.3",
"@angular/flex-layout": "6.0.0-beta.15",
"@angular/forms": "6.0.3",
"@angular/http": "6.0.3",
"@angular/material": "6.2.0",
"@angular/platform-browser": "6.0.3",
"@angular/platform-browser-dynamic": "6.0.3",
"@angular/router": "6.0.3",
"colormap": "2.3.0",
"core-js": "2.5.7",
"hammerjs": "2.0.8",
"openvidu-browser": "2.1.0",
"openvidu-node-client": "2.0.0",
"rxjs": "6.2.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/cli": "6.0.7",
"@angular/compiler-cli": "6.0.3",
"@angular/language-service": "6.0.3",
"@types/jasmine": "2.8.8",
"@types/jasminewd2": "2.0.3",
"@types/node": "10.1.2",
"codelyzer": "4.3.0",
"ts-node": "6.1.0",
"tslint": "5.10.0",
"typescript": "~2.7.2",
"@angular-devkit/build-angular": "~0.6.6"
},
"license": "Apache-2.0",
"name": "openvidu-testapp",
"private": true,
"scripts": {
"build": "ng build",
"e2e": "ng e2e",
"lint": "ng lint",
"ng": "ng",
"start": "ng serve",
"test": "ng test"
},
"version": "2.1.0"
"dependencies": {
"@angular/animations": "6.0.3",
"@angular/cdk": "6.2.0",
"@angular/common": "6.0.3",
"@angular/compiler": "6.0.3",
"@angular/core": "6.0.3",
"@angular/flex-layout": "6.0.0-beta.15",
"@angular/forms": "6.0.3",
"@angular/http": "6.0.3",
"@angular/material": "6.2.0",
"@angular/platform-browser": "6.0.3",
"@angular/platform-browser-dynamic": "6.0.3",
"@angular/router": "6.0.3",
"colormap": "2.3.0",
"core-js": "2.5.7",
"hammerjs": "2.0.8",
"openvidu-browser": "2.2.0",
"openvidu-node-client": "2.0.0",
"rxjs": "6.2.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.6",
"@angular/cli": "6.0.7",
"@angular/compiler-cli": "6.0.3",
"@angular/language-service": "6.0.3",
"@types/jasmine": "2.8.8",
"@types/jasminewd2": "2.0.3",
"@types/node": "10.1.2",
"codelyzer": "4.3.0",
"ts-node": "6.1.0",
"tslint": "5.10.0",
"typescript": "~2.7.2"
},
"license": "Apache-2.0",
"name": "openvidu-testapp",
"private": true,
"scripts": {
"build": "ng build",
"e2e": "ng e2e",
"lint": "ng lint",
"ng": "ng",
"start": "ng serve",
"test": "ng test"
},
"version": "2.2.0"
}