mirror of https://github.com/OpenVidu/openvidu.git
Update to version v2.3.0
parent
00fb9bb7ec
commit
a1924bfa74
|
@ -81,10 +81,13 @@ var Connection = /** @class */ (function () {
|
|||
var streamOptions = {
|
||||
id: opts.id,
|
||||
connection: _this,
|
||||
hasAudio: opts.hasAudio,
|
||||
hasVideo: opts.hasVideo,
|
||||
audioActive: opts.audioActive,
|
||||
videoActive: opts.videoActive,
|
||||
typeOfVideo: opts.typeOfVideo,
|
||||
frameRate: opts.frameRate,
|
||||
recvAudio: opts.audioActive,
|
||||
recvVideo: opts.videoActive,
|
||||
typeOfVideo: opts.typeOfVideo
|
||||
videoDimensions: !!opts.videoDimensions ? JSON.parse(opts.videoDimensions) : undefined
|
||||
};
|
||||
var stream = new Stream_1.Stream(_this.session, streamOptions);
|
||||
_this.addStream(stream);
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"Connection.js","sourceRoot":"","sources":["../../src/OpenVidu/Connection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAGH,mCAAkC;AAMlC;;;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,GAAhB,UAAiB,SAA0B;QAEvC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,eAAe,EAClF,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;QAElD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,gBAAgB,EAAE;YAChD,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,SAAS,EAAE,SAAS,CAAC,SAAS;YAC9B,MAAM,EAAE,SAAS,CAAC,MAAM;YACxB,aAAa,EAAE,SAAS,CAAC,aAAa;SACzC,EAAE,UAAC,KAAK,EAAE,QAAQ;YACf,IAAI,KAAK,EAAE;gBACP,OAAO,CAAC,KAAK,CAAC,+BAA+B;sBACvC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;aAChC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,sCAAiB,GAAjB,UAAkB,OAA8B;QAAhD,iBAmBC;QAjBG,oHAAoH;QACpH,4GAA4G;QAC5G,OAAO,CAAC,OAAO,CAAC,UAAA,IAAI;YAChB,IAAM,aAAa,GAAyB;gBACxC,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,UAAU,EAAE,KAAI;gBAChB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,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"}
|
||||
{"version":3,"file":"Connection.js","sourceRoot":"","sources":["../../src/OpenVidu/Connection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAGH,mCAAkC;AAMlC;;;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,GAAhB,UAAiB,SAA0B;QAEvC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,eAAe,EAClF,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;QAElD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,gBAAgB,EAAE;YAChD,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,SAAS,EAAE,SAAS,CAAC,SAAS;YAC9B,MAAM,EAAE,SAAS,CAAC,MAAM;YACxB,aAAa,EAAE,SAAS,CAAC,aAAa;SACzC,EAAE,UAAC,KAAK,EAAE,QAAQ;YACf,IAAI,KAAK,EAAE;gBACP,OAAO,CAAC,KAAK,CAAC,+BAA+B;sBACvC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;aAChC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,sCAAiB,GAAjB,UAAkB,OAA8B;QAAhD,iBAsBC;QApBG,oHAAoH;QACpH,4GAA4G;QAC5G,OAAO,CAAC,OAAO,CAAC,UAAA,IAAI;YAChB,IAAM,aAAa,GAAyB;gBACxC,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,UAAU,EAAE,KAAI;gBAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS;aACzF,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,AA1ID,IA0IC;AA1IY,gCAAU"}
|
|
@ -15,6 +15,10 @@ export declare class OpenVidu {
|
|||
* @hidden
|
||||
*/
|
||||
session: Session;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
publishers: Publisher[];
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
|
|
@ -19,6 +19,7 @@ exports.__esModule = true;
|
|||
var LocalRecorder_1 = require("./LocalRecorder");
|
||||
var Publisher_1 = require("./Publisher");
|
||||
var Session_1 = require("./Session");
|
||||
var StreamPropertyChangedEvent_1 = require("../OpenViduInternal/Events/StreamPropertyChangedEvent");
|
||||
var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError");
|
||||
var VideoInsertMode_1 = require("../OpenViduInternal/Enums/VideoInsertMode");
|
||||
var screenSharingAuto = require("../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto");
|
||||
|
@ -31,6 +32,11 @@ var platform = require("platform");
|
|||
*/
|
||||
var OpenVidu = /** @class */ (function () {
|
||||
function OpenVidu() {
|
||||
var _this = this;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
this.publishers = [];
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
@ -44,6 +50,56 @@ var OpenVidu = /** @class */ (function () {
|
|||
*/
|
||||
this.advancedConfiguration = {};
|
||||
console.info("'OpenVidu' initialized");
|
||||
if (platform.name.toLowerCase().indexOf('mobile') !== -1) {
|
||||
// Listen to orientationchange only on mobile browsers
|
||||
window.onorientationchange = function () {
|
||||
_this.publishers.forEach(function (publisher) {
|
||||
if (!!publisher.stream && !!publisher.stream.hasVideo && !!publisher.stream.streamManager.videos[0]) {
|
||||
var attempts_1 = 0;
|
||||
var oldWidth_1 = publisher.stream.videoDimensions.width;
|
||||
var oldHeight_1 = publisher.stream.videoDimensions.height;
|
||||
// New resolution got from different places for Chrome and Firefox. Chrome needs a videoWidth and videoHeight of a videoElement.
|
||||
// Firefox needs getSettings from the videoTrack
|
||||
var firefoxSettings_1 = publisher.stream.getMediaStream().getVideoTracks()[0].getSettings();
|
||||
var newWidth_1 = (platform.name.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings_1.width : publisher.videoReference.videoWidth;
|
||||
var newHeight_1 = (platform.name.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings_1.height : publisher.videoReference.videoHeight;
|
||||
var repeatUntilChange_1 = setInterval(function () {
|
||||
firefoxSettings_1 = publisher.stream.getMediaStream().getVideoTracks()[0].getSettings();
|
||||
newWidth_1 = (platform.name.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings_1.width : publisher.videoReference.videoWidth;
|
||||
newHeight_1 = (platform.name.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings_1.height : publisher.videoReference.videoHeight;
|
||||
sendStreamPropertyChangedEvent_1(oldWidth_1, oldHeight_1, newWidth_1, newHeight_1);
|
||||
}, 100);
|
||||
var sendStreamPropertyChangedEvent_1 = function (oldWidth, oldHeight, newWidth, newHeight) {
|
||||
attempts_1++;
|
||||
if (attempts_1 > 4) {
|
||||
clearTimeout(repeatUntilChange_1);
|
||||
}
|
||||
if (newWidth !== oldWidth || newHeight !== oldHeight) {
|
||||
publisher.stream.videoDimensions = {
|
||||
width: newWidth || 0,
|
||||
height: newHeight || 0
|
||||
};
|
||||
_this.sendRequest('streamPropertyChanged', {
|
||||
streamId: publisher.stream.streamId,
|
||||
property: 'videoDimensions',
|
||||
newValue: JSON.stringify(publisher.stream.videoDimensions),
|
||||
reason: 'deviceRotated'
|
||||
}, function (error, response) {
|
||||
if (error) {
|
||||
console.error("Error sending 'streamPropertyChanged' event", error);
|
||||
}
|
||||
else {
|
||||
_this.session.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.session, publisher.stream, 'videoDimensions', publisher.stream.videoDimensions, { width: oldWidth, height: oldHeight }, 'deviceRotated')]);
|
||||
publisher.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(publisher, publisher.stream, 'videoDimensions', publisher.stream.videoDimensions, { width: oldWidth, height: oldHeight }, 'deviceRotated')]);
|
||||
}
|
||||
});
|
||||
clearTimeout(repeatUntilChange_1);
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Returns new session
|
||||
|
@ -118,6 +174,7 @@ var OpenVidu = /** @class */ (function () {
|
|||
}
|
||||
publisher.emitEvent('accessDenied', []);
|
||||
});
|
||||
this.publishers.push(publisher);
|
||||
return publisher;
|
||||
};
|
||||
OpenVidu.prototype.initPublisherAsync = function (targetElement, properties) {
|
||||
|
@ -436,6 +493,7 @@ var OpenVidu = /** @class */ (function () {
|
|||
recordingStarted: this.session.onRecordingStarted.bind(this.session),
|
||||
recordingStopped: this.session.onRecordingStopped.bind(this.session),
|
||||
sendMessage: this.session.onNewMessage.bind(this.session),
|
||||
streamPropertyChanged: this.session.onStreamPropertyChanged.bind(this.session),
|
||||
iceCandidate: this.session.recvIceCandidate.bind(this.session),
|
||||
mediaError: this.session.onMediaError.bind(this.session)
|
||||
}
|
||||
|
@ -511,6 +569,12 @@ var OpenVidu = /** @class */ (function () {
|
|||
};
|
||||
OpenVidu.prototype.reconnectedCallback = function () {
|
||||
console.warn('Websocket reconnected');
|
||||
if (this.isRoomAvailable()) {
|
||||
this.session.onRecoveredConnection();
|
||||
}
|
||||
else {
|
||||
alert('Connection error. Please reload page.');
|
||||
}
|
||||
};
|
||||
OpenVidu.prototype.isRoomAvailable = function () {
|
||||
if (this.session !== undefined && this.session instanceof Session_1.Session) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="node" />
|
||||
import { OpenVidu } from './OpenVidu';
|
||||
import { Session } from './Session';
|
||||
import { StreamManager } from './StreamManager';
|
||||
|
@ -8,7 +9,6 @@ import { Event } from '../OpenViduInternal/Events/Event';
|
|||
* Packs local media streams. Participants can publish it to a session. Initialized with [[OpenVidu.initPublisher]] method
|
||||
*/
|
||||
export declare class Publisher extends StreamManager {
|
||||
private openvidu;
|
||||
/**
|
||||
* Whether the Publisher has been granted access to the requested input devices or not
|
||||
*/
|
||||
|
@ -24,22 +24,56 @@ export declare class Publisher extends StreamManager {
|
|||
private accessDenied;
|
||||
private properties;
|
||||
private permissionDialogTimeout;
|
||||
/**
|
||||
* hidden
|
||||
*/
|
||||
openvidu: OpenVidu;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
videoReference: HTMLVideoElement;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
screenShareResizeInterval: NodeJS.Timer;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
constructor(targEl: string | HTMLElement, properties: PublisherProperties, openvidu: OpenVidu);
|
||||
/**
|
||||
* Publish or unpublish the audio stream (if available). Calling this method twice in a row passing same value will have no effect
|
||||
*
|
||||
* #### Events dispatched
|
||||
*
|
||||
* The [[Session]] object of the local participant will dispatch a `streamPropertyChanged` event with `changedProperty` set to `"audioActive"` and `reason` set to `"publishAudio"`
|
||||
* The [[Publisher]] object of the local participant will also dispatch the exact same event
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `streamPropertyChanged` event with `changedProperty` set to `"audioActive"` and `reason` set to `"publishAudio"`
|
||||
* The respective [[Subscriber]] object of every other participant receiving this Publisher's stream will also dispatch the exact same event
|
||||
*
|
||||
* See [[StreamPropertyChangedEvent]] to learn more.
|
||||
*
|
||||
* @param value `true` to publish the audio stream, `false` to unpublish it
|
||||
*/
|
||||
publishAudio(value: boolean): void;
|
||||
/**
|
||||
* Publish or unpublish the video stream (if available). Calling this method twice in a row passing same value will have no effect
|
||||
*
|
||||
* #### Events dispatched
|
||||
*
|
||||
* The [[Session]] object of the local participant will dispatch a `streamPropertyChanged` event with `changedProperty` set to `"videoActive"` and `reason` set to `"publishVideo"`
|
||||
* The [[Publisher]] object of the local participant will also dispatch the exact same event
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `streamPropertyChanged` event with `changedProperty` set to `"videoActive"` and `reason` set to `"publishVideo"`
|
||||
* The respective [[Subscriber]] object of every other participant receiving this Publisher's stream will also dispatch the exact same event
|
||||
*
|
||||
* See [[StreamPropertyChangedEvent]] to learn more.
|
||||
*
|
||||
* @param value `true` to publish the video stream, `false` to unpublish it
|
||||
*/
|
||||
publishVideo(value: boolean): void;
|
||||
/**
|
||||
* Call this method before [[Session.publish]] to subscribe to your Publisher's remote stream instead of using the local stream, as any other user would do.
|
||||
* Call this method before [[Session.publish]] if you prefer to subscribe to your Publisher's remote stream instead of using the local stream, as any other user would do.
|
||||
*/
|
||||
subscribeToRemote(value?: boolean): void;
|
||||
/**
|
||||
|
@ -58,10 +92,6 @@ export declare class Publisher extends StreamManager {
|
|||
* @hidden
|
||||
*/
|
||||
updateSession(session: Session): void;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
emitEvent(type: string, eventArray: any[]): void;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
|
|
@ -30,8 +30,10 @@ var Session_1 = require("./Session");
|
|||
var Stream_1 = require("./Stream");
|
||||
var StreamManager_1 = require("./StreamManager");
|
||||
var StreamEvent_1 = require("../OpenViduInternal/Events/StreamEvent");
|
||||
var StreamPropertyChangedEvent_1 = require("../OpenViduInternal/Events/StreamPropertyChangedEvent");
|
||||
var VideoElementEvent_1 = require("../OpenViduInternal/Events/VideoElementEvent");
|
||||
var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError");
|
||||
var platform = require("platform");
|
||||
/**
|
||||
* Packs local media streams. Participants can publish it to a session. Initialized with [[OpenVidu.initPublisher]] method
|
||||
*/
|
||||
|
@ -42,7 +44,6 @@ var Publisher = /** @class */ (function (_super) {
|
|||
*/
|
||||
function Publisher(targEl, properties, openvidu) {
|
||||
var _this = _super.call(this, new Stream_1.Stream((!!openvidu.session) ? openvidu.session : new Session_1.Session(openvidu), { publisherProperties: properties, mediaConstraints: {} }), targEl) || this;
|
||||
_this.openvidu = openvidu;
|
||||
/**
|
||||
* Whether the Publisher has been granted access to the requested input devices or not
|
||||
*/
|
||||
|
@ -53,35 +54,95 @@ var Publisher = /** @class */ (function (_super) {
|
|||
_this.isSubscribedToRemote = false;
|
||||
_this.accessDenied = false;
|
||||
_this.properties = properties;
|
||||
_this.stream.ee.on('local-stream-destroyed-by-disconnect', function (reason) {
|
||||
_this.openvidu = openvidu;
|
||||
_this.stream.ee.on('local-stream-destroyed', function (reason) {
|
||||
_this.stream.isLocalStreamPublished = false;
|
||||
var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', _this.stream, reason);
|
||||
_this.ee.emitEvent('streamDestroyed', [streamEvent]);
|
||||
streamEvent.callDefaultBehaviour();
|
||||
_this.emitEvent('streamDestroyed', [streamEvent]);
|
||||
streamEvent.callDefaultBehavior();
|
||||
});
|
||||
return _this;
|
||||
}
|
||||
/**
|
||||
* Publish or unpublish the audio stream (if available). Calling this method twice in a row passing same value will have no effect
|
||||
*
|
||||
* #### Events dispatched
|
||||
*
|
||||
* The [[Session]] object of the local participant will dispatch a `streamPropertyChanged` event with `changedProperty` set to `"audioActive"` and `reason` set to `"publishAudio"`
|
||||
* The [[Publisher]] object of the local participant will also dispatch the exact same event
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `streamPropertyChanged` event with `changedProperty` set to `"audioActive"` and `reason` set to `"publishAudio"`
|
||||
* The respective [[Subscriber]] object of every other participant receiving this Publisher's stream will also dispatch the exact same event
|
||||
*
|
||||
* See [[StreamPropertyChangedEvent]] to learn more.
|
||||
*
|
||||
* @param value `true` to publish the audio stream, `false` to unpublish it
|
||||
*/
|
||||
Publisher.prototype.publishAudio = function (value) {
|
||||
this.stream.getMediaStream().getAudioTracks().forEach(function (track) {
|
||||
track.enabled = value;
|
||||
});
|
||||
console.info("'Publisher' has " + (value ? 'published' : 'unpublished') + ' its audio stream');
|
||||
var _this = this;
|
||||
if (this.stream.audioActive !== value) {
|
||||
this.stream.getMediaStream().getAudioTracks().forEach(function (track) {
|
||||
track.enabled = value;
|
||||
});
|
||||
this.session.openvidu.sendRequest('streamPropertyChanged', {
|
||||
streamId: this.stream.streamId,
|
||||
property: 'audioActive',
|
||||
newValue: value,
|
||||
reason: 'publishAudio'
|
||||
}, function (error, response) {
|
||||
if (error) {
|
||||
console.error("Error sending 'streamPropertyChanged' event", error);
|
||||
}
|
||||
else {
|
||||
_this.session.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.session, _this.stream, 'audioActive', value, !value, 'publishAudio')]);
|
||||
_this.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this, _this.stream, 'audioActive', value, !value, 'publishAudio')]);
|
||||
}
|
||||
});
|
||||
this.stream.audioActive = value;
|
||||
console.info("'Publisher' has " + (value ? 'published' : 'unpublished') + ' its audio stream');
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Publish or unpublish the video stream (if available). Calling this method twice in a row passing same value will have no effect
|
||||
*
|
||||
* #### Events dispatched
|
||||
*
|
||||
* The [[Session]] object of the local participant will dispatch a `streamPropertyChanged` event with `changedProperty` set to `"videoActive"` and `reason` set to `"publishVideo"`
|
||||
* The [[Publisher]] object of the local participant will also dispatch the exact same event
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `streamPropertyChanged` event with `changedProperty` set to `"videoActive"` and `reason` set to `"publishVideo"`
|
||||
* The respective [[Subscriber]] object of every other participant receiving this Publisher's stream will also dispatch the exact same event
|
||||
*
|
||||
* See [[StreamPropertyChangedEvent]] to learn more.
|
||||
*
|
||||
* @param value `true` to publish the video stream, `false` to unpublish it
|
||||
*/
|
||||
Publisher.prototype.publishVideo = function (value) {
|
||||
this.stream.getMediaStream().getVideoTracks().forEach(function (track) {
|
||||
track.enabled = value;
|
||||
});
|
||||
console.info("'Publisher' has " + (value ? 'published' : 'unpublished') + ' its video stream');
|
||||
var _this = this;
|
||||
if (this.stream.videoActive !== value) {
|
||||
this.stream.getMediaStream().getVideoTracks().forEach(function (track) {
|
||||
track.enabled = value;
|
||||
});
|
||||
this.session.openvidu.sendRequest('streamPropertyChanged', {
|
||||
streamId: this.stream.streamId,
|
||||
property: 'videoActive',
|
||||
newValue: value,
|
||||
reason: 'publishVideo'
|
||||
}, function (error, response) {
|
||||
if (error) {
|
||||
console.error("Error sending 'streamPropertyChanged' event", error);
|
||||
}
|
||||
else {
|
||||
_this.session.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.session, _this.stream, 'videoActive', value, !value, 'publishVideo')]);
|
||||
_this.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this, _this.stream, 'videoActive', value, !value, 'publishVideo')]);
|
||||
}
|
||||
});
|
||||
this.stream.videoActive = value;
|
||||
console.info("'Publisher' has " + (value ? 'published' : 'unpublished') + ' its video stream');
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Call this method before [[Session.publish]] to subscribe to your Publisher's remote stream instead of using the local stream, as any other user would do.
|
||||
* Call this method before [[Session.publish]] if you prefer to subscribe to your Publisher's remote stream instead of using the local stream, as any other user would do.
|
||||
*/
|
||||
Publisher.prototype.subscribeToRemote = function (value) {
|
||||
value = (value !== undefined) ? value : true;
|
||||
|
@ -96,11 +157,11 @@ var Publisher = /** @class */ (function (_super) {
|
|||
_super.prototype.on.call(this, type, handler);
|
||||
if (type === 'streamCreated') {
|
||||
if (!!this.stream && this.stream.isLocalStreamPublished) {
|
||||
this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);
|
||||
this.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);
|
||||
}
|
||||
else {
|
||||
this.stream.ee.on('stream-created-by-publisher', function () {
|
||||
_this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);
|
||||
_this.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -110,17 +171,17 @@ var Publisher = /** @class */ (function (_super) {
|
|||
this.videos[0].video.paused === false &&
|
||||
this.videos[0].video.ended === false &&
|
||||
this.videos[0].video.readyState === 4) {
|
||||
this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]);
|
||||
this.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]);
|
||||
}
|
||||
}
|
||||
if (type === 'accessAllowed') {
|
||||
if (this.accessAllowed) {
|
||||
this.ee.emitEvent('accessAllowed');
|
||||
this.emitEvent('accessAllowed', []);
|
||||
}
|
||||
}
|
||||
if (type === 'accessDenied') {
|
||||
if (this.accessDenied) {
|
||||
this.ee.emitEvent('accessDenied');
|
||||
this.emitEvent('accessDenied', []);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
|
@ -133,11 +194,11 @@ var Publisher = /** @class */ (function (_super) {
|
|||
_super.prototype.once.call(this, type, handler);
|
||||
if (type === 'streamCreated') {
|
||||
if (!!this.stream && this.stream.isLocalStreamPublished) {
|
||||
this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);
|
||||
this.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);
|
||||
}
|
||||
else {
|
||||
this.stream.ee.once('stream-created-by-publisher', function () {
|
||||
_this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);
|
||||
_this.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -147,17 +208,17 @@ var Publisher = /** @class */ (function (_super) {
|
|||
this.videos[0].video.paused === false &&
|
||||
this.videos[0].video.ended === false &&
|
||||
this.videos[0].video.readyState === 4) {
|
||||
this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]);
|
||||
this.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]);
|
||||
}
|
||||
}
|
||||
if (type === 'accessAllowed') {
|
||||
if (this.accessAllowed) {
|
||||
this.ee.emitEvent('accessAllowed');
|
||||
this.emitEvent('accessAllowed', []);
|
||||
}
|
||||
}
|
||||
if (type === 'accessDenied') {
|
||||
if (this.accessDenied) {
|
||||
this.ee.emitEvent('accessDenied');
|
||||
this.emitEvent('accessDenied', []);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
|
@ -192,18 +253,83 @@ var Publisher = /** @class */ (function (_super) {
|
|||
if (!!mediaStream.getVideoTracks()[0]) {
|
||||
mediaStream.getVideoTracks()[0].enabled = !!_this.stream.outboundStreamOpts.publisherProperties.publishVideo;
|
||||
}
|
||||
_this.videoReference = document.createElement('video');
|
||||
_this.videoReference.srcObject = mediaStream;
|
||||
_this.stream.setMediaStream(mediaStream);
|
||||
if (!_this.stream.displayMyRemote()) {
|
||||
// When we are subscribed to our remote we don't still set the MediaStream object in the video elements to
|
||||
// avoid early 'streamPlaying' event
|
||||
_this.stream.updateMediaStreamInVideos();
|
||||
}
|
||||
_this.stream.isLocalStreamReadyToPublish = true;
|
||||
_this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
||||
if (!!_this.firstVideoElement) {
|
||||
_this.createVideoElement(_this.firstVideoElement.targetElement, _this.properties.insertMode);
|
||||
}
|
||||
delete _this.firstVideoElement;
|
||||
if (_this.stream.isSendVideo()) {
|
||||
if (!_this.stream.isSendScreen()) {
|
||||
// With no screen share, video dimension can be set directly from MediaStream (getSettings)
|
||||
// Orientation must be checked for mobile devices (width and height are reversed)
|
||||
var _a = mediaStream.getVideoTracks()[0].getSettings(), width = _a.width, height = _a.height;
|
||||
if (platform.name.toLowerCase().indexOf('mobile') !== -1 && (window.innerHeight > window.innerWidth)) {
|
||||
// Mobile portrait mode
|
||||
_this.stream.videoDimensions = {
|
||||
width: height || 0,
|
||||
height: width || 0
|
||||
};
|
||||
}
|
||||
else {
|
||||
_this.stream.videoDimensions = {
|
||||
width: width || 0,
|
||||
height: height || 0
|
||||
};
|
||||
}
|
||||
_this.stream.isLocalStreamReadyToPublish = true;
|
||||
_this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
||||
}
|
||||
else {
|
||||
// With screen share, video dimension must be got from a video element (onloadedmetadata event)
|
||||
_this.videoReference.onloadedmetadata = function () {
|
||||
_this.stream.videoDimensions = {
|
||||
width: _this.videoReference.videoWidth,
|
||||
height: _this.videoReference.videoHeight
|
||||
};
|
||||
_this.screenShareResizeInterval = setInterval(function () {
|
||||
var firefoxSettings = mediaStream.getVideoTracks()[0].getSettings();
|
||||
var newWidth = (platform.name === 'Chrome') ? _this.videoReference.videoWidth : firefoxSettings.width;
|
||||
var newHeight = (platform.name === 'Chrome') ? _this.videoReference.videoHeight : firefoxSettings.height;
|
||||
if (_this.stream.isLocalStreamPublished &&
|
||||
(newWidth !== _this.stream.videoDimensions.width ||
|
||||
newHeight !== _this.stream.videoDimensions.height)) {
|
||||
var oldValue_1 = { width: _this.stream.videoDimensions.width, height: _this.stream.videoDimensions.height };
|
||||
_this.stream.videoDimensions = {
|
||||
width: newWidth || 0,
|
||||
height: newHeight || 0
|
||||
};
|
||||
_this.session.openvidu.sendRequest('streamPropertyChanged', {
|
||||
streamId: _this.stream.streamId,
|
||||
property: 'videoDimensions',
|
||||
newValue: JSON.stringify(_this.stream.videoDimensions),
|
||||
reason: 'screenResized'
|
||||
}, function (error, response) {
|
||||
if (error) {
|
||||
console.error("Error sending 'streamPropertyChanged' event", error);
|
||||
}
|
||||
else {
|
||||
_this.session.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.session, _this.stream, 'videoDimensions', _this.stream.videoDimensions, oldValue_1, 'screenResized')]);
|
||||
_this.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this, _this.stream, 'videoDimensions', _this.stream.videoDimensions, oldValue_1, 'screenResized')]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
_this.stream.isLocalStreamReadyToPublish = true;
|
||||
_this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
||||
};
|
||||
}
|
||||
}
|
||||
else {
|
||||
_this.stream.isLocalStreamReadyToPublish = true;
|
||||
_this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
||||
}
|
||||
resolve();
|
||||
};
|
||||
_this.openvidu.generateMediaConstraints(_this.properties)
|
||||
|
@ -341,12 +467,6 @@ var Publisher = /** @class */ (function (_super) {
|
|||
this.session = session;
|
||||
this.stream.session = session;
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
Publisher.prototype.emitEvent = function (type, eventArray) {
|
||||
this.ee.emitEvent(type, eventArray);
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
@ -359,14 +479,14 @@ var Publisher = /** @class */ (function (_super) {
|
|||
Publisher.prototype.setPermissionDialogTimer = function (waitTime) {
|
||||
var _this = this;
|
||||
this.permissionDialogTimeout = setTimeout(function () {
|
||||
_this.ee.emitEvent('accessDialogOpened', []);
|
||||
_this.emitEvent('accessDialogOpened', []);
|
||||
}, waitTime);
|
||||
};
|
||||
Publisher.prototype.clearPermissionDialogTimer = function (startTime, waitTime) {
|
||||
clearTimeout(this.permissionDialogTimeout);
|
||||
if ((Date.now() - startTime) > waitTime) {
|
||||
// Permission dialog was shown and now is closed
|
||||
this.ee.emitEvent('accessDialogClosed', []);
|
||||
this.emitEvent('accessDialogClosed', []);
|
||||
}
|
||||
};
|
||||
return Publisher;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,6 +4,7 @@ import { Publisher } from './Publisher';
|
|||
import { Stream } from './Stream';
|
||||
import { StreamManager } from './StreamManager';
|
||||
import { Subscriber } from './Subscriber';
|
||||
import { Capabilities } from '../OpenViduInternal/Interfaces/Public/Capabilities';
|
||||
import { EventDispatcher } from '../OpenViduInternal/Interfaces/Public/EventDispatcher';
|
||||
import { SignalOptions } from '../OpenViduInternal/Interfaces/Public/SignalOptions';
|
||||
import { SubscriberProperties } from '../OpenViduInternal/Interfaces/Public/SubscriberProperties';
|
||||
|
@ -34,6 +35,11 @@ export declare class Session implements EventDispatcher {
|
|||
* Collection of all StreamManagers of this Session ([[Publisher]] and [[Subscriber]])
|
||||
*/
|
||||
streamManagers: StreamManager[];
|
||||
/**
|
||||
* Object defining the methods that the client is able to call. These are defined by the role of the token used to connect to the Session.
|
||||
* This object is only defined after [[Session.connect]] has been successfully resolved
|
||||
*/
|
||||
capabilities: Capabilities;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
@ -70,20 +76,20 @@ export declare class Session implements EventDispatcher {
|
|||
* This event will automatically unsubscribe the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)
|
||||
* and also deletes any HTML video element associated to each Subscriber (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, each Subscriber object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `sessionDisconnected` to avoid this behaviour and take care of disposing and cleaning all the Subscriber objects yourself.
|
||||
* Call `event.preventDefault()` upon event `sessionDisconnected` to avoid this behavior and take care of disposing and cleaning all the Subscriber objects yourself.
|
||||
* See [[SessionDisconnectedEvent]] and [[VideoElementEvent]] to learn more to learn more.
|
||||
*
|
||||
* The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event if there is a [[Publisher]] object publishing to the session.
|
||||
* This event will automatically stop all media tracks and delete any HTML video element associated to it (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session (to do so it is a mandatory requirement to call `Session.unpublish()`
|
||||
* Call `event.preventDefault()` upon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session (to do so it is a mandatory requirement to call `Session.unpublish()`
|
||||
* or/and `Session.disconnect()` in the previous session). See [[StreamEvent]] and [[VideoElementEvent]] to learn more.
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event if the disconnected participant was publishing.
|
||||
* This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)
|
||||
* and also deletes any HTML video element associated to that Subscriber (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `streamDestroyed` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object yourself.
|
||||
* Call `event.preventDefault()` upon event `streamDestroyed` to avoid this default behavior and take care of disposing and cleaning the Subscriber object yourself.
|
||||
* See [[StreamEvent]] and [[VideoElementEvent]] to learn more.
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `connectionDestroyed` event in any case. See [[ConnectionEvent]] to learn more.
|
||||
|
@ -132,17 +138,51 @@ export declare class Session implements EventDispatcher {
|
|||
* This event will automatically stop all media tracks and delete any HTML video element associated to this Publisher
|
||||
* (only those videos [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session.
|
||||
* Call `event.preventDefault()` upon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session.
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event.
|
||||
* This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and
|
||||
* delete any HTML video element associated to it (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `streamDestroyed` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object on your own.
|
||||
* Call `event.preventDefault()` upon event `streamDestroyed` to avoid this default behavior and take care of disposing and cleaning the Subscriber object on your own.
|
||||
*
|
||||
* See [[StreamEvent]] and [[VideoElementEvent]] to learn more.
|
||||
*/
|
||||
unpublish(publisher: Publisher): void;
|
||||
/**
|
||||
* Forces some user to leave the session
|
||||
*
|
||||
* #### Events dispatched
|
||||
*
|
||||
* The behavior is the same as when some user calls [[Session.disconnect]], but `reason` property in all events will be `"forceDisconnectByUser"`.
|
||||
*
|
||||
* The [[Session]] object of every participant will dispatch a `streamDestroyed` event if the evicted user was publishing a stream, with property `reason` set to `"forceDisconnectByUser"`.
|
||||
* The [[Session]] object of every participant except the evicted one will dispatch a `connectionDestroyed` event for the evicted user, with property `reason` set to `"forceDisconnectByUser"`.
|
||||
*
|
||||
* If any, the [[Publisher]] object of the evicted participant will also dispatch a `streamDestroyed` event with property `reason` set to `"forceDisconnectByUser"`.
|
||||
* The [[Session]] object of the evicted participant will dispatch a `sessionDisconnected` event with property `reason` set to `"forceDisconnectByUser"`.
|
||||
*
|
||||
* See [[StreamEvent]], [[ConnectionEvent]] and [[SessionDisconnectedEvent]] to learn more.
|
||||
*
|
||||
* @returns A Promise (to which you can optionally subscribe to) that is resolved only after the participant has been successfully evicted from the session and rejected with an Error object if not
|
||||
*/
|
||||
forceDisconnect(connection: Connection): Promise<any>;
|
||||
/**
|
||||
* Forces some user to unpublish a Stream
|
||||
*
|
||||
* #### Events dispatched
|
||||
*
|
||||
* The behavior is the same as when some user calls [[Session.unpublish]], but `reason` property in all events will be `"forceUnpublishByUser"`
|
||||
*
|
||||
* The [[Session]] object of every participant will dispatch a `streamDestroyed` event with property `reason` set to `"forceDisconnectByUser"`
|
||||
*
|
||||
* The [[Publisher]] object of the affected participant will also dispatch a `streamDestroyed` event with property `reason` set to `"forceDisconnectByUser"`
|
||||
*
|
||||
* See [[StreamEvent]] to learn more.
|
||||
*
|
||||
* @returns A Promise (to which you can optionally subscribe to) that is resolved only after the remote Stream has been successfully unpublished from the session and rejected with an Error object if not
|
||||
*/
|
||||
forceUnpublish(stream: Stream): Promise<any>;
|
||||
/**
|
||||
* Sends one signal. `signal` object has the following optional properties:
|
||||
* ```json
|
||||
|
@ -191,6 +231,10 @@ export declare class Session implements EventDispatcher {
|
|||
* @hidden
|
||||
*/
|
||||
onNewMessage(msg: any): void;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
onStreamPropertyChanged(msg: any): void;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
@ -203,6 +247,10 @@ export declare class Session implements EventDispatcher {
|
|||
* @hidden
|
||||
*/
|
||||
onLostConnection(): void;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
onRecoveredConnection(): void;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
@ -224,6 +272,7 @@ export declare class Session implements EventDispatcher {
|
|||
*/
|
||||
leave(forced: boolean, reason: string): void;
|
||||
private connectAux;
|
||||
private stopPublisherStream;
|
||||
private stringClientMetadata;
|
||||
private getConnection;
|
||||
private getRemoteConnection;
|
||||
|
|
|
@ -23,6 +23,7 @@ var RecordingEvent_1 = require("../OpenViduInternal/Events/RecordingEvent");
|
|||
var SessionDisconnectedEvent_1 = require("../OpenViduInternal/Events/SessionDisconnectedEvent");
|
||||
var SignalEvent_1 = require("../OpenViduInternal/Events/SignalEvent");
|
||||
var StreamEvent_1 = require("../OpenViduInternal/Events/StreamEvent");
|
||||
var StreamPropertyChangedEvent_1 = require("../OpenViduInternal/Events/StreamPropertyChangedEvent");
|
||||
var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError");
|
||||
var VideoInsertMode_1 = require("../OpenViduInternal/Enums/VideoInsertMode");
|
||||
var platform = require("platform");
|
||||
|
@ -115,20 +116,20 @@ var Session = /** @class */ (function () {
|
|||
* This event will automatically unsubscribe the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)
|
||||
* and also deletes any HTML video element associated to each Subscriber (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, each Subscriber object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `sessionDisconnected` to avoid this behaviour and take care of disposing and cleaning all the Subscriber objects yourself.
|
||||
* Call `event.preventDefault()` upon event `sessionDisconnected` to avoid this behavior and take care of disposing and cleaning all the Subscriber objects yourself.
|
||||
* See [[SessionDisconnectedEvent]] and [[VideoElementEvent]] to learn more to learn more.
|
||||
*
|
||||
* The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event if there is a [[Publisher]] object publishing to the session.
|
||||
* This event will automatically stop all media tracks and delete any HTML video element associated to it (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session (to do so it is a mandatory requirement to call `Session.unpublish()`
|
||||
* Call `event.preventDefault()` upon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session (to do so it is a mandatory requirement to call `Session.unpublish()`
|
||||
* or/and `Session.disconnect()` in the previous session). See [[StreamEvent]] and [[VideoElementEvent]] to learn more.
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event if the disconnected participant was publishing.
|
||||
* This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)
|
||||
* and also deletes any HTML video element associated to that Subscriber (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `streamDestroyed` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object yourself.
|
||||
* Call `event.preventDefault()` upon event `streamDestroyed` to avoid this default behavior and take care of disposing and cleaning the Subscriber object yourself.
|
||||
* See [[StreamEvent]] and [[VideoElementEvent]] to learn more.
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `connectionDestroyed` event in any case. See [[ConnectionEvent]] to learn more.
|
||||
|
@ -255,7 +256,7 @@ var Session = /** @class */ (function () {
|
|||
return new Promise(function (resolve, reject) {
|
||||
publisher.session = _this;
|
||||
publisher.stream.session = _this;
|
||||
if (!publisher.stream.isLocalStreamPublished) {
|
||||
if (!publisher.stream.publishedOnce) {
|
||||
// 'Session.unpublish(Publisher)' has NOT been called
|
||||
_this.connection.addStream(publisher.stream);
|
||||
publisher.stream.publish()
|
||||
|
@ -292,13 +293,13 @@ var Session = /** @class */ (function () {
|
|||
* This event will automatically stop all media tracks and delete any HTML video element associated to this Publisher
|
||||
* (only those videos [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session.
|
||||
* Call `event.preventDefault()` upon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session.
|
||||
*
|
||||
* The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event.
|
||||
* This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and
|
||||
* delete any HTML video element associated to it (only those [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)).
|
||||
* For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event.
|
||||
* Call `event.preventDefault()` uppon event `streamDestroyed` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object on your own.
|
||||
* Call `event.preventDefault()` upon event `streamDestroyed` to avoid this default behavior and take care of disposing and cleaning the Subscriber object on your own.
|
||||
*
|
||||
* See [[StreamEvent]] and [[VideoElementEvent]] to learn more.
|
||||
*/
|
||||
|
@ -327,9 +328,83 @@ var Session = /** @class */ (function () {
|
|||
delete stream.connection.stream;
|
||||
var streamEvent = new StreamEvent_1.StreamEvent(true, publisher, 'streamDestroyed', publisher.stream, 'unpublish');
|
||||
publisher.emitEvent('streamDestroyed', [streamEvent]);
|
||||
streamEvent.callDefaultBehaviour();
|
||||
streamEvent.callDefaultBehavior();
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Forces some user to leave the session
|
||||
*
|
||||
* #### Events dispatched
|
||||
*
|
||||
* The behavior is the same as when some user calls [[Session.disconnect]], but `reason` property in all events will be `"forceDisconnectByUser"`.
|
||||
*
|
||||
* The [[Session]] object of every participant will dispatch a `streamDestroyed` event if the evicted user was publishing a stream, with property `reason` set to `"forceDisconnectByUser"`.
|
||||
* The [[Session]] object of every participant except the evicted one will dispatch a `connectionDestroyed` event for the evicted user, with property `reason` set to `"forceDisconnectByUser"`.
|
||||
*
|
||||
* If any, the [[Publisher]] object of the evicted participant will also dispatch a `streamDestroyed` event with property `reason` set to `"forceDisconnectByUser"`.
|
||||
* The [[Session]] object of the evicted participant will dispatch a `sessionDisconnected` event with property `reason` set to `"forceDisconnectByUser"`.
|
||||
*
|
||||
* See [[StreamEvent]], [[ConnectionEvent]] and [[SessionDisconnectedEvent]] to learn more.
|
||||
*
|
||||
* @returns A Promise (to which you can optionally subscribe to) that is resolved only after the participant has been successfully evicted from the session and rejected with an Error object if not
|
||||
*/
|
||||
Session.prototype.forceDisconnect = function (connection) {
|
||||
var _this = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
console.info('Forcing disconnect for connection ' + connection.connectionId);
|
||||
_this.openvidu.sendRequest('forceDisconnect', { connectionId: connection.connectionId }, function (error, response) {
|
||||
if (error) {
|
||||
console.error('Error forcing disconnect for Connection ' + connection.connectionId, error);
|
||||
if (error.code === 401) {
|
||||
reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED, "You don't have permissions to force a disconnection"));
|
||||
}
|
||||
else {
|
||||
reject(error);
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.info('Forcing disconnect correctly for Connection ' + connection.connectionId);
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Forces some user to unpublish a Stream
|
||||
*
|
||||
* #### Events dispatched
|
||||
*
|
||||
* The behavior is the same as when some user calls [[Session.unpublish]], but `reason` property in all events will be `"forceUnpublishByUser"`
|
||||
*
|
||||
* The [[Session]] object of every participant will dispatch a `streamDestroyed` event with property `reason` set to `"forceDisconnectByUser"`
|
||||
*
|
||||
* The [[Publisher]] object of the affected participant will also dispatch a `streamDestroyed` event with property `reason` set to `"forceDisconnectByUser"`
|
||||
*
|
||||
* See [[StreamEvent]] to learn more.
|
||||
*
|
||||
* @returns A Promise (to which you can optionally subscribe to) that is resolved only after the remote Stream has been successfully unpublished from the session and rejected with an Error object if not
|
||||
*/
|
||||
Session.prototype.forceUnpublish = function (stream) {
|
||||
var _this = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
console.info('Forcing unpublish for stream ' + stream.streamId);
|
||||
_this.openvidu.sendRequest('forceUnpublish', { streamId: stream.streamId }, function (error, response) {
|
||||
if (error) {
|
||||
console.error('Error forcing unpublish for Stream ' + stream.streamId, error);
|
||||
if (error.code === 401) {
|
||||
reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED, "You don't have permissions to force an unpublishing"));
|
||||
}
|
||||
else {
|
||||
reject(error);
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.info('Forcing unpublish correctly for Stream ' + stream.streamId);
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Sends one signal. `signal` object has the following optional properties:
|
||||
* ```json
|
||||
|
@ -464,14 +539,14 @@ var Session = /** @class */ (function () {
|
|||
*/
|
||||
Session.prototype.onParticipantLeft = function (msg) {
|
||||
var _this = this;
|
||||
this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + " unknown when 'onParticipantLeft'. " +
|
||||
this.getRemoteConnection(msg.connectionId, 'Remote connection ' + msg.connectionId + " unknown when 'onParticipantLeft'. " +
|
||||
'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))
|
||||
.then(function (connection) {
|
||||
if (!!connection.stream) {
|
||||
var stream = connection.stream;
|
||||
var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', stream, msg.reason);
|
||||
_this.ee.emitEvent('streamDestroyed', [streamEvent]);
|
||||
streamEvent.callDefaultBehaviour();
|
||||
streamEvent.callDefaultBehavior();
|
||||
delete _this.remoteStreamsCreated[stream.streamId];
|
||||
}
|
||||
delete _this.remoteConnections[connection.connectionId];
|
||||
|
@ -518,44 +593,36 @@ var Session = /** @class */ (function () {
|
|||
*/
|
||||
Session.prototype.onParticipantUnpublished = function (msg) {
|
||||
var _this = this;
|
||||
this.getRemoteConnection(msg.name, "Remote connection '" + msg.name + "' unknown when 'onParticipantUnpublished'. " +
|
||||
'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))
|
||||
.then(function (connection) {
|
||||
var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', connection.stream, msg.reason);
|
||||
_this.ee.emitEvent('streamDestroyed', [streamEvent]);
|
||||
streamEvent.callDefaultBehaviour();
|
||||
// Deleting the remote stream
|
||||
var streamId = connection.stream.streamId;
|
||||
delete _this.remoteStreamsCreated[streamId];
|
||||
connection.removeStream(streamId);
|
||||
})["catch"](function (openViduError) {
|
||||
console.error(openViduError);
|
||||
});
|
||||
if (msg.connectionId === this.connection.connectionId) {
|
||||
// Your stream has been forcedly unpublished from the session
|
||||
this.stopPublisherStream(msg.reason);
|
||||
}
|
||||
else {
|
||||
this.getRemoteConnection(msg.connectionId, "Remote connection '" + msg.connectionId + "' unknown when 'onParticipantUnpublished'. " +
|
||||
'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))
|
||||
.then(function (connection) {
|
||||
var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', connection.stream, msg.reason);
|
||||
_this.ee.emitEvent('streamDestroyed', [streamEvent]);
|
||||
streamEvent.callDefaultBehavior();
|
||||
// Deleting the remote stream
|
||||
var streamId = connection.stream.streamId;
|
||||
delete _this.remoteStreamsCreated[streamId];
|
||||
connection.removeStream(streamId);
|
||||
})["catch"](function (openViduError) {
|
||||
console.error(openViduError);
|
||||
});
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
Session.prototype.onParticipantEvicted = function (msg) {
|
||||
/*this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + " unknown when 'onParticipantLeft'. " +
|
||||
'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))
|
||||
|
||||
.then(connection => {
|
||||
if (!!connection.stream) {
|
||||
const stream = connection.stream;
|
||||
|
||||
const streamEvent = new StreamEvent(true, this, 'streamDestroyed', stream, 'forceDisconnect');
|
||||
this.ee.emitEvent('streamDestroyed', [streamEvent]);
|
||||
streamEvent.callDefaultBehaviour();
|
||||
|
||||
delete this.remoteStreamsCreated[stream.streamId];
|
||||
}
|
||||
connection.dispose();
|
||||
delete this.remoteConnections[connection.connectionId];
|
||||
this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent(false, this, 'connectionDestroyed', connection, 'forceDisconnect')]);
|
||||
})
|
||||
.catch(openViduError => {
|
||||
console.error(openViduError);
|
||||
});*/
|
||||
if (msg.connectionId === this.connection.connectionId) {
|
||||
// You have been evicted from the session
|
||||
if (!!this.sessionId && !this.connection.disposed) {
|
||||
this.leave(true, msg.reason);
|
||||
}
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
|
@ -572,6 +639,44 @@ var Session = /** @class */ (function () {
|
|||
console.error(openViduError);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
Session.prototype.onStreamPropertyChanged = function (msg) {
|
||||
var _this = this;
|
||||
this.getRemoteConnection(msg.connectionId, 'Remote connection ' + msg.connectionId + " unknown when 'onStreamPropertyChanged'. " +
|
||||
'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))
|
||||
.then(function (connection) {
|
||||
if (!!connection.stream && connection.stream.streamId === msg.streamId) {
|
||||
var stream = connection.stream;
|
||||
var oldValue = void 0;
|
||||
switch (msg.property) {
|
||||
case 'audioActive':
|
||||
oldValue = stream.audioActive;
|
||||
msg.newValue = msg.newValue === 'true';
|
||||
stream.audioActive = msg.newValue;
|
||||
break;
|
||||
case 'videoActive':
|
||||
oldValue = stream.videoActive;
|
||||
msg.newValue = msg.newValue === 'true';
|
||||
stream.videoActive = msg.newValue;
|
||||
break;
|
||||
case 'videoDimensions':
|
||||
oldValue = stream.videoDimensions;
|
||||
msg.newValue = JSON.parse(JSON.parse(msg.newValue));
|
||||
stream.videoDimensions = msg.newValue;
|
||||
break;
|
||||
}
|
||||
_this.ee.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this, stream, msg.property, msg.newValue, oldValue, msg.reason)]);
|
||||
stream.streamManager.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(stream.streamManager, stream, msg.property, msg.newValue, oldValue, msg.reason)]);
|
||||
}
|
||||
else {
|
||||
console.error("No stream with streamId '" + msg.streamId + "' found for connection '" + msg.connectionId + "' on 'streamPropertyChanged' event");
|
||||
}
|
||||
})["catch"](function (openViduError) {
|
||||
console.error(openViduError);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
@ -600,7 +705,7 @@ var Session = /** @class */ (function () {
|
|||
*/
|
||||
Session.prototype.onSessionClosed = function (msg) {
|
||||
console.info('Session closed: ' + JSON.stringify(msg));
|
||||
var s = msg.room;
|
||||
var s = msg.sessionId;
|
||||
if (s !== undefined) {
|
||||
this.ee.emitEvent('session-closed', [{
|
||||
session: s
|
||||
|
@ -629,6 +734,13 @@ var Session = /** @class */ (function () {
|
|||
this.leave(true, 'networkDisconnect');
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
Session.prototype.onRecoveredConnection = function () {
|
||||
console.warn('Recovered connection in Session ' + this.sessionId);
|
||||
this.ee.emitEvent('connectionRecovered', []);
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
@ -681,19 +793,12 @@ var Session = /** @class */ (function () {
|
|||
else {
|
||||
this.openvidu.closeWs();
|
||||
}
|
||||
if (!!this.connection.stream) {
|
||||
// Dispose Publisher's local stream
|
||||
this.connection.stream.disposeWebRtcPeer();
|
||||
if (this.connection.stream.isLocalStreamPublished) {
|
||||
// Make Publisher object dispatch 'streamDestroyed' event if the Stream was published
|
||||
this.connection.stream.ee.emitEvent('local-stream-destroyed-by-disconnect', [reason]);
|
||||
}
|
||||
}
|
||||
this.stopPublisherStream(reason);
|
||||
if (!this.connection.disposed) {
|
||||
// Make Session object dispatch 'sessionDisconnected' event (if it is not already disposed)
|
||||
var sessionDisconnectEvent = new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this, reason);
|
||||
this.ee.emitEvent('sessionDisconnected', [sessionDisconnectEvent]);
|
||||
sessionDisconnectEvent.callDefaultBehaviour();
|
||||
sessionDisconnectEvent.callDefaultBehavior();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -721,6 +826,13 @@ var Session = /** @class */ (function () {
|
|||
reject(error);
|
||||
}
|
||||
else {
|
||||
// Initialize capabilities object with the role
|
||||
_this.capabilities = {
|
||||
subscribe: true,
|
||||
publish: _this.openvidu.role !== 'SUBSCRIBER',
|
||||
forceUnpublish: _this.openvidu.role === 'MODERATOR',
|
||||
forceDisconnect: _this.openvidu.role === 'MODERATOR'
|
||||
};
|
||||
// Initialize local Connection object with values returned by openvidu-server
|
||||
_this.connection = new Connection_1.Connection(_this);
|
||||
_this.connection.connectionId = response.id;
|
||||
|
@ -757,6 +869,16 @@ var Session = /** @class */ (function () {
|
|||
});
|
||||
});
|
||||
};
|
||||
Session.prototype.stopPublisherStream = function (reason) {
|
||||
if (!!this.connection.stream) {
|
||||
// Dispose Publisher's local stream
|
||||
this.connection.stream.disposeWebRtcPeer();
|
||||
if (this.connection.stream.isLocalStreamPublished) {
|
||||
// Make Publisher object dispatch 'streamDestroyed' event if the Stream was published
|
||||
this.connection.stream.ee.emitEvent('local-stream-destroyed', [reason]);
|
||||
}
|
||||
}
|
||||
};
|
||||
Session.prototype.stringClientMetadata = function (metadata) {
|
||||
if (typeof metadata !== 'string') {
|
||||
return JSON.stringify(metadata);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -28,18 +28,46 @@ export declare class Stream {
|
|||
* Whether the stream has an audio track or not
|
||||
*/
|
||||
hasAudio: boolean;
|
||||
/**
|
||||
* Whether the stream has the video track muted or unmuted. If [[hasVideo]] is false, this property is undefined.
|
||||
*
|
||||
* This property may change if the Publisher publishing the stream calls [[Publisher.publishVideo]]. Whenever this happens a [[StreamPropertyChangedEvent]] will be dispatched
|
||||
* by the Session object as well as by the affected Subscriber/Publisher object
|
||||
*/
|
||||
videoActive: boolean;
|
||||
/**
|
||||
* Whether the stream has the audio track muted or unmuted. If [[hasAudio]] is false, this property is undefined
|
||||
*
|
||||
* This property may change if the Publisher publishing the stream calls [[Publisher.publishAudio]]. Whenever this happens a [[StreamPropertyChangedEvent]] will be dispatched
|
||||
* by the Session object as well as by the affected Subscriber/Publisher object
|
||||
*/
|
||||
audioActive: boolean;
|
||||
/**
|
||||
* Unique identifier of the stream
|
||||
*/
|
||||
streamId: string;
|
||||
/**
|
||||
* `"CAMERA"` or `"SCREEN"`. *undefined* if stream is audio-only
|
||||
* `"CAMERA"`, `"SCREEN"` or `"CUSTOM"` (the latter when [[PublisherProperties.videoSource]] is a MediaStreamTrack when calling [[OpenVidu.initPublisher]]).
|
||||
* If [[hasVideo]] is false, this property is undefined
|
||||
*/
|
||||
typeOfVideo?: string;
|
||||
/**
|
||||
* StreamManager object ([[Publisher]] or [[Subscriber]]) in charge of displaying this stream in the DOM
|
||||
*/
|
||||
streamManager: StreamManager;
|
||||
/**
|
||||
* Width and height in pixels of the encoded video stream. If [[hasVideo]] is false, this property is undefined
|
||||
*
|
||||
* This property may change if the Publisher that is publishing:
|
||||
* - If it is a mobile device, whenever the user rotates the device.
|
||||
* - If it is screen-sharing, whenever the user changes the size of the captured window.
|
||||
*
|
||||
* Whenever this happens a [[StreamPropertyChangedEvent]] will be dispatched by the Session object as well as by the affected Subscriber/Publisher object
|
||||
*/
|
||||
videoDimensions: {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
@ -56,6 +84,10 @@ export declare class Stream {
|
|||
* @hidden
|
||||
*/
|
||||
isLocalStreamPublished: boolean;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
publishedOnce: boolean;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
@ -170,7 +202,7 @@ export declare class Stream {
|
|||
getLocalIceCandidateList(): RTCIceCandidate[];
|
||||
private initWebRtcPeerSend;
|
||||
private initWebRtcPeerReceive;
|
||||
private remotePeerSuccesfullyEstablished;
|
||||
private remotePeerSuccessfullyEstablished;
|
||||
private initWebRtcStats;
|
||||
private stopWebRtcStats;
|
||||
private getIceServersConf;
|
||||
|
|
|
@ -21,6 +21,7 @@ var WebRtcStats_1 = require("../OpenViduInternal/WebRtcStats/WebRtcStats");
|
|||
var PublisherSpeakingEvent_1 = require("../OpenViduInternal/Events/PublisherSpeakingEvent");
|
||||
var EventEmitter = require("wolfy87-eventemitter");
|
||||
var hark = require("hark");
|
||||
var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError");
|
||||
/**
|
||||
* 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
|
||||
|
@ -45,33 +46,45 @@ var Stream = /** @class */ (function () {
|
|||
* @hidden
|
||||
*/
|
||||
this.isLocalStreamPublished = false;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
this.publishedOnce = false;
|
||||
this.session = session;
|
||||
if (options.hasOwnProperty('id')) {
|
||||
// InboundStreamOptions: stream belongs to a Subscriber
|
||||
this.inboundStreamOpts = options;
|
||||
this.streamId = this.inboundStreamOpts.id;
|
||||
this.hasAudio = this.inboundStreamOpts.recvAudio;
|
||||
this.hasVideo = this.inboundStreamOpts.recvVideo;
|
||||
this.typeOfVideo = (!this.inboundStreamOpts.typeOfVideo) ? undefined : this.inboundStreamOpts.typeOfVideo;
|
||||
this.frameRate = (this.inboundStreamOpts.frameRate === -1) ? undefined : this.inboundStreamOpts.frameRate;
|
||||
this.hasAudio = this.inboundStreamOpts.hasAudio;
|
||||
this.hasVideo = this.inboundStreamOpts.hasVideo;
|
||||
if (this.hasAudio) {
|
||||
this.audioActive = this.inboundStreamOpts.audioActive;
|
||||
}
|
||||
if (this.hasVideo) {
|
||||
this.videoActive = this.inboundStreamOpts.videoActive;
|
||||
this.typeOfVideo = (!this.inboundStreamOpts.typeOfVideo) ? undefined : this.inboundStreamOpts.typeOfVideo;
|
||||
this.frameRate = (this.inboundStreamOpts.frameRate === -1) ? undefined : this.inboundStreamOpts.frameRate;
|
||||
this.videoDimensions = this.inboundStreamOpts.videoDimensions;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// OutboundStreamOptions: stream belongs to a Publisher
|
||||
this.outboundStreamOpts = options;
|
||||
if (this.isSendVideo()) {
|
||||
if (this.isSendScreen()) {
|
||||
this.typeOfVideo = 'SCREEN';
|
||||
}
|
||||
else {
|
||||
this.typeOfVideo = 'CAMERA';
|
||||
}
|
||||
this.frameRate = this.outboundStreamOpts.publisherProperties.frameRate;
|
||||
}
|
||||
else {
|
||||
delete this.typeOfVideo;
|
||||
}
|
||||
this.hasAudio = this.isSendAudio();
|
||||
this.hasVideo = this.isSendVideo();
|
||||
if (this.hasAudio) {
|
||||
this.audioActive = !!this.outboundStreamOpts.publisherProperties.publishAudio;
|
||||
}
|
||||
if (this.hasVideo) {
|
||||
this.videoActive = !!this.outboundStreamOpts.publisherProperties.publishVideo;
|
||||
this.frameRate = this.outboundStreamOpts.publisherProperties.frameRate;
|
||||
if (this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack) {
|
||||
this.typeOfVideo = 'CUSTOM';
|
||||
}
|
||||
else {
|
||||
this.typeOfVideo = this.isSendScreen() ? 'SCREEN' : 'CAMERA';
|
||||
}
|
||||
}
|
||||
}
|
||||
this.ee.on('mediastream-updated', function () {
|
||||
_this.streamManager.updateMediaStream(_this.mediaStream);
|
||||
|
@ -311,24 +324,37 @@ var Stream = /** @class */ (function () {
|
|||
var successCallback = function (sdpOfferParam) {
|
||||
console.debug('Sending SDP offer to publish as '
|
||||
+ _this.streamId, sdpOfferParam);
|
||||
var typeOfVideo = '';
|
||||
if (_this.isSendVideo()) {
|
||||
typeOfVideo = _this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack ? 'CUSTOM' : (_this.isSendScreen() ? 'SCREEN' : 'CAMERA');
|
||||
}
|
||||
_this.session.openvidu.sendRequest('publishVideo', {
|
||||
sdpOffer: sdpOfferParam,
|
||||
doLoopback: _this.displayMyRemote() || false,
|
||||
audioActive: _this.isSendAudio(),
|
||||
videoActive: _this.isSendVideo(),
|
||||
typeOfVideo: ((_this.isSendVideo()) ? (_this.isSendScreen() ? 'SCREEN' : 'CAMERA') : ''),
|
||||
frameRate: !!_this.frameRate ? _this.frameRate : -1
|
||||
hasAudio: _this.isSendAudio(),
|
||||
hasVideo: _this.isSendVideo(),
|
||||
audioActive: _this.audioActive,
|
||||
videoActive: _this.videoActive,
|
||||
typeOfVideo: typeOfVideo,
|
||||
frameRate: !!_this.frameRate ? _this.frameRate : -1,
|
||||
videoDimensions: JSON.stringify(_this.videoDimensions)
|
||||
}, function (error, response) {
|
||||
if (error) {
|
||||
reject('Error on publishVideo: ' + JSON.stringify(error));
|
||||
if (error.code === 401) {
|
||||
reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED, "You don't have permissions to publish"));
|
||||
}
|
||||
else {
|
||||
reject('Error on publishVideo: ' + JSON.stringify(error));
|
||||
}
|
||||
}
|
||||
else {
|
||||
_this.webRtcPeer.processAnswer(response.sdpAnswer)
|
||||
.then(function () {
|
||||
_this.streamId = response.id;
|
||||
_this.isLocalStreamPublished = true;
|
||||
_this.publishedOnce = true;
|
||||
if (_this.displayMyRemote()) {
|
||||
_this.remotePeerSuccesfullyEstablished();
|
||||
_this.remotePeerSuccessfullyEstablished();
|
||||
}
|
||||
_this.ee.emitEvent('stream-created-by-publisher');
|
||||
_this.initWebRtcStats();
|
||||
|
@ -357,8 +383,8 @@ var Stream = /** @class */ (function () {
|
|||
var _this = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var offerConstraints = {
|
||||
audio: _this.inboundStreamOpts.recvAudio,
|
||||
video: _this.inboundStreamOpts.recvVideo
|
||||
audio: _this.inboundStreamOpts.hasAudio,
|
||||
video: _this.inboundStreamOpts.hasVideo
|
||||
};
|
||||
console.debug("'Session.subscribe(Stream)' called. Constraints of generate SDP offer", offerConstraints);
|
||||
var options = {
|
||||
|
@ -379,7 +405,7 @@ var Stream = /** @class */ (function () {
|
|||
}
|
||||
else {
|
||||
_this.webRtcPeer.processAnswer(response.sdpAnswer).then(function () {
|
||||
_this.remotePeerSuccesfullyEstablished();
|
||||
_this.remotePeerSuccessfullyEstablished();
|
||||
_this.initWebRtcStats();
|
||||
resolve();
|
||||
})["catch"](function (error) {
|
||||
|
@ -397,7 +423,7 @@ var Stream = /** @class */ (function () {
|
|||
});
|
||||
});
|
||||
};
|
||||
Stream.prototype.remotePeerSuccesfullyEstablished = function () {
|
||||
Stream.prototype.remotePeerSuccessfullyEstablished = function () {
|
||||
this.mediaStream = this.webRtcPeer.pc.getRemoteStreams()[0];
|
||||
console.debug('Peer remote stream', this.mediaStream);
|
||||
if (!!this.mediaStream) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -119,6 +119,10 @@ export declare class StreamManager implements EventDispatcher {
|
|||
* @hidden
|
||||
*/
|
||||
updateMediaStream(mediaStream: MediaStream): void;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
emitEvent(type: string, eventArray: any[]): void;
|
||||
private pushNewStreamManagerVideo;
|
||||
private mirrorVideo;
|
||||
}
|
||||
|
|
|
@ -90,12 +90,13 @@ var StreamManager = /** @class */ (function () {
|
|||
* See [[EventDispatcher.on]]
|
||||
*/
|
||||
StreamManager.prototype.on = function (type, handler) {
|
||||
var _this = this;
|
||||
this.ee.on(type, function (event) {
|
||||
if (event) {
|
||||
console.info("Event '" + type + "' triggered", event);
|
||||
console.info("Event '" + type + "' triggered by '" + (_this.remote ? 'Subscriber' : 'Publisher') + "'", event);
|
||||
}
|
||||
else {
|
||||
console.info("Event '" + type + "' triggered");
|
||||
console.info("Event '" + type + "' triggered by '" + (_this.remote ? 'Subscriber' : 'Publisher') + "'");
|
||||
}
|
||||
handler(event);
|
||||
});
|
||||
|
@ -180,7 +181,6 @@ var StreamManager = /** @class */ (function () {
|
|||
}
|
||||
}
|
||||
var returnNumber = 1;
|
||||
this.initializeVideoProperties(video);
|
||||
for (var _b = 0, _c = this.stream.session.streamManagers; _b < _c.length; _b++) {
|
||||
var streamManager = _c[_b];
|
||||
if (streamManager.disassociateVideo(video)) {
|
||||
|
@ -261,7 +261,10 @@ var StreamManager = /** @class */ (function () {
|
|||
* @hidden
|
||||
*/
|
||||
StreamManager.prototype.initializeVideoProperties = function (video) {
|
||||
video.srcObject = this.stream.getMediaStream();
|
||||
if (!(this.stream.isLocal() && this.stream.displayMyRemote())) {
|
||||
// Avoid setting the MediaStream into the srcObject if remote subscription before publishing
|
||||
video.srcObject = this.stream.getMediaStream();
|
||||
}
|
||||
video.autoplay = true;
|
||||
video.controls = false;
|
||||
if (!video.id) {
|
||||
|
@ -335,6 +338,12 @@ var StreamManager = /** @class */ (function () {
|
|||
streamManagerVideo.video.srcObject = mediaStream;
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
StreamManager.prototype.emitEvent = function (type, eventArray) {
|
||||
this.ee.emitEvent(type, eventArray);
|
||||
};
|
||||
StreamManager.prototype.pushNewStreamManagerVideo = function (streamManagerVideo) {
|
||||
this.videos.push(streamManagerVideo);
|
||||
this.addPlayEventToFirstVideo();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,42 +4,42 @@
|
|||
export declare enum OpenViduErrorName {
|
||||
/**
|
||||
* Browser is not supported by OpenVidu.
|
||||
* Returned uppon unsuccessful [[Session.connect]]
|
||||
* Returned upon unsuccessful [[Session.connect]]
|
||||
*/
|
||||
BROWSER_NOT_SUPPORTED = "BROWSER_NOT_SUPPORTED",
|
||||
/**
|
||||
* The user hasn't granted permissions to the required input device when the browser asked for them.
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]
|
||||
*/
|
||||
DEVICE_ACCESS_DENIED = "DEVICE_ACCESS_DENIED",
|
||||
/**
|
||||
* The user hasn't granted permissions to capture some desktop screen when the browser asked for them.
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]
|
||||
*/
|
||||
SCREEN_CAPTURE_DENIED = "SCREEN_CAPTURE_DENIED",
|
||||
/**
|
||||
* Browser does not support screen sharing.
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
SCREEN_SHARING_NOT_SUPPORTED = "SCREEN_SHARING_NOT_SUPPORTED",
|
||||
/**
|
||||
* Only for Chrome, there's no screen sharing extension installed
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
SCREEN_EXTENSION_NOT_INSTALLED = "SCREEN_EXTENSION_NOT_INSTALLED",
|
||||
/**
|
||||
* Only for Chrome, the screen sharing extension is installed but is disabled
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
SCREEN_EXTENSION_DISABLED = "SCREEN_EXTENSION_DISABLED",
|
||||
/**
|
||||
* No video input device found with the provided deviceId (property [[PublisherProperties.videoSource]])
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
INPUT_VIDEO_DEVICE_NOT_FOUND = "INPUT_VIDEO_DEVICE_NOT_FOUND",
|
||||
/**
|
||||
* No audio input device found with the provided deviceId (property [[PublisherProperties.audioSource]])
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
INPUT_AUDIO_DEVICE_NOT_FOUND = "INPUT_AUDIO_DEVICE_NOT_FOUND",
|
||||
/**
|
||||
|
@ -50,11 +50,12 @@ export declare enum OpenViduErrorName {
|
|||
/**
|
||||
* Some media property of [[PublisherProperties]] such as `frameRate` or `resolution` is not supported
|
||||
* by the input devices (whenever it is possible they are automatically adjusted to the most similar value).
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
PUBLISHER_PROPERTIES_ERROR = "PUBLISHER_PROPERTIES_ERROR",
|
||||
/**
|
||||
* _Not in use yet_
|
||||
* The client tried to call a method without the required permissions. This can occur for methods [[Session.publish]],
|
||||
* [[Session.forceUnpublish]] and [[Session.forceDisconnect]]
|
||||
*/
|
||||
OPENVIDU_PERMISSION_DENIED = "OPENVIDU_PERMISSION_DENIED",
|
||||
/**
|
||||
|
|
|
@ -23,42 +23,42 @@ var OpenViduErrorName;
|
|||
(function (OpenViduErrorName) {
|
||||
/**
|
||||
* Browser is not supported by OpenVidu.
|
||||
* Returned uppon unsuccessful [[Session.connect]]
|
||||
* Returned upon unsuccessful [[Session.connect]]
|
||||
*/
|
||||
OpenViduErrorName["BROWSER_NOT_SUPPORTED"] = "BROWSER_NOT_SUPPORTED";
|
||||
/**
|
||||
* The user hasn't granted permissions to the required input device when the browser asked for them.
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]
|
||||
*/
|
||||
OpenViduErrorName["DEVICE_ACCESS_DENIED"] = "DEVICE_ACCESS_DENIED";
|
||||
/**
|
||||
* The user hasn't granted permissions to capture some desktop screen when the browser asked for them.
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]]
|
||||
*/
|
||||
OpenViduErrorName["SCREEN_CAPTURE_DENIED"] = "SCREEN_CAPTURE_DENIED";
|
||||
/**
|
||||
* Browser does not support screen sharing.
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
OpenViduErrorName["SCREEN_SHARING_NOT_SUPPORTED"] = "SCREEN_SHARING_NOT_SUPPORTED";
|
||||
/**
|
||||
* Only for Chrome, there's no screen sharing extension installed
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
OpenViduErrorName["SCREEN_EXTENSION_NOT_INSTALLED"] = "SCREEN_EXTENSION_NOT_INSTALLED";
|
||||
/**
|
||||
* Only for Chrome, the screen sharing extension is installed but is disabled
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
OpenViduErrorName["SCREEN_EXTENSION_DISABLED"] = "SCREEN_EXTENSION_DISABLED";
|
||||
/**
|
||||
* No video input device found with the provided deviceId (property [[PublisherProperties.videoSource]])
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
OpenViduErrorName["INPUT_VIDEO_DEVICE_NOT_FOUND"] = "INPUT_VIDEO_DEVICE_NOT_FOUND";
|
||||
/**
|
||||
* No audio input device found with the provided deviceId (property [[PublisherProperties.audioSource]])
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
OpenViduErrorName["INPUT_AUDIO_DEVICE_NOT_FOUND"] = "INPUT_AUDIO_DEVICE_NOT_FOUND";
|
||||
/**
|
||||
|
@ -69,11 +69,12 @@ var OpenViduErrorName;
|
|||
/**
|
||||
* Some media property of [[PublisherProperties]] such as `frameRate` or `resolution` is not supported
|
||||
* by the input devices (whenever it is possible they are automatically adjusted to the most similar value).
|
||||
* Returned uppon unsuccessful [[OpenVidu.initPublisher]]
|
||||
* Returned upon unsuccessful [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
OpenViduErrorName["PUBLISHER_PROPERTIES_ERROR"] = "PUBLISHER_PROPERTIES_ERROR";
|
||||
/**
|
||||
* _Not in use yet_
|
||||
* The client tried to call a method without the required permissions. This can occur for methods [[Session.publish]],
|
||||
* [[Session.forceUnpublish]] and [[Session.forceDisconnect]]
|
||||
*/
|
||||
OpenViduErrorName["OPENVIDU_PERMISSION_DENIED"] = "OPENVIDU_PERMISSION_DENIED";
|
||||
/**
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"OpenViduError.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Enums/OpenViduError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH;;GAEG;AACH,IAAY,iBA6EX;AA7ED,WAAY,iBAAiB;IAEzB;;;OAGG;IACH,oEAA+C,CAAA;IAE/C;;;OAGG;IACH,kEAA6C,CAAA;IAE7C;;;OAGG;IACH,oEAA+C,CAAA;IAE/C;;;OAGG;IACH,kFAA6D,CAAA;IAE7D;;;OAGG;IACH,sFAAiE,CAAA;IAEjE;;;OAGG;IACH,4EAAuD,CAAA;IAEvD;;;OAGG;IACH,kFAA6D,CAAA;IAE7D;;;OAGG;IACH,kFAA6D,CAAA;IAE7D;;;OAGG;IACH,gEAA2C,CAAA;IAE3C;;;;OAIG;IACH,8EAAyD,CAAA;IAEzD;;OAEG;IACH,8EAAyD,CAAA;IAEzD;;OAEG;IACH,sEAAiD,CAAA;IAEjD;;OAEG;IACH,oDAA+B,CAAA;AACnC,CAAC,EA7EW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA6E5B;AAED;;GAEG;AACH;IAKI;;OAEG;IACH,uBAAY,IAAuB,EAAE,OAAe;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa"}
|
||||
{"version":3,"file":"OpenViduError.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Enums/OpenViduError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH;;GAEG;AACH,IAAY,iBA8EX;AA9ED,WAAY,iBAAiB;IAEzB;;;OAGG;IACH,oEAA+C,CAAA;IAE/C;;;OAGG;IACH,kEAA6C,CAAA;IAE7C;;;OAGG;IACH,oEAA+C,CAAA;IAE/C;;;OAGG;IACH,kFAA6D,CAAA;IAE7D;;;OAGG;IACH,sFAAiE,CAAA;IAEjE;;;OAGG;IACH,4EAAuD,CAAA;IAEvD;;;OAGG;IACH,kFAA6D,CAAA;IAE7D;;;OAGG;IACH,kFAA6D,CAAA;IAE7D;;;OAGG;IACH,gEAA2C,CAAA;IAE3C;;;;OAIG;IACH,8EAAyD,CAAA;IAEzD;;;OAGG;IACH,8EAAyD,CAAA;IAEzD;;OAEG;IACH,sEAAiD,CAAA;IAEjD;;OAEG;IACH,oDAA+B,CAAA;AACnC,CAAC,EA9EW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA8E5B;AAED;;GAEG;AACH;IAKI;;OAEG;IACH,uBAAY,IAAuB,EAAE,OAAe;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa"}
|
|
@ -14,6 +14,9 @@ export declare class ConnectionEvent extends Event {
|
|||
/**
|
||||
* For 'connectionDestroyed' event:
|
||||
* - "disconnect": the remote user has called `Session.disconnect()`
|
||||
* - "forceDisconnectByUser": the remote user has been evicted from the Session by other user calling `Session.forceDisconnect()`
|
||||
* - "forceDisconnectByServer": the remote user has been evicted from the Session by the application
|
||||
* - "sessionClosedByServer": the Session has been closed by the application
|
||||
* - "networkDisconnect": the remote user network connection has dropped
|
||||
*
|
||||
* For 'connectionCreated' empty string
|
||||
|
@ -26,5 +29,5 @@ export declare class ConnectionEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
callDefaultBehaviour(): void;
|
||||
callDefaultBehavior(): void;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ var ConnectionEvent = /** @class */ (function (_super) {
|
|||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
ConnectionEvent.prototype.callDefaultBehaviour = function () { };
|
||||
ConnectionEvent.prototype.callDefaultBehavior = function () { };
|
||||
return ConnectionEvent;
|
||||
}(Event_1.Event));
|
||||
exports.ConnectionEvent = ConnectionEvent;
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"ConnectionEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/ConnectionEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAKhC;;;;GAIG;AACH;IAAqC,mCAAK;IAgBtC;;OAEG;IACH,yBAAY,UAAmB,EAAE,MAAe,EAAE,IAAY,EAAE,UAAsB,EAAE,MAAc;QAAtG,YACI,kBAAM,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,SAGlC;QAFG,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,8CAAoB,GAApB,cAAyB,CAAC;IAE9B,sBAAC;AAAD,CAAC,AA/BD,CAAqC,aAAK,GA+BzC;AA/BY,0CAAe"}
|
||||
{"version":3,"file":"ConnectionEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/ConnectionEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAKhC;;;;GAIG;AACH;IAAqC,mCAAK;IAmBtC;;OAEG;IACH,yBAAY,UAAmB,EAAE,MAAe,EAAE,IAAY,EAAE,UAAsB,EAAE,MAAc;QAAtG,YACI,kBAAM,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,SAGlC;QAFG,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,6CAAmB,GAAnB,cAAwB,CAAC;IAE7B,sBAAC;AAAD,CAAC,AAlCD,CAAqC,aAAK,GAkCzC;AAlCY,0CAAe"}
|
|
@ -2,7 +2,7 @@ import { StreamManager } from '../../OpenVidu/StreamManager';
|
|||
import { Session } from '../../OpenVidu/Session';
|
||||
export declare abstract class Event {
|
||||
/**
|
||||
* Whether the event has a default behaviour that may be prevented by calling [[Event.preventDefault]]
|
||||
* Whether the event has a default behavior that may be prevented by calling [[Event.preventDefault]]
|
||||
*/
|
||||
cancelable: boolean;
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ export declare abstract class Event {
|
|||
*/
|
||||
isDefaultPrevented(): boolean;
|
||||
/**
|
||||
* Prevents the default behaviour of the event. The following events have a default behaviour:
|
||||
* Prevents the default behavior of the event. The following events have a default behavior:
|
||||
*
|
||||
* - `sessionDisconnected`: dispatched by [[Session]] object, automatically unsubscribes the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)
|
||||
* and also deletes any HTML video element associated to each Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement` in method [[Session.subscribe]] or
|
||||
|
@ -37,5 +37,5 @@ export declare abstract class Event {
|
|||
* by calling [[Subscriber.createVideoElement]]). For every video removed, the Subscriber object will also dispatch a `videoElementDestroyed` event.
|
||||
*/
|
||||
preventDefault(): void;
|
||||
protected abstract callDefaultBehaviour(): any;
|
||||
protected abstract callDefaultBehavior(): any;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ var Event = /** @class */ (function () {
|
|||
return this.hasBeenPrevented;
|
||||
};
|
||||
/**
|
||||
* Prevents the default behaviour of the event. The following events have a default behaviour:
|
||||
* Prevents the default behavior of the event. The following events have a default behavior:
|
||||
*
|
||||
* - `sessionDisconnected`: dispatched by [[Session]] object, automatically unsubscribes the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)
|
||||
* and also deletes any HTML video element associated to each Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement` in method [[Session.subscribe]] or
|
||||
|
@ -48,7 +48,7 @@ var Event = /** @class */ (function () {
|
|||
*/
|
||||
Event.prototype.preventDefault = function () {
|
||||
// tslint:disable-next-line:no-empty
|
||||
this.callDefaultBehaviour = function () { };
|
||||
this.callDefaultBehavior = function () { };
|
||||
this.hasBeenPrevented = true;
|
||||
};
|
||||
return Event;
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/Event.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAKH;IAmBI;;OAEG;IACH,eAAY,UAAmB,EAAE,MAA+B,EAAE,IAAY;QALtE,qBAAgB,GAAG,KAAK,CAAC;QAM7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,kCAAkB,GAAlB;QACI,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,8BAAc,GAAd;QACI,oCAAoC;QACpC,IAAI,CAAC,oBAAoB,GAAG,cAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IACjC,CAAC;IAIL,YAAC;AAAD,CAAC,AAzDD,IAyDC;AAzDqB,sBAAK"}
|
||||
{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/Event.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAKH;IAmBI;;OAEG;IACH,eAAY,UAAmB,EAAE,MAA+B,EAAE,IAAY;QALtE,qBAAgB,GAAG,KAAK,CAAC;QAM7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,kCAAkB,GAAlB;QACI,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,8BAAc,GAAd;QACI,oCAAoC;QACpC,IAAI,CAAC,mBAAmB,GAAG,cAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IACjC,CAAC;IAIL,YAAC;AAAD,CAAC,AAzDD,IAyDC;AAzDqB,sBAAK"}
|
|
@ -28,5 +28,5 @@ export declare class PublisherSpeakingEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
callDefaultBehaviour(): void;
|
||||
callDefaultBehavior(): void;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ var PublisherSpeakingEvent = /** @class */ (function (_super) {
|
|||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
PublisherSpeakingEvent.prototype.callDefaultBehaviour = function () { };
|
||||
PublisherSpeakingEvent.prototype.callDefaultBehavior = function () { };
|
||||
return PublisherSpeakingEvent;
|
||||
}(Event_1.Event));
|
||||
exports.PublisherSpeakingEvent = PublisherSpeakingEvent;
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"PublisherSpeakingEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/PublisherSpeakingEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAKhC;;;;;;;;;;GAUG;AACH;IAA4C,0CAAK;IAY7C;;OAEG;IACH,gCAAY,MAAe,EAAE,IAAY,EAAE,UAAsB,EAAE,QAAgB;QAAnF,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,SAI7B;QAHG,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;;IAC7B,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,qDAAoB,GAApB,cAAyB,CAAC;IAE9B,6BAAC;AAAD,CAAC,AA5BD,CAA4C,aAAK,GA4BhD;AA5BY,wDAAsB"}
|
||||
{"version":3,"file":"PublisherSpeakingEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/PublisherSpeakingEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAKhC;;;;;;;;;;GAUG;AACH;IAA4C,0CAAK;IAY7C;;OAEG;IACH,gCAAY,MAAe,EAAE,IAAY,EAAE,UAAsB,EAAE,QAAgB;QAAnF,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,SAI7B;QAHG,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;;IAC7B,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,oDAAmB,GAAnB,cAAwB,CAAC;IAE7B,6BAAC;AAAD,CAAC,AA5BD,CAA4C,aAAK,GA4BhD;AA5BY,wDAAsB"}
|
|
@ -13,8 +13,8 @@ export declare class RecordingEvent extends Event {
|
|||
/**
|
||||
* The recording name you supplied to openvidu-server. For example, to name your recording file MY_RECORDING:
|
||||
* - With **API REST**: POST to `/api/recordings/start` passing JSON body `{"session":"sessionId","name":"MY_RECORDING"}`
|
||||
* - With **openvidu-java-client**: `OpenVidu.startRecording(sessionId, MY_RECORDING)` or `OpenVidu.startRecording(sessionId, new RecordingProperties.Builder().name(MY_RECORDING).build())`
|
||||
* - With **openvidu-node-client**: `OpenVidu.startRecording(sessionId, MY_RECORDING)` or `OpenVidu.startRecording(sessionId, new RecordingProperties.Builder().name(MY_RECORDING).build())`
|
||||
* - With **openvidu-java-client**: `OpenVidu.startRecording(sessionId, "MY_RECORDING")` or `OpenVidu.startRecording(sessionId, new RecordingProperties.Builder().name("MY_RECORDING").build())`
|
||||
* - With **openvidu-node-client**: `OpenVidu.startRecording(sessionId, "MY_RECORDING")` or `OpenVidu.startRecording(sessionId, {name: "MY_RECORDING"})`
|
||||
*
|
||||
* If no name is supplied, this property will be undefined and the recorded file will be named after property [[id]]
|
||||
*/
|
||||
|
@ -26,5 +26,5 @@ export declare class RecordingEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
callDefaultBehaviour(): void;
|
||||
callDefaultBehavior(): void;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ var RecordingEvent = /** @class */ (function (_super) {
|
|||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
RecordingEvent.prototype.callDefaultBehaviour = function () { };
|
||||
RecordingEvent.prototype.callDefaultBehavior = function () { };
|
||||
return RecordingEvent;
|
||||
}(Event_1.Event));
|
||||
exports.RecordingEvent = RecordingEvent;
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"RecordingEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/RecordingEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAIhC;;;;GAIG;AACH;IAAoC,kCAAK;IAiBrC;;OAEG;IACH,wBAAY,MAAe,EAAE,IAAY,EAAE,EAAU,EAAE,IAAY;QAAnE,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,SAK7B;QAJG,KAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,IAAI,KAAK,EAAE,EAAE;YACb,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;SACpB;;IACL,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,6CAAoB,GAApB,cAAyB,CAAC;IAE9B,qBAAC;AAAD,CAAC,AAlCD,CAAoC,aAAK,GAkCxC;AAlCY,wCAAc"}
|
||||
{"version":3,"file":"RecordingEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/RecordingEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAIhC;;;;GAIG;AACH;IAAoC,kCAAK;IAiBrC;;OAEG;IACH,wBAAY,MAAe,EAAE,IAAY,EAAE,EAAU,EAAE,IAAY;QAAnE,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,SAK7B;QAJG,KAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,IAAI,KAAK,EAAE,EAAE;YACb,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;SACpB;;IACL,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,4CAAmB,GAAnB,cAAwB,CAAC;IAE7B,qBAAC;AAAD,CAAC,AAlCD,CAAoC,aAAK,GAkCxC;AAlCY,wCAAc"}
|
|
@ -6,6 +6,9 @@ import { Session } from '../../OpenVidu/Session';
|
|||
export declare class SessionDisconnectedEvent extends Event {
|
||||
/**
|
||||
* - "disconnect": you have called `Session.disconnect()`
|
||||
* - "forceDisconnectByUser": you have been evicted from the Session by other user calling `Session.forceDisconnect()`
|
||||
* - "forceDisconnectByServer": you have been evicted from the Session by the application
|
||||
* - "sessionClosedByServer": the Session has been closed by the application
|
||||
* - "networkDisconnect": your network connection has dropped
|
||||
*/
|
||||
reason: string;
|
||||
|
@ -16,5 +19,5 @@ export declare class SessionDisconnectedEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
callDefaultBehaviour(): void;
|
||||
callDefaultBehavior(): void;
|
||||
}
|
||||
|
|
|
@ -43,8 +43,8 @@ var SessionDisconnectedEvent = /** @class */ (function (_super) {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
SessionDisconnectedEvent.prototype.callDefaultBehaviour = function () {
|
||||
console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Session'");
|
||||
SessionDisconnectedEvent.prototype.callDefaultBehavior = function () {
|
||||
console.info("Calling default behavior upon '" + this.type + "' event dispatched by 'Session'");
|
||||
var session = this.target;
|
||||
// Dispose and delete all remote Connections
|
||||
for (var connectionId in session.remoteConnections) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"SessionDisconnectedEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/SessionDisconnectedEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAIhC;;GAEG;AACH;IAA8C,4CAAK;IAQ/C;;OAEG;IACH,kCAAY,MAAe,EAAE,MAAc;QAA3C,YACI,kBAAM,IAAI,EAAE,MAAM,EAAE,qBAAqB,CAAC,SAE7C;QADG,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED;;OAEG;IACH,uDAAoB,GAApB;QAEI,OAAO,CAAC,IAAI,CAAC,kCAAkC,GAAG,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC,CAAC;QAEjG,IAAM,OAAO,GAAY,IAAI,CAAC,MAAM,CAAC;QAErC,4CAA4C;QAC5C,KAAK,IAAM,YAAY,IAAI,OAAO,CAAC,iBAAiB,EAAE;YAClD,IAAI,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE;gBAClD,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;gBACnE,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBACpE,IAAI,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE;oBAC9D,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;iBAClF;gBACD,OAAO,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBAC7F,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;aACrD;YACD,OAAO,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;SAClD;IACL,CAAC;IAEL,+BAAC;AAAD,CAAC,AAxCD,CAA8C,aAAK,GAwClD;AAxCY,4DAAwB"}
|
||||
{"version":3,"file":"SessionDisconnectedEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/SessionDisconnectedEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAIhC;;GAEG;AACH;IAA8C,4CAAK;IAW/C;;OAEG;IACH,kCAAY,MAAe,EAAE,MAAc;QAA3C,YACI,kBAAM,IAAI,EAAE,MAAM,EAAE,qBAAqB,CAAC,SAE7C;QADG,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED;;OAEG;IACH,sDAAmB,GAAnB;QAEI,OAAO,CAAC,IAAI,CAAC,iCAAiC,GAAG,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC,CAAC;QAEhG,IAAM,OAAO,GAAY,IAAI,CAAC,MAAM,CAAC;QAErC,4CAA4C;QAC5C,KAAK,IAAM,YAAY,IAAI,OAAO,CAAC,iBAAiB,EAAE;YAClD,IAAI,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE;gBAClD,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;gBACnE,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBACpE,IAAI,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE;oBAC9D,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;iBAClF;gBACD,OAAO,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBAC7F,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;aACrD;YACD,OAAO,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;SAClD;IACL,CAAC;IAEL,+BAAC;AAAD,CAAC,AA3CD,CAA8C,aAAK,GA2ClD;AA3CY,4DAAwB"}
|
|
@ -30,5 +30,5 @@ export declare class SignalEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
callDefaultBehaviour(): void;
|
||||
callDefaultBehavior(): void;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ var SignalEvent = /** @class */ (function (_super) {
|
|||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
SignalEvent.prototype.callDefaultBehaviour = function () { };
|
||||
SignalEvent.prototype.callDefaultBehavior = function () { };
|
||||
return SignalEvent;
|
||||
}(Event_1.Event));
|
||||
exports.SignalEvent = SignalEvent;
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"SignalEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/SignalEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAKhC;;;;GAIG;AACH;IAAiC,+BAAK;IAqBlC;;OAEG;IACH,qBAAY,MAAe,EAAE,IAAY,EAAE,IAAY,EAAE,IAAgB;QAAzE,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,SAI7B;QAHG,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,0CAAoB,GAApB,cAAyB,CAAC;IAE9B,kBAAC;AAAD,CAAC,AArCD,CAAiC,aAAK,GAqCrC;AArCY,kCAAW"}
|
||||
{"version":3,"file":"SignalEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/SignalEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAKhC;;;;GAIG;AACH;IAAiC,+BAAK;IAqBlC;;OAEG;IACH,qBAAY,MAAe,EAAE,IAAY,EAAE,IAAY,EAAE,IAAgB;QAAzE,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,SAI7B;QAHG,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,yCAAmB,GAAnB,cAAwB,CAAC;IAE7B,kBAAC;AAAD,CAAC,AArCD,CAAiC,aAAK,GAqCrC;AArCY,kCAAW"}
|
|
@ -16,6 +16,11 @@ export declare class StreamEvent extends Event {
|
|||
* For 'streamDestroyed' event:
|
||||
* - "unpublish": method `Session.unpublish()` has been called
|
||||
* - "disconnect": method `Session.disconnect()` has been called
|
||||
* - "forceUnpublishByUser": some user has called `Session.forceUnpublish()` over the Stream
|
||||
* - "forceDisconnectByUser": some user has called `Session.forceDisconnect()` over the Stream
|
||||
* - "forceUnpublishByServer": the user's stream has been unpublished from the Session by the application
|
||||
* - "forceDisconnectByServer": the user has been evicted from the Session by the application
|
||||
* - "sessionClosedByServer": the Session has been closed by the application
|
||||
* - "networkDisconnect": the user's network connection has dropped
|
||||
*
|
||||
* For 'streamCreated' empty string
|
||||
|
@ -28,5 +33,5 @@ export declare class StreamEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
callDefaultBehaviour(): void;
|
||||
callDefaultBehavior(): void;
|
||||
}
|
||||
|
|
|
@ -48,17 +48,26 @@ var StreamEvent = /** @class */ (function (_super) {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
StreamEvent.prototype.callDefaultBehaviour = function () {
|
||||
StreamEvent.prototype.callDefaultBehavior = function () {
|
||||
if (this.type === 'streamDestroyed') {
|
||||
if (this.target instanceof Session_1.Session) {
|
||||
// Remote Stream
|
||||
console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Session'");
|
||||
console.info("Calling default behavior upon '" + this.type + "' event dispatched by 'Session'");
|
||||
this.stream.disposeWebRtcPeer();
|
||||
}
|
||||
else if (this.target instanceof Publisher_1.Publisher) {
|
||||
// Local Stream
|
||||
console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Publisher'");
|
||||
console.info("Calling default behavior upon '" + this.type + "' event dispatched by 'Publisher'");
|
||||
clearInterval(this.target.screenShareResizeInterval);
|
||||
this.stream.isLocalStreamReadyToPublish = false;
|
||||
// Delete Publisher object from OpenVidu publishers array
|
||||
var openviduPublishers = this.target.openvidu.publishers;
|
||||
for (var i = 0; i < openviduPublishers.length; i++) {
|
||||
if (openviduPublishers[i] === this.target) {
|
||||
openviduPublishers.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Dispose the MediaStream local object
|
||||
this.stream.disposeMediaStream();
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"StreamEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/StreamEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAChC,sDAAqD;AACrD,kDAAiD;AAIjD;;;;GAIG;AACH;IAAiC,+BAAK;IAiBlC;;OAEG;IACH,qBAAY,UAAmB,EAAE,MAA2B,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAA1G,YACI,kBAAM,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,SAGlC;QAFG,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED;;OAEG;IACH,0CAAoB,GAApB;QACI,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,EAAE;YAEjC,IAAI,IAAI,CAAC,MAAM,YAAY,iBAAO,EAAE;gBAChC,gBAAgB;gBAChB,OAAO,CAAC,IAAI,CAAC,kCAAkC,GAAG,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC,CAAC;gBACjG,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;aACnC;iBAAM,IAAI,IAAI,CAAC,MAAM,YAAY,qBAAS,EAAE;gBACzC,eAAe;gBACf,OAAO,CAAC,IAAI,CAAC,kCAAkC,GAAG,IAAI,CAAC,IAAI,GAAG,mCAAmC,CAAC,CAAC;gBACnG,IAAI,CAAC,MAAM,CAAC,2BAA2B,GAAG,KAAK,CAAC;aACnD;YAED,uCAAuC;YACvC,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC;YAEjC,mGAAmG;YACnG,mDAAmD;YACnD,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa;gBAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;YAE3E,sDAAsD;YACtD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAEtE,oDAAoD;YACpD,IAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YACpG,IAAI,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE;gBAClD,IAAM,mBAAmB,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC;gBAC7D,KAAK,IAAI,CAAC,GAAG,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE;oBACtD,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;wBACpD,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;qBACpC;iBACJ;aACJ;SAEJ;IACL,CAAC;IAEL,kBAAC;AAAD,CAAC,AAlED,CAAiC,aAAK,GAkErC;AAlEY,kCAAW"}
|
||||
{"version":3,"file":"StreamEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/StreamEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAChC,sDAAqD;AACrD,kDAAiD;AAIjD;;;;GAIG;AACH;IAAiC,+BAAK;IAsBlC;;OAEG;IACH,qBAAY,UAAmB,EAAE,MAA2B,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAA1G,YACI,kBAAM,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,SAGlC;QAFG,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED;;OAEG;IACH,yCAAmB,GAAnB;QACI,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,EAAE;YAEjC,IAAI,IAAI,CAAC,MAAM,YAAY,iBAAO,EAAE;gBAChC,gBAAgB;gBAChB,OAAO,CAAC,IAAI,CAAC,iCAAiC,GAAG,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC,CAAC;gBAChG,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;aACnC;iBAAM,IAAI,IAAI,CAAC,MAAM,YAAY,qBAAS,EAAE;gBACzC,eAAe;gBACf,OAAO,CAAC,IAAI,CAAC,iCAAiC,GAAG,IAAI,CAAC,IAAI,GAAG,mCAAmC,CAAC,CAAC;gBAClG,aAAa,CAAa,IAAI,CAAC,MAAO,CAAC,yBAAyB,CAAC,CAAC;gBAClE,IAAI,CAAC,MAAM,CAAC,2BAA2B,GAAG,KAAK,CAAC;gBAEhD,yDAAyD;gBACzD,IAAM,kBAAkB,GAAe,IAAI,CAAC,MAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;gBACxE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBAChD,IAAI,kBAAkB,CAAC,CAAC,CAAC,KAAiB,IAAI,CAAC,MAAO,EAAE;wBACpD,kBAAkB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;wBAChC,MAAM;qBACT;iBACJ;aACJ;YAED,uCAAuC;YACvC,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC;YAEjC,mGAAmG;YACnG,mDAAmD;YACnD,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa;gBAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;YAE3E,sDAAsD;YACtD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAEtE,oDAAoD;YACpD,IAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YACpG,IAAI,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE;gBAClD,IAAM,mBAAmB,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC;gBAC7D,KAAK,IAAI,CAAC,GAAG,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE;oBACtD,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;wBACpD,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;qBACpC;iBACJ;aACJ;SAEJ;IACL,CAAC;IAEL,kBAAC;AAAD,CAAC,AAjFD,CAAiC,aAAK,GAiFrC;AAjFY,kCAAW"}
|
|
@ -12,5 +12,5 @@ export declare class StreamManagerEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
callDefaultBehaviour(): void;
|
||||
callDefaultBehavior(): void;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ var StreamManagerEvent = /** @class */ (function (_super) {
|
|||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
StreamManagerEvent.prototype.callDefaultBehaviour = function () { };
|
||||
StreamManagerEvent.prototype.callDefaultBehavior = function () { };
|
||||
return StreamManagerEvent;
|
||||
}(Event_1.Event));
|
||||
exports.StreamManagerEvent = StreamManagerEvent;
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"StreamManagerEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/StreamManagerEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAGhC;;;GAGG;AACH;IAAwC,sCAAK;IAEzC;;OAEG;IACH,4BAAY,MAAqB;eAC7B,kBAAM,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,iDAAoB,GAApB,cAAyB,CAAC;IAE9B,yBAAC;AAAD,CAAC,AAfD,CAAwC,aAAK,GAe5C;AAfY,gDAAkB"}
|
||||
{"version":3,"file":"StreamManagerEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/StreamManagerEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAGhC;;;GAGG;AACH;IAAwC,sCAAK;IAEzC;;OAEG;IACH,4BAAY,MAAqB;eAC7B,kBAAM,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,gDAAmB,GAAnB,cAAwB,CAAC;IAE7B,yBAAC;AAAD,CAAC,AAfD,CAAwC,aAAK,GAe5C;AAfY,gDAAkB"}
|
|
@ -18,5 +18,5 @@ export declare class VideoElementEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
callDefaultBehaviour(): void;
|
||||
callDefaultBehavior(): void;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ var VideoElementEvent = /** @class */ (function (_super) {
|
|||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
VideoElementEvent.prototype.callDefaultBehaviour = function () { };
|
||||
VideoElementEvent.prototype.callDefaultBehavior = function () { };
|
||||
return VideoElementEvent;
|
||||
}(Event_1.Event));
|
||||
exports.VideoElementEvent = VideoElementEvent;
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"VideoElementEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/VideoElementEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAIhC;;;;;GAKG;AACH;IAAuC,qCAAK;IAOxC;;OAEG;IACH,2BAAY,OAAyB,EAAE,MAAqB,EAAE,IAAY;QAA1E,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,SAE7B;QADG,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;;IAC3B,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,gDAAoB,GAApB,cAAyB,CAAC;IAE9B,wBAAC;AAAD,CAAC,AArBD,CAAuC,aAAK,GAqB3C;AArBY,8CAAiB"}
|
||||
{"version":3,"file":"VideoElementEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/VideoElementEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,iCAAgC;AAIhC;;;;;GAKG;AACH;IAAuC,qCAAK;IAOxC;;OAEG;IACH,2BAAY,OAAyB,EAAE,MAAqB,EAAE,IAAY;QAA1E,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,SAE7B;QADG,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;;IAC3B,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,+CAAmB,GAAnB,cAAwB,CAAC;IAE7B,wBAAC;AAAD,CAAC,AArBD,CAAuC,aAAK,GAqB3C;AArBY,8CAAiB"}
|
|
@ -2,8 +2,14 @@ import { Connection } from '../../../OpenVidu/Connection';
|
|||
export interface InboundStreamOptions {
|
||||
id: string;
|
||||
connection: Connection;
|
||||
frameRate: number;
|
||||
recvAudio: boolean;
|
||||
recvVideo: boolean;
|
||||
hasAudio: boolean;
|
||||
hasVideo: boolean;
|
||||
audioActive: boolean;
|
||||
videoActive: boolean;
|
||||
typeOfVideo: string;
|
||||
frameRate: number;
|
||||
videoDimensions: {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
export interface StreamOptionsServer {
|
||||
id: string;
|
||||
hasAudio: boolean;
|
||||
hasVideo: boolean;
|
||||
audioActive: boolean;
|
||||
frameRate: number;
|
||||
videoActive: boolean;
|
||||
typeOfVideo: string;
|
||||
frameRate: number;
|
||||
videoDimensions: string;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,9 @@ export interface PublisherProperties {
|
|||
*/
|
||||
audioSource?: string | MediaStreamTrack | boolean;
|
||||
/**
|
||||
* Desired framerate of the video in frames per second
|
||||
* Desired framerate of the video in frames per second.
|
||||
* Limiting the framerate has always effect on browsers Chrome and Opera. Firefox requires that the input device explicitly supports the desired framerate.
|
||||
* @default undefined
|
||||
*/
|
||||
frameRate?: number;
|
||||
/**
|
||||
|
|
|
@ -11,21 +11,21 @@ export interface StreamManagerVideo {
|
|||
/**
|
||||
* The DOM HTMLElement assigned as target element when creating a video for the StreamManager. This property is defined when:
|
||||
* - [[OpenVidu.initPublisher]] or [[Session.subscribe]] methods have been called passing a valid `targetElement` parameter.
|
||||
* - [[SessionManager.createVideoElement]] has been called.
|
||||
* - [[StreamManager.createVideoElement]] has been called.
|
||||
*
|
||||
* This property is undefined when:
|
||||
* - [[OpenVidu.initPublisher]] or [[Session.subscribe]] methods have been called passing *null* or *undefined* as `targetElement` parameter.
|
||||
* - [[SessionManager.addVideoElement]] has been called.
|
||||
* - [[StreamManager.addVideoElement]] has been called.
|
||||
*/
|
||||
targetElement?: HTMLElement;
|
||||
/**
|
||||
* How the DOM video element should be inserted with respect to `targetElement`. This property is defined when:
|
||||
* - [[OpenVidu.initPublisher]] or [[Session.subscribe]] methods have been called passing a valid `targetElement` parameter.
|
||||
* - [[SessionManager.createVideoElement]] has been called.
|
||||
* - [[StreamManager.createVideoElement]] has been called.
|
||||
*
|
||||
* This property is undefined when:
|
||||
* - [[OpenVidu.initPublisher]] or [[Session.subscribe]] methods have been called passing *null* or *undefined* as `targetElement` parameter.
|
||||
* - [[SessionManager.addVideoElement]] has been called.
|
||||
* - [[StreamManager.addVideoElement]] has been called.
|
||||
*/
|
||||
insertMode?: VideoInsertMode;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ export { SignalEvent } from './OpenViduInternal/Events/SignalEvent';
|
|||
export { StreamEvent } from './OpenViduInternal/Events/StreamEvent';
|
||||
export { StreamManagerEvent } from './OpenViduInternal/Events/StreamManagerEvent';
|
||||
export { VideoElementEvent } from './OpenViduInternal/Events/VideoElementEvent';
|
||||
export { StreamPropertyChangedEvent } from './OpenViduInternal/Events/StreamPropertyChangedEvent';
|
||||
export { Capabilities } from './OpenViduInternal/Interfaces/Public/Capabilities';
|
||||
export { Device } from './OpenViduInternal/Interfaces/Public/Device';
|
||||
export { EventDispatcher } from './OpenViduInternal/Interfaces/Public/EventDispatcher';
|
||||
export { OpenViduAdvancedConfiguration } from './OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration';
|
||||
|
|
|
@ -40,4 +40,6 @@ var StreamManagerEvent_1 = require("./OpenViduInternal/Events/StreamManagerEvent
|
|||
exports.StreamManagerEvent = StreamManagerEvent_1.StreamManagerEvent;
|
||||
var VideoElementEvent_1 = require("./OpenViduInternal/Events/VideoElementEvent");
|
||||
exports.VideoElementEvent = VideoElementEvent_1.VideoElementEvent;
|
||||
var StreamPropertyChangedEvent_1 = require("./OpenViduInternal/Events/StreamPropertyChangedEvent");
|
||||
exports.StreamPropertyChangedEvent = StreamPropertyChangedEvent_1.StreamPropertyChangedEvent;
|
||||
//# sourceMappingURL=index.js.map
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,gDAA+C;AAAtC,8BAAA,QAAQ,CAAA;AACjB,8CAA6C;AAApC,4BAAA,OAAO,CAAA;AAChB,kDAAiD;AAAxC,gCAAA,SAAS,CAAA;AAClB,oDAAmD;AAA1C,kCAAA,UAAU,CAAA;AACnB,0DAAyD;AAAhD,wCAAA,aAAa,CAAA;AACtB,4CAA2C;AAAlC,0BAAA,MAAM,CAAA;AACf,oDAAmD;AAA1C,kCAAA,UAAU,CAAA;AACnB,0DAAyD;AAAhD,wCAAA,aAAa,CAAA;AAEtB,kFAAiF;AAAxE,kDAAA,kBAAkB,CAAA;AAC3B,wEAAuE;AAA9D,wCAAA,aAAa,CAAA;AACtB,4EAA2E;AAAlE,4CAAA,eAAe,CAAA;AAExB,yDAAwD;AAA/C,wBAAA,KAAK,CAAA;AACd,6EAA4E;AAAnE,4CAAA,eAAe,CAAA;AACxB,2FAA0F;AAAjF,0DAAA,sBAAsB,CAAA;AAC/B,2EAA0E;AAAjE,0CAAA,cAAc,CAAA;AACvB,+FAA8F;AAArF,8DAAA,wBAAwB,CAAA;AACjC,qEAAoE;AAA3D,oCAAA,WAAW,CAAA;AACpB,qEAAoE;AAA3D,oCAAA,WAAW,CAAA;AACpB,mFAAkF;AAAzE,kDAAA,kBAAkB,CAAA;AAC3B,iFAAgF;AAAvE,gDAAA,iBAAiB,CAAA"}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,gDAA+C;AAAtC,8BAAA,QAAQ,CAAA;AACjB,8CAA6C;AAApC,4BAAA,OAAO,CAAA;AAChB,kDAAiD;AAAxC,gCAAA,SAAS,CAAA;AAClB,oDAAmD;AAA1C,kCAAA,UAAU,CAAA;AACnB,0DAAyD;AAAhD,wCAAA,aAAa,CAAA;AACtB,4CAA2C;AAAlC,0BAAA,MAAM,CAAA;AACf,oDAAmD;AAA1C,kCAAA,UAAU,CAAA;AACnB,0DAAyD;AAAhD,wCAAA,aAAa,CAAA;AAEtB,kFAAiF;AAAxE,kDAAA,kBAAkB,CAAA;AAC3B,wEAAuE;AAA9D,wCAAA,aAAa,CAAA;AACtB,4EAA2E;AAAlE,4CAAA,eAAe,CAAA;AAExB,yDAAwD;AAA/C,wBAAA,KAAK,CAAA;AACd,6EAA4E;AAAnE,4CAAA,eAAe,CAAA;AACxB,2FAA0F;AAAjF,0DAAA,sBAAsB,CAAA;AAC/B,2EAA0E;AAAjE,0CAAA,cAAc,CAAA;AACvB,+FAA8F;AAArF,8DAAA,wBAAwB,CAAA;AACjC,qEAAoE;AAA3D,oCAAA,WAAW,CAAA;AACpB,qEAAoE;AAA3D,oCAAA,WAAW,CAAA;AACpB,mFAAkF;AAAzE,kDAAA,kBAAkB,CAAA;AAC3B,iFAAgF;AAAvE,gDAAA,iBAAiB,CAAA;AAC1B,mGAAkG;AAAzF,kEAAA,0BAA0B,CAAA"}
|
|
@ -1,48 +1,48 @@
|
|||
{
|
||||
"author": "OpenVidu",
|
||||
"author": "OpenVidu",
|
||||
"dependencies": {
|
||||
"@types/node": "10.5.1",
|
||||
"@types/platform": "1.3.1",
|
||||
"freeice": "2.2.0",
|
||||
"hark": "1.2.0",
|
||||
"platform": "1.3.5",
|
||||
"uuid": "3.3.2",
|
||||
"webrtc-adapter": "6.2.1",
|
||||
"@types/node": "10.5.1",
|
||||
"@types/platform": "1.3.1",
|
||||
"freeice": "2.2.0",
|
||||
"hark": "1.2.0",
|
||||
"platform": "1.3.5",
|
||||
"uuid": "3.3.2",
|
||||
"webrtc-adapter": "6.2.1",
|
||||
"wolfy87-eventemitter": "5.2.5"
|
||||
},
|
||||
"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.20",
|
||||
"tsify": "4.0.0",
|
||||
"tslint": "5.10.0",
|
||||
"typedoc": "0.11.1",
|
||||
"typedoc-plugin-sourcefile-url": "1.0.3",
|
||||
"typescript": "2.9.2",
|
||||
"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.20",
|
||||
"tsify": "4.0.0",
|
||||
"tslint": "5.10.0",
|
||||
"typedoc": "0.11.1",
|
||||
"typedoc-plugin-sourcefile-url": "1.0.3",
|
||||
"typescript": "2.9.2",
|
||||
"uglify-js": "3.4.3"
|
||||
},
|
||||
"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.2.0"
|
||||
}
|
||||
},
|
||||
"types": "lib/index.d.ts",
|
||||
"version": "2.3.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
|
@ -12,7 +12,7 @@
|
|||
<packaging>jar</packaging>
|
||||
|
||||
<name>OpenVidu Server</name>
|
||||
<version>2.2.0</version>
|
||||
<version>2.3.0</version>
|
||||
<description>OpenVidu Server</description>
|
||||
<url>https://github.com/OpenVidu/openvidu</url>
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
style-loader@0.21.0
|
||||
webpack@4.8.3
|
||||
MIT
|
||||
Copyright JS Foundation and other contributors
|
||||
|
||||
|
@ -67,114 +67,6 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@angular/animations@6.0.7
|
||||
MIT
|
||||
MIT
|
||||
|
||||
@angular/cdk@6.3.2
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Google LLC.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@angular/common@6.0.7
|
||||
MIT
|
||||
MIT
|
||||
|
||||
@angular/compiler@6.0.7
|
||||
MIT
|
||||
MIT
|
||||
|
||||
@angular/core@6.0.7
|
||||
MIT
|
||||
MIT
|
||||
|
||||
@angular/flex-layout@6.0.0-beta.16
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Google LLC.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@angular/forms@6.0.7
|
||||
MIT
|
||||
MIT
|
||||
|
||||
@angular/http@6.0.7
|
||||
MIT
|
||||
MIT
|
||||
|
||||
@angular/material@6.3.2
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Google LLC.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@angular/platform-browser-dynamic@6.0.7
|
||||
MIT
|
||||
MIT
|
||||
|
||||
@angular/platform-browser@6.0.7
|
||||
MIT
|
||||
MIT
|
||||
|
||||
@angular/router@6.0.7
|
||||
MIT
|
||||
MIT
|
||||
|
||||
hammerjs@2.0.8
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
@ -197,289 +89,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
rxjs@6.2.1
|
||||
Apache-2.0
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
tslib@1.9.2
|
||||
Apache-2.0
|
||||
Apache License
|
||||
|
||||
Version 2.0, January 2004
|
||||
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
|
||||
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
|
||||
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
webpack@4.8.3
|
||||
MIT
|
||||
Copyright JS Foundation and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE.
|
|
@ -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.0918eeab8c842f3404f7.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.00780dfe2f8480c954bc.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
|
@ -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
Loading…
Reference in New Issue