From 653b77a0c89239914d4e30c94b6b3fdfb886d770 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Tue, 22 Jan 2019 15:40:21 +0100 Subject: [PATCH] openvidu-node-client: lib compilation folder removed from repo --- .../typedoc/custom-theme/assets/js/main.js | 2 +- openvidu-node-client/lib/OpenVidu.d.ts | 124 ---- openvidu-node-client/lib/OpenVidu.js | 651 ------------------ openvidu-node-client/lib/OpenVidu.js.map | 1 - openvidu-node-client/lib/OpenViduRole.d.ts | 18 - openvidu-node-client/lib/OpenViduRole.js | 38 - openvidu-node-client/lib/OpenViduRole.js.map | 1 - openvidu-node-client/lib/Session.d.ts | 95 --- openvidu-node-client/lib/Session.js | 495 ------------- openvidu-node-client/lib/Session.js.map | 1 - openvidu-node-client/lib/TokenOptions.d.ts | 45 -- openvidu-node-client/lib/TokenOptions.js | 19 - openvidu-node-client/lib/TokenOptions.js.map | 1 - openvidu-node-client/lib/index.d.ts | 12 - openvidu-node-client/lib/index.js | 15 - openvidu-node-client/lib/index.js.map | 1 - 16 files changed, 1 insertion(+), 1518 deletions(-) delete mode 100644 openvidu-node-client/lib/OpenVidu.d.ts delete mode 100644 openvidu-node-client/lib/OpenVidu.js delete mode 100644 openvidu-node-client/lib/OpenVidu.js.map delete mode 100644 openvidu-node-client/lib/OpenViduRole.d.ts delete mode 100644 openvidu-node-client/lib/OpenViduRole.js delete mode 100644 openvidu-node-client/lib/OpenViduRole.js.map delete mode 100644 openvidu-node-client/lib/Session.d.ts delete mode 100644 openvidu-node-client/lib/Session.js delete mode 100644 openvidu-node-client/lib/Session.js.map delete mode 100644 openvidu-node-client/lib/TokenOptions.d.ts delete mode 100644 openvidu-node-client/lib/TokenOptions.js delete mode 100644 openvidu-node-client/lib/TokenOptions.js.map delete mode 100644 openvidu-node-client/lib/index.d.ts delete mode 100644 openvidu-node-client/lib/index.js delete mode 100644 openvidu-node-client/lib/index.js.map diff --git a/openvidu-node-client/config/typedoc/custom-theme/assets/js/main.js b/openvidu-node-client/config/typedoc/custom-theme/assets/js/main.js index 53ba8d40..18944250 100644 --- a/openvidu-node-client/config/typedoc/custom-theme/assets/js/main.js +++ b/openvidu-node-client/config/typedoc/custom-theme/assets/js/main.js @@ -4,7 +4,7 @@ var __extends = (this && this.__extends) || (function () { ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); - } + }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/openvidu-node-client/lib/OpenVidu.d.ts b/openvidu-node-client/lib/OpenVidu.d.ts deleted file mode 100644 index 161eb8db..00000000 --- a/openvidu-node-client/lib/OpenVidu.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Recording } from './Recording'; -import { RecordingProperties } from './RecordingProperties'; -import { Session } from './Session'; -import { SessionProperties } from './SessionProperties'; -export declare class OpenVidu { - private urlOpenViduServer; - private Buffer; - /** - * @hidden - */ - static hostname: string; - /** - * @hidden - */ - static port: number; - /** - * @hidden - */ - static basicAuth: string; - /** - * @hidden - */ - static readonly API_RECORDINGS: string; - /** - * @hidden - */ - static readonly API_RECORDINGS_START: string; - /** - * @hidden - */ - static readonly API_RECORDINGS_STOP: string; - /** - * @hidden - */ - static readonly API_SESSIONS: string; - /** - * @hidden - */ - static readonly API_TOKENS: string; - private static o; - /** - * Array of active sessions. **This value will remain unchanged since the last time method [[OpenVidu.fetch]] - * was called**. Exceptions to this rule are: - * - * - Calling [[Session.fetch]] updates that specific Session status - * - Calling [[Session.close]] automatically removes the Session from the list of active Sessions - * - Calling [[Session.forceDisconnect]] automatically updates the inner affected connections for that specific Session - * - Calling [[Session.forceUnpublish]] also automatically updates the inner affected connections for that specific Session - * - Calling [[OpenVidu.startRecording]] and [[OpenVidu.stopRecording]] automatically updates the recording status of the - * Session ([[Session.recording]]) - * - * To get the array of active sessions with their current actual value, you must call [[OpenVidu.fetch]] before consulting - * property [[activeSessions]] - */ - activeSessions: Session[]; - /** - * @param urlOpenViduServer Public accessible IP where your instance of OpenVidu Server is up an running - * @param secret Secret used on OpenVidu Server initialization - */ - constructor(urlOpenViduServer: string, secret: string); - /** - * Creates an OpenVidu session. You can call [[Session.getSessionId]] inside the resolved promise to retrieve the `sessionId` - * - * @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not. - */ - createSession(properties?: SessionProperties): Promise; - startRecording(sessionId: string): Promise; - startRecording(sessionId: string, name: string): Promise; - startRecording(sessionId: string, properties: RecordingProperties): Promise; - /** - * Stops the recording of a [[Session]] - * - * @param recordingId The `id` property of the [[Recording]] you want to stop - * - * @returns A Promise that is resolved to the [[Recording]] if it successfully stopped and rejected with an Error object if not. This Error object has as `message` property with the following values: - * - `404`: no recording exists for the passed `recordingId` - * - `406`: recording has `starting` status. Wait until `started` status before stopping the recording - */ - stopRecording(recordingId: string): Promise; - /** - * Gets an existing [[Recording]] - * - * @param recordingId The `id` property of the [[Recording]] you want to retrieve - * - * @returns A Promise that is resolved to the [[Recording]] if it successfully stopped and rejected with an Error object if not. This Error object has as `message` property with the following values: - * - `404`: no recording exists for the passed `recordingId` - */ - getRecording(recordingId: string): Promise; - /** - * Lists all existing recordings - * - * @returns A Promise that is resolved to an array with all existing recordings - */ - listRecordings(): Promise; - /** - * Deletes a [[Recording]]. The recording must have status `stopped` or `available` - * - * @param recordingId - * - * @returns A Promise that is resolved if the Recording was successfully deleted and rejected with an Error object if not. This Error object has as `message` property with the following values: - * - `404`: no recording exists for the passed `recordingId` - * - `409`: the recording has `started` status. Stop it before deletion - */ - deleteRecording(recordingId: string): Promise; - /** - * Updates every property of every active Session with the current status they have in OpenVidu Server. - * After calling this method you can access the updated array of active sessions in [[activeSessions]] - * - * @returns A promise resolved to true if any Session status has changed with respect to the server, or to false if not. - * This applies to any property or sub-property of any of the sessions locally stored in OpenVidu Node Client - */ - fetch(): Promise; - /** - * @hidden - * @returns A map paring every existing sessionId with true or false depending on whether it has changed or not - */ - fetchWebRtc(): Promise; - private getBasicAuth; - private setHostnameAndPort; - /** - * @hidden - */ - static getActiveSessions(): Session[]; -} diff --git a/openvidu-node-client/lib/OpenVidu.js b/openvidu-node-client/lib/OpenVidu.js deleted file mode 100644 index 5e07f862..00000000 --- a/openvidu-node-client/lib/OpenVidu.js +++ /dev/null @@ -1,651 +0,0 @@ -"use strict"; -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * 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. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var axios_1 = require("axios"); -var Publisher_1 = require("./Publisher"); -var Recording_1 = require("./Recording"); -var Session_1 = require("./Session"); -var OpenVidu = /** @class */ (function () { - /** - * @param urlOpenViduServer Public accessible IP where your instance of OpenVidu Server is up an running - * @param secret Secret used on OpenVidu Server initialization - */ - function OpenVidu(urlOpenViduServer, secret) { - this.urlOpenViduServer = urlOpenViduServer; - this.Buffer = require('buffer/').Buffer; - /** - * Array of active sessions. **This value will remain unchanged since the last time method [[OpenVidu.fetch]] - * was called**. Exceptions to this rule are: - * - * - Calling [[Session.fetch]] updates that specific Session status - * - Calling [[Session.close]] automatically removes the Session from the list of active Sessions - * - Calling [[Session.forceDisconnect]] automatically updates the inner affected connections for that specific Session - * - Calling [[Session.forceUnpublish]] also automatically updates the inner affected connections for that specific Session - * - Calling [[OpenVidu.startRecording]] and [[OpenVidu.stopRecording]] automatically updates the recording status of the - * Session ([[Session.recording]]) - * - * To get the array of active sessions with their current actual value, you must call [[OpenVidu.fetch]] before consulting - * property [[activeSessions]] - */ - this.activeSessions = []; - this.setHostnameAndPort(); - OpenVidu.basicAuth = this.getBasicAuth(secret); - OpenVidu.o = this; - } - /** - * Creates an OpenVidu session. You can call [[Session.getSessionId]] inside the resolved promise to retrieve the `sessionId` - * - * @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not. - */ - OpenVidu.prototype.createSession = function (properties) { - var _this = this; - return new Promise(function (resolve, reject) { - var session = new Session_1.Session(properties); - session.getSessionIdHttp() - .then(function (sessionId) { - _this.activeSessions.push(session); - resolve(session); - }) - .catch(function (error) { - reject(error); - }); - }); - }; - /** - * Starts the recording of a [[Session]] - * - * @param sessionId The `sessionId` of the [[Session]] you want to start recording - * @param name The name you want to give to the video file. You can access this same value in your clients on recording events (`recordingStarted`, `recordingStopped`) - * **WARNING: this parameter follows an overwriting policy.** If you name two recordings the same, the newest MP4 file will overwrite the oldest one - * - * @returns A Promise that is resolved to the [[Recording]] if it successfully started (the recording can be stopped with guarantees) and rejected with an Error object if not. This Error object has as `message` property with the following values: - * - `404`: no session exists for the passed `sessionId` - * - `400`: the session has no connected participants - * - `409`: the session is not configured for using [[MediaMode.ROUTED]] or it is already being recorded - * - `501`: OpenVidu Server recording module is disabled (`openvidu.recording` property set to `false`) - */ - OpenVidu.prototype.startRecording = function (sessionId, param2) { - var _this = this; - return new Promise(function (resolve, reject) { - var data; - if (!!param2) { - if (!(typeof param2 === 'string')) { - var properties = param2; - data = JSON.stringify({ - session: sessionId, - name: !!properties.name ? properties.name : '', - recordingLayout: !!properties.recordingLayout ? properties.recordingLayout : '', - customLayout: !!properties.customLayout ? properties.customLayout : '' - }); - } - else { - data = JSON.stringify({ - session: sessionId, - name: param2, - recordingLayout: '', - customLayout: '' - }); - } - } - else { - data = JSON.stringify({ - session: sessionId, - name: '', - recordingLayout: '', - customLayout: '' - }); - } - axios_1.default.post('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_START, data, { - headers: { - 'Authorization': OpenVidu.basicAuth, - 'Content-Type': 'application/json' - } - }) - .then(function (res) { - if (res.status === 200) { - // SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording - var r_1 = new Recording_1.Recording(res.data); - var activeSession = _this.activeSessions.find(function (s) { return s.sessionId === r_1.sessionId; }); - if (!!activeSession) { - activeSession.recording = true; - } - else { - console.warn("No active session found for sessionId '" + r_1.sessionId + "'. This instance of OpenVidu Node Client didn't create this session"); - } - resolve(r_1); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - } - }); - }); - }; - /** - * Stops the recording of a [[Session]] - * - * @param recordingId The `id` property of the [[Recording]] you want to stop - * - * @returns A Promise that is resolved to the [[Recording]] if it successfully stopped and rejected with an Error object if not. This Error object has as `message` property with the following values: - * - `404`: no recording exists for the passed `recordingId` - * - `406`: recording has `starting` status. Wait until `started` status before stopping the recording - */ - OpenVidu.prototype.stopRecording = function (recordingId) { - var _this = this; - return new Promise(function (resolve, reject) { - axios_1.default.post('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_STOP + '/' + recordingId, undefined, { - headers: { - 'Authorization': OpenVidu.basicAuth, - 'Content-Type': 'application/x-www-form-urlencoded' - } - }) - .then(function (res) { - if (res.status === 200) { - // SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording - var r_2 = new Recording_1.Recording(res.data); - var activeSession = _this.activeSessions.find(function (s) { return s.sessionId === r_2.sessionId; }); - if (!!activeSession) { - activeSession.recording = false; - } - else { - console.warn("No active session found for sessionId '" + r_2.sessionId + "'. This instance of OpenVidu Node Client didn't create this session"); - } - resolve(r_2); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received `error.request` is an instance of XMLHttpRequest - // in the browser and an instance of http.ClientRequest in node.js - console.error(error.request); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - } - }); - }); - }; - /** - * Gets an existing [[Recording]] - * - * @param recordingId The `id` property of the [[Recording]] you want to retrieve - * - * @returns A Promise that is resolved to the [[Recording]] if it successfully stopped and rejected with an Error object if not. This Error object has as `message` property with the following values: - * - `404`: no recording exists for the passed `recordingId` - */ - OpenVidu.prototype.getRecording = function (recordingId) { - return new Promise(function (resolve, reject) { - axios_1.default.get('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS + '/' + recordingId, { - headers: { - 'Authorization': OpenVidu.basicAuth, - 'Content-Type': 'application/x-www-form-urlencoded' - } - }) - .then(function (res) { - if (res.status === 200) { - // SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording - resolve(new Recording_1.Recording(res.data)); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - } - }); - }); - }; - /** - * Lists all existing recordings - * - * @returns A Promise that is resolved to an array with all existing recordings - */ - OpenVidu.prototype.listRecordings = function () { - return new Promise(function (resolve, reject) { - axios_1.default.get('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS, { - headers: { - Authorization: OpenVidu.basicAuth - } - }) - .then(function (res) { - if (res.status === 200) { - // SUCCESS response from openvidu-server (JSON arrays of recordings in JSON format). Resolve list of new recordings - var recordingArray = []; - var responseItems = res.data.items; - for (var _i = 0, responseItems_1 = responseItems; _i < responseItems_1.length; _i++) { - var item = responseItems_1[_i]; - recordingArray.push(new Recording_1.Recording(item)); - } - resolve(recordingArray); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - } - }); - }); - }; - /** - * Deletes a [[Recording]]. The recording must have status `stopped` or `available` - * - * @param recordingId - * - * @returns A Promise that is resolved if the Recording was successfully deleted and rejected with an Error object if not. This Error object has as `message` property with the following values: - * - `404`: no recording exists for the passed `recordingId` - * - `409`: the recording has `started` status. Stop it before deletion - */ - OpenVidu.prototype.deleteRecording = function (recordingId) { - return new Promise(function (resolve, reject) { - axios_1.default.delete('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS + '/' + recordingId, { - headers: { - 'Authorization': OpenVidu.basicAuth, - 'Content-Type': 'application/x-www-form-urlencoded' - } - }) - .then(function (res) { - if (res.status === 204) { - // SUCCESS response from openvidu-server. Resolve undefined - resolve(undefined); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - } - }); - }); - }; - /** - * Updates every property of every active Session with the current status they have in OpenVidu Server. - * After calling this method you can access the updated array of active sessions in [[activeSessions]] - * - * @returns A promise resolved to true if any Session status has changed with respect to the server, or to false if not. - * This applies to any property or sub-property of any of the sessions locally stored in OpenVidu Node Client - */ - OpenVidu.prototype.fetch = function () { - var _this = this; - return new Promise(function (resolve, reject) { - axios_1.default.get('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_SESSIONS, { - headers: { - Authorization: OpenVidu.basicAuth - } - }) - .then(function (res) { - if (res.status === 200) { - // Array to store fetched sessionIds and later remove closed sessions - var fetchedSessionIds_1 = []; - // Boolean to store if any Session has changed - var hasChanged_1 = false; - res.data.content.forEach(function (session) { - fetchedSessionIds_1.push(session.sessionId); - var sessionIndex = -1; - var storedSession = _this.activeSessions.find(function (s, index) { - if (s.sessionId === session.sessionId) { - sessionIndex = index; - return true; - } - else { - return false; - } - }); - if (!!storedSession) { - var fetchedSession = new Session_1.Session().resetSessionWithJson(session); - var changed = !storedSession.equalTo(fetchedSession); - if (changed) { - storedSession = fetchedSession; - _this.activeSessions[sessionIndex] = storedSession; - } - console.log("Available session '" + storedSession.sessionId + "' info fetched. Any change: " + changed); - hasChanged_1 = hasChanged_1 || changed; - } - else { - _this.activeSessions.push(new Session_1.Session(session)); - console.log("New session '" + session.sessionId + "' info fetched"); - hasChanged_1 = true; - } - }); - // Remove closed sessions from activeSessions array - _this.activeSessions = _this.activeSessions.filter(function (session) { - if (fetchedSessionIds_1.includes(session.sessionId)) { - return true; - } - else { - console.log("Removing closed session '" + session.sessionId + "'"); - hasChanged_1 = true; - return false; - } - }); - console.log('Active sessions info fetched: ', fetchedSessionIds_1); - resolve(hasChanged_1); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - } - }); - }); - }; - /** - * @hidden - * @returns A map paring every existing sessionId with true or false depending on whether it has changed or not - */ - OpenVidu.prototype.fetchWebRtc = function () { - var _this = this; - // tslint:disable:no-string-literal - var addWebRtcStatsToConnections = function (connection, connectionsExtendedInfo) { - var connectionExtended = connectionsExtendedInfo.find(function (c) { return c.connectionId === connection.connectionId; }); - if (!!connectionExtended) { - var publisherArray_1 = []; - connection.publishers.forEach(function (pub) { - var publisherExtended = connectionExtended.publishers.find(function (p) { return p.streamId === pub.streamId; }); - var pubAux = {}; - // Standard properties - pubAux['streamId'] = pub.streamId; - pubAux['createdAt'] = pub.createdAt; - var mediaOptions = { - audioActive: pub.audioActive, - videoActive: pub.videoActive, - hasAudio: pub.hasAudio, - hasVideo: pub.hasVideo, - typeOfVideo: pub.typeOfVideo, - frameRate: pub.frameRate, - videoDimensions: pub.videoDimensions - }; - pubAux['mediaOptions'] = mediaOptions; - var newPublisher = new Publisher_1.Publisher(pubAux); - // WebRtc properties - newPublisher['webRtc'] = { - kms: { - events: publisherExtended.events, - localCandidate: publisherExtended.localCandidate, - remoteCandidate: publisherExtended.remoteCandidate, - receivedCandidates: publisherExtended.receivedCandidates, - webrtcTagName: publisherExtended.webrtcTagName - } - }; - newPublisher['localCandidatePair'] = parseRemoteCandidatePair(newPublisher['webRtc'].kms.remoteCandidate); - if (!!publisherExtended.serverStats) { - newPublisher['webRtc'].kms.serverStats = publisherExtended.serverStats; - } - publisherArray_1.push(newPublisher); - }); - var subscriberArray_1 = []; - connection.subscribers.forEach(function (sub) { - var subscriberExtended = connectionExtended.subscribers.find(function (s) { return s.streamId === sub; }); - var subAux = {}; - // Standard properties - subAux['streamId'] = sub; - subAux['publisher'] = subscriberExtended.publisher; - // WebRtc properties - subAux['createdAt'] = subscriberExtended.createdAt; - subAux['webRtc'] = { - kms: { - events: subscriberExtended.events, - localCandidate: subscriberExtended.localCandidate, - remoteCandidate: subscriberExtended.remoteCandidate, - receivedCandidates: subscriberExtended.receivedCandidates, - webrtcTagName: subscriberExtended.webrtcTagName - } - }; - subAux['localCandidatePair'] = parseRemoteCandidatePair(subAux['webRtc'].kms.remoteCandidate); - if (!!subscriberExtended.serverStats) { - subAux['webRtc'].kms.serverStats = subscriberExtended.serverStats; - } - subscriberArray_1.push(subAux); - }); - connection.publishers = publisherArray_1; - connection.subscribers = subscriberArray_1; - } - }; - var parseRemoteCandidatePair = function (candidateStr) { - if (!candidateStr) { - return 'ERROR: No remote candidate available'; - } - var array = candidateStr.split(/\s+/); - return { - portNumber: array[5], - ipAddress: array[4], - transport: array[2].toLowerCase(), - candidateType: array[7], - priority: array[3], - raw: candidateStr - }; - }; - return new Promise(function (resolve, reject) { - axios_1.default.get('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_SESSIONS + '?webRtcStats=true', { - headers: { - Authorization: OpenVidu.basicAuth - } - }) - .then(function (res) { - if (res.status === 200) { - // Array to store fetched sessionIds and later remove closed sessions - var fetchedSessionIds_2 = []; - // Global changes - var globalChanges_1 = false; - // Collection of sessionIds telling whether each one of them has changed or not - var sessionChanges_1 = {}; - res.data.content.forEach(function (session) { - fetchedSessionIds_2.push(session.sessionId); - var sessionIndex = -1; - var storedSession = _this.activeSessions.find(function (s, index) { - if (s.sessionId === session.sessionId) { - sessionIndex = index; - return true; - } - else { - return false; - } - }); - if (!!storedSession) { - var fetchedSession = new Session_1.Session().resetSessionWithJson(session); - fetchedSession.activeConnections.forEach(function (connection) { - addWebRtcStatsToConnections(connection, session.connections.content); - }); - var changed_1 = !storedSession.equalTo(fetchedSession); - if (!changed_1) { // Check if server webrtc information has changed in any Publisher object (Session.equalTo does not check Publisher.webRtc auxiliary object) - fetchedSession.activeConnections.forEach(function (connection, index1) { - for (var index2 = 0; (index2 < connection['publishers'].length && !changed_1); index2++) { - changed_1 = changed_1 || JSON.stringify(connection['publishers'][index2]['webRtc']) !== JSON.stringify(storedSession.activeConnections[index1]['publishers'][index2]['webRtc']); - } - }); - } - if (changed_1) { - storedSession = fetchedSession; - _this.activeSessions[sessionIndex] = storedSession; - } - console.log("Available session '" + storedSession.sessionId + "' info fetched. Any change: " + changed_1); - sessionChanges_1[storedSession.sessionId] = changed_1; - globalChanges_1 = globalChanges_1 || changed_1; - } - else { - var newSession = new Session_1.Session(session); - newSession.activeConnections.forEach(function (connection) { - addWebRtcStatsToConnections(connection, session.connections.content); - }); - _this.activeSessions.push(newSession); - console.log("New session '" + session.sessionId + "' info fetched"); - sessionChanges_1[session.sessionId] = true; - globalChanges_1 = true; - } - }); - // Remove closed sessions from activeSessions array - _this.activeSessions = _this.activeSessions.filter(function (session) { - if (fetchedSessionIds_2.includes(session.sessionId)) { - return true; - } - else { - console.log("Removing closed session '" + session.sessionId + "'"); - sessionChanges_1[session.sessionId] = true; - globalChanges_1 = true; - return false; - } - }); - console.log('Active sessions info fetched: ', fetchedSessionIds_2); - resolve({ changes: globalChanges_1, sessionChanges: sessionChanges_1 }); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - } - }); - }); - }; - // tslint:enable:no-string-literal - OpenVidu.prototype.getBasicAuth = function (secret) { - return 'Basic ' + this.Buffer('OPENVIDUAPP:' + secret).toString('base64'); - }; - OpenVidu.prototype.setHostnameAndPort = function () { - var urlSplitted = this.urlOpenViduServer.split(':'); - if (urlSplitted.length === 3) { // URL has format: http:// + hostname + :port - OpenVidu.hostname = this.urlOpenViduServer.split(':')[1].replace(/\//g, ''); - OpenVidu.port = parseInt(this.urlOpenViduServer.split(':')[2].replace(/\//g, '')); - } - else if (urlSplitted.length === 2) { // URL has format: hostname + :port - OpenVidu.hostname = this.urlOpenViduServer.split(':')[0].replace(/\//g, ''); - OpenVidu.port = parseInt(this.urlOpenViduServer.split(':')[1].replace(/\//g, '')); - } - else { - console.error("URL format incorrect: it must contain hostname and port (current value: '" + this.urlOpenViduServer + "')"); - } - }; - /** - * @hidden - */ - OpenVidu.getActiveSessions = function () { - return this.o.activeSessions; - }; - /** - * @hidden - */ - OpenVidu.API_RECORDINGS = '/api/recordings'; - /** - * @hidden - */ - OpenVidu.API_RECORDINGS_START = '/start'; - /** - * @hidden - */ - OpenVidu.API_RECORDINGS_STOP = '/stop'; - /** - * @hidden - */ - OpenVidu.API_SESSIONS = '/api/sessions'; - /** - * @hidden - */ - OpenVidu.API_TOKENS = '/api/tokens'; - return OpenVidu; -}()); -exports.OpenVidu = OpenVidu; -//# sourceMappingURL=OpenVidu.js.map \ No newline at end of file diff --git a/openvidu-node-client/lib/OpenVidu.js.map b/openvidu-node-client/lib/OpenVidu.js.map deleted file mode 100644 index c2db959f..00000000 --- a/openvidu-node-client/lib/OpenVidu.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OpenVidu.js","sourceRoot":"","sources":["../src/OpenVidu.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,+BAA0B;AAE1B,yCAAwC;AACxC,yCAAwC;AAExC,qCAAoC;AASpC;IAyDE;;;OAGG;IACH,kBAAoB,iBAAyB,EAAE,MAAc;QAAzC,sBAAiB,GAAjB,iBAAiB,CAAQ;QA3DrC,WAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;QAuC3C;;;;;;;;;;;;;WAaG;QACH,mBAAc,GAAc,EAAE,CAAC;QAO7B,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAC/C,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACI,gCAAa,GAApB,UAAqB,UAA8B;QAAnD,iBAYC;QAXC,OAAO,IAAI,O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xB;QACE,OAAO,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC;IAC/B,CAAC;IAjoBD;;OAEG;IACa,uBAAc,GAAW,iBAAiB,CAAC;IAC3D;;OAEG;IACa,6BAAoB,GAAW,QAAQ,CAAC;IACxD;;OAEG;IACa,4BAAmB,GAAW,OAAO,CAAC;IACtD;;OAEG;IACa,qBAAY,GAAG,eAAe,CAAC;IAC/C;;OAEG;IACa,mBAAU,GAAG,aAAa,CAAC;IAgnB7C,eAAC;CAAA,AAppBD,IAopBC;AAppBY,4BAAQ"} \ No newline at end of file diff --git a/openvidu-node-client/lib/OpenViduRole.d.ts b/openvidu-node-client/lib/OpenViduRole.d.ts deleted file mode 100644 index 12a73fc3..00000000 --- a/openvidu-node-client/lib/OpenViduRole.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * See [[TokenOptions.role]] - */ -export declare enum OpenViduRole { - /** - * Can subscribe to published Streams of other users - */ - SUBSCRIBER = "SUBSCRIBER", - /** - * SUBSCRIBER permissions + can publish their own Streams (call `Session.publish()`) - */ - PUBLISHER = "PUBLISHER", - /** - * SUBSCRIBER + PUBLISHER permissions + can force the unpublishing or disconnection over a third-party Stream or Connection - * (call `Session.forceUnpublish()` and `Session.forceDisconnect()`) - */ - MODERATOR = "MODERATOR" -} diff --git a/openvidu-node-client/lib/OpenViduRole.js b/openvidu-node-client/lib/OpenViduRole.js deleted file mode 100644 index f66b4331..00000000 --- a/openvidu-node-client/lib/OpenViduRole.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * 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. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * See [[TokenOptions.role]] - */ -var OpenViduRole; -(function (OpenViduRole) { - /** - * Can subscribe to published Streams of other users - */ - OpenViduRole["SUBSCRIBER"] = "SUBSCRIBER"; - /** - * SUBSCRIBER permissions + can publish their own Streams (call `Session.publish()`) - */ - OpenViduRole["PUBLISHER"] = "PUBLISHER"; - /** - * SUBSCRIBER + PUBLISHER permissions + can force the unpublishing or disconnection over a third-party Stream or Connection - * (call `Session.forceUnpublish()` and `Session.forceDisconnect()`) - */ - OpenViduRole["MODERATOR"] = "MODERATOR"; -})(OpenViduRole = exports.OpenViduRole || (exports.OpenViduRole = {})); -//# sourceMappingURL=OpenViduRole.js.map \ No newline at end of file diff --git a/openvidu-node-client/lib/OpenViduRole.js.map b/openvidu-node-client/lib/OpenViduRole.js.map deleted file mode 100644 index e5760036..00000000 --- a/openvidu-node-client/lib/OpenViduRole.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OpenViduRole.js","sourceRoot":"","sources":["../src/OpenViduRole.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH;;GAEG;AACH,IAAY,YAiBX;AAjBD,WAAY,YAAY;IAEpB;;OAEG;IACH,yCAAyB,CAAA;IAEzB;;OAEG;IACH,uCAAuB,CAAA;IAEvB;;;OAGG;IACH,uCAAuB,CAAA;AAC3B,CAAC,EAjBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAiBvB"} \ No newline at end of file diff --git a/openvidu-node-client/lib/Session.d.ts b/openvidu-node-client/lib/Session.d.ts deleted file mode 100644 index f4eaa4db..00000000 --- a/openvidu-node-client/lib/Session.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Connection } from './Connection'; -import { Publisher } from './Publisher'; -import { SessionProperties } from './SessionProperties'; -import { TokenOptions } from './TokenOptions'; -export declare class Session { - /** - * Unique identifier of the Session - */ - sessionId: string; - /** - * Timestamp when this session was created, in UTC milliseconds (ms since Jan 1, 1970, 00:00:00 UTC) - */ - createdAt: number; - /** - * Properties defining the session - */ - properties: SessionProperties; - /** - * Array of active connections to the session. This property always initialize as an empty array and - * **will remain unchanged since the last time method [[Session.fetch]] was called**. Exceptions to this rule are: - * - * - Calling [[Session.forceUnpublish]] also automatically updates each affected Connection status - * - Calling [[Session.forceDisconnect]] automatically updates each affected Connection status - * - * To get the array of active connections with their current actual value, you must call [[Session.fetch]] before consulting - * property [[activeConnections]] - */ - activeConnections: Connection[]; - /** - * Whether the session is being recorded or not - */ - recording: boolean; - /** - * @hidden - */ - constructor(propertiesOrJson?: any); - /** - * Gets the unique identifier of the Session - */ - getSessionId(): string; - /** - * Gets a new token associated to Session object - * - * @returns A Promise that is resolved to the _token_ if success and rejected with an Error object if not - */ - generateToken(tokenOptions?: TokenOptions): Promise; - /** - * Gracefully closes the Session: unpublishes all streams and evicts every participant - * - * @returns A Promise that is resolved if the session has been closed successfully and rejected with an Error object if not - */ - close(): Promise; - /** - * Updates every property of the Session with the current status it has in OpenVidu Server. This is especially useful for accessing the list of active - * connections of the Session ([[Session.activeConnections]]) and use those values to call [[Session.forceDisconnect]] or [[Session.forceUnpublish]]. - * - * To update every Session object owned by OpenVidu object, call [[OpenVidu.fetch]] - * - * @returns A promise resolved to true if the Session status has changed with respect to the server, or to false if not. - * This applies to any property or sub-property of the Session object - */ - fetch(): Promise; - /** - * Forces the user with Connection `connectionId` to leave the session. OpenVidu Browser will trigger the proper events on the client-side - * (`streamDestroyed`, `connectionDestroyed`, `sessionDisconnected`) with reason set to `"forceDisconnectByServer"` - * - * You can get `connection` parameter from [[Session.activeConnections]] array ([[Connection.connectionId]] for getting each `connectionId` property). - * Remember to call [[Session.fetch]] before to fetch the current actual properties of the Session from OpenVidu Server - * - * @returns A Promise that is resolved if the user was successfully disconnected and rejected with an Error object if not - */ - forceDisconnect(connection: string | Connection): Promise; - /** - * Forces some user to unpublish a Stream (identified by its `streamId` or the corresponding [[Publisher]] object owning it). - * OpenVidu Browser will trigger the proper events on the client-side (`streamDestroyed`) with reason set to `"forceUnpublishByServer"`. - * - * You can get `publisher` parameter from [[Connection.publishers]] array ([[Publisher.streamId]] for getting each `streamId` property). - * Remember to call [[Session.fetch]] before to fetch the current actual properties of the Session from OpenVidu Server - * - * @returns A Promise that is resolved if the stream was successfully unpublished and rejected with an Error object if not - */ - forceUnpublish(publisher: string | Publisher): Promise; - /** - * @hidden - */ - getSessionIdHttp(): Promise; - /** - * @hidden - */ - resetSessionWithJson(json: any): Session; - /** - * @hidden - */ - equalTo(other: Session): boolean; -} diff --git a/openvidu-node-client/lib/Session.js b/openvidu-node-client/lib/Session.js deleted file mode 100644 index d252d2a1..00000000 --- a/openvidu-node-client/lib/Session.js +++ /dev/null @@ -1,495 +0,0 @@ -"use strict"; -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * 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. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var axios_1 = require("axios"); -var Connection_1 = require("./Connection"); -var MediaMode_1 = require("./MediaMode"); -var OpenVidu_1 = require("./OpenVidu"); -var OpenViduRole_1 = require("./OpenViduRole"); -var Publisher_1 = require("./Publisher"); -var RecordingLayout_1 = require("./RecordingLayout"); -var RecordingMode_1 = require("./RecordingMode"); -var Session = /** @class */ (function () { - /** - * @hidden - */ - function Session(propertiesOrJson) { - /** - * Array of active connections to the session. This property always initialize as an empty array and - * **will remain unchanged since the last time method [[Session.fetch]] was called**. Exceptions to this rule are: - * - * - Calling [[Session.forceUnpublish]] also automatically updates each affected Connection status - * - Calling [[Session.forceDisconnect]] automatically updates each affected Connection status - * - * To get the array of active connections with their current actual value, you must call [[Session.fetch]] before consulting - * property [[activeConnections]] - */ - this.activeConnections = []; - /** - * Whether the session is being recorded or not - */ - this.recording = false; - if (!!propertiesOrJson) { - // Defined parameter - if (!!propertiesOrJson.sessionId) { - // Parameter is a JSON representation of Session ('sessionId' property always defined) - this.resetSessionWithJson(propertiesOrJson); - } - else { - // Parameter is a SessionProperties object - this.properties = propertiesOrJson; - } - } - else { - // Empty parameter - this.properties = {}; - } - this.properties.mediaMode = !!this.properties.mediaMode ? this.properties.mediaMode : MediaMode_1.MediaMode.ROUTED; - this.properties.recordingMode = !!this.properties.recordingMode ? this.properties.recordingMode : RecordingMode_1.RecordingMode.MANUAL; - this.properties.defaultRecordingLayout = !!this.properties.defaultRecordingLayout ? this.properties.defaultRecordingLayout : RecordingLayout_1.RecordingLayout.BEST_FIT; - } - /** - * Gets the unique identifier of the Session - */ - Session.prototype.getSessionId = function () { - return this.sessionId; - }; - /** - * Gets a new token associated to Session object - * - * @returns A Promise that is resolved to the _token_ if success and rejected with an Error object if not - */ - Session.prototype.generateToken = function (tokenOptions) { - var _this = this; - return new Promise(function (resolve, reject) { - var data = JSON.stringify({ - session: _this.sessionId, - role: (!!tokenOptions && !!tokenOptions.role) ? tokenOptions.role : OpenViduRole_1.OpenViduRole.PUBLISHER, - data: (!!tokenOptions && !!tokenOptions.data) ? tokenOptions.data : '', - kurentoOptions: (!!tokenOptions && !!tokenOptions.kurentoOptions) ? tokenOptions.kurentoOptions : {}, - }); - axios_1.default.post('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_TOKENS, data, { - headers: { - 'Authorization': OpenVidu_1.OpenVidu.basicAuth, - 'Content-Type': 'application/json' - } - }) - .then(function (res) { - if (res.status === 200) { - // SUCCESS response from openvidu-server. Resolve token - resolve(res.data.id); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - reject(new Error(error.request)); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - reject(new Error(error.message)); - } - }); - }); - }; - /** - * Gracefully closes the Session: unpublishes all streams and evicts every participant - * - * @returns A Promise that is resolved if the session has been closed successfully and rejected with an Error object if not - */ - Session.prototype.close = function () { - var _this = this; - return new Promise(function (resolve, reject) { - axios_1.default.delete('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS + '/' + _this.sessionId, { - headers: { - 'Authorization': OpenVidu_1.OpenVidu.basicAuth, - 'Content-Type': 'application/x-www-form-urlencoded' - } - }) - .then(function (res) { - if (res.status === 204) { - // SUCCESS response from openvidu-server - var indexToRemove = OpenVidu_1.OpenVidu.getActiveSessions().findIndex(function (s) { return s.sessionId === _this.sessionId; }); - OpenVidu_1.OpenVidu.getActiveSessions().splice(indexToRemove, 1); - resolve(); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - reject(new Error(error.request)); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - reject(new Error(error.message)); - } - }); - }); - }; - /** - * Updates every property of the Session with the current status it has in OpenVidu Server. This is especially useful for accessing the list of active - * connections of the Session ([[Session.activeConnections]]) and use those values to call [[Session.forceDisconnect]] or [[Session.forceUnpublish]]. - * - * To update every Session object owned by OpenVidu object, call [[OpenVidu.fetch]] - * - * @returns A promise resolved to true if the Session status has changed with respect to the server, or to false if not. - * This applies to any property or sub-property of the Session object - */ - Session.prototype.fetch = function () { - var _this = this; - return new Promise(function (resolve, reject) { - var beforeJSON = JSON.stringify(_this); - axios_1.default.get('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS + '/' + _this.sessionId, { - headers: { - 'Authorization': OpenVidu_1.OpenVidu.basicAuth, - 'Content-Type': 'application/x-www-form-urlencoded' - } - }) - .then(function (res) { - if (res.status === 200) { - // SUCCESS response from openvidu-server - _this.resetSessionWithJson(res.data); - var afterJSON = JSON.stringify(_this); - var hasChanged = !(beforeJSON === afterJSON); - console.log("Session info fetched for session '" + _this.sessionId + "'. Any change: " + hasChanged); - resolve(hasChanged); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - reject(new Error(error.request)); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - reject(new Error(error.message)); - } - }); - }); - }; - /** - * Forces the user with Connection `connectionId` to leave the session. OpenVidu Browser will trigger the proper events on the client-side - * (`streamDestroyed`, `connectionDestroyed`, `sessionDisconnected`) with reason set to `"forceDisconnectByServer"` - * - * You can get `connection` parameter from [[Session.activeConnections]] array ([[Connection.connectionId]] for getting each `connectionId` property). - * Remember to call [[Session.fetch]] before to fetch the current actual properties of the Session from OpenVidu Server - * - * @returns A Promise that is resolved if the user was successfully disconnected and rejected with an Error object if not - */ - Session.prototype.forceDisconnect = function (connection) { - var _this = this; - return new Promise(function (resolve, reject) { - var connectionId = typeof connection === 'string' ? connection : connection.connectionId; - axios_1.default.delete('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS + '/' + _this.sessionId + '/connection/' + connectionId, { - headers: { - 'Authorization': OpenVidu_1.OpenVidu.basicAuth, - 'Content-Type': 'application/x-www-form-urlencoded' - } - }) - .then(function (res) { - if (res.status === 204) { - // SUCCESS response from openvidu-server - // Remove connection from activeConnections array - var connectionClosed_1; - _this.activeConnections = _this.activeConnections.filter(function (con) { - if (con.connectionId !== connectionId) { - return true; - } - else { - connectionClosed_1 = con; - return false; - } - }); - // Remove every Publisher of the closed connection from every subscriber list of other connections - if (!!connectionClosed_1) { - connectionClosed_1.publishers.forEach(function (publisher) { - _this.activeConnections.forEach(function (con) { - con.subscribers = con.subscribers.filter(function (subscriber) { - // tslint:disable:no-string-literal - if (!!subscriber['streamId']) { - // Subscriber with advanced webRtc configuration properties - return (subscriber['streamId'] !== publisher.streamId); - // tslint:enable:no-string-literal - } - else { - // Regular string subscribers - return subscriber !== publisher.streamId; - } - }); - }); - }); - } - else { - console.warn("The closed connection wasn't fetched in OpenVidu Java Client. No changes in the collection of active connections of the Session"); - } - console.log("Connection '" + connectionId + "' closed"); - resolve(); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }) - .catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - reject(new Error(error.request)); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - reject(new Error(error.message)); - } - }); - }); - }; - /** - * Forces some user to unpublish a Stream (identified by its `streamId` or the corresponding [[Publisher]] object owning it). - * OpenVidu Browser will trigger the proper events on the client-side (`streamDestroyed`) with reason set to `"forceUnpublishByServer"`. - * - * You can get `publisher` parameter from [[Connection.publishers]] array ([[Publisher.streamId]] for getting each `streamId` property). - * Remember to call [[Session.fetch]] before to fetch the current actual properties of the Session from OpenVidu Server - * - * @returns A Promise that is resolved if the stream was successfully unpublished and rejected with an Error object if not - */ - Session.prototype.forceUnpublish = function (publisher) { - var _this = this; - return new Promise(function (resolve, reject) { - var streamId = typeof publisher === 'string' ? publisher : publisher.streamId; - axios_1.default.delete('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS + '/' + _this.sessionId + '/stream/' + streamId, { - headers: { - 'Authorization': OpenVidu_1.OpenVidu.basicAuth, - 'Content-Type': 'application/x-www-form-urlencoded' - } - }) - .then(function (res) { - if (res.status === 204) { - // SUCCESS response from openvidu-server - _this.activeConnections.forEach(function (connection) { - // Try to remove the Publisher from the Connection publishers collection - connection.publishers = connection.publishers.filter(function (pub) { return pub.streamId !== streamId; }); - // Try to remove the Publisher from the Connection subscribers collection - if (!!connection.subscribers && connection.subscribers.length > 0) { - // tslint:disable:no-string-literal - if (!!connection.subscribers[0]['streamId']) { - // Subscriber with advanced webRtc configuration properties - connection.subscribers = connection.subscribers.filter(function (sub) { return sub['streamId'] !== streamId; }); - // tslint:enable:no-string-literal - } - else { - // Regular string subscribers - connection.subscribers = connection.subscribers.filter(function (sub) { return sub !== streamId; }); - } - } - }); - console.log("Stream '" + streamId + "' unpublished"); - resolve(); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - reject(new Error(error.response.status.toString())); - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - reject(new Error(error.request)); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - reject(new Error(error.message)); - } - }); - }); - }; - /** - * @hidden - */ - Session.prototype.getSessionIdHttp = function () { - var _this = this; - return new Promise(function (resolve, reject) { - if (!!_this.sessionId) { - resolve(_this.sessionId); - } - var data = JSON.stringify({ - mediaMode: !!_this.properties.mediaMode ? _this.properties.mediaMode : MediaMode_1.MediaMode.ROUTED, - recordingMode: !!_this.properties.recordingMode ? _this.properties.recordingMode : RecordingMode_1.RecordingMode.MANUAL, - defaultRecordingLayout: !!_this.properties.defaultRecordingLayout ? _this.properties.defaultRecordingLayout : RecordingLayout_1.RecordingLayout.BEST_FIT, - defaultCustomLayout: !!_this.properties.defaultCustomLayout ? _this.properties.defaultCustomLayout : '', - customSessionId: !!_this.properties.customSessionId ? _this.properties.customSessionId : '' - }); - axios_1.default.post('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS, data, { - headers: { - 'Authorization': OpenVidu_1.OpenVidu.basicAuth, - 'Content-Type': 'application/json' - } - }) - .then(function (res) { - if (res.status === 200) { - // SUCCESS response from openvidu-server. Resolve token - _this.sessionId = res.data.id; - _this.createdAt = res.data.createdAt; - resolve(_this.sessionId); - } - else { - // ERROR response from openvidu-server. Resolve HTTP status - reject(new Error(res.status.toString())); - } - }).catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code (not 2xx) - if (error.response.status === 409) { - // 'customSessionId' already existed - _this.sessionId = _this.properties.customSessionId; - resolve(_this.sessionId); - } - else { - reject(new Error(error.response.status.toString())); - } - } - else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.error(error.request); - reject(new Error(error.request)); - } - else { - // Something happened in setting up the request that triggered an Error - console.error('Error', error.message); - reject(new Error(error.message)); - } - }); - }); - }; - /** - * @hidden - */ - Session.prototype.resetSessionWithJson = function (json) { - var _this = this; - this.sessionId = json.sessionId; - this.createdAt = json.createdAt; - this.recording = json.recording; - var customSessionId; - var defaultCustomLayout; - if (!!this.properties) { - customSessionId = this.properties.customSessionId; - defaultCustomLayout = !!json.defaultCustomLayout ? json.defaultCustomLayout : this.properties.defaultCustomLayout; - } - this.properties = { - mediaMode: json.mediaMode, - recordingMode: json.recordingMode, - defaultRecordingLayout: json.defaultRecordingLayout - }; - if (!!customSessionId) { - this.properties.customSessionId = customSessionId; - } - else if (!!json.customSessionId) { - this.properties.customSessionId = json.customSessionId; - } - if (!!defaultCustomLayout) { - this.properties.defaultCustomLayout = defaultCustomLayout; - } - this.activeConnections = []; - json.connections.content.forEach(function (connection) { - var publishers = []; - connection.publishers.forEach(function (publisher) { - publishers.push(new Publisher_1.Publisher(publisher)); - }); - var subscribers = []; - connection.subscribers.forEach(function (subscriber) { - subscribers.push(subscriber.streamId); - }); - _this.activeConnections.push(new Connection_1.Connection(connection.connectionId, connection.createdAt, connection.role, connection.token, connection.location, connection.platform, connection.serverData, connection.clientData, publishers, subscribers)); - }); - // Order connections by time of creation - this.activeConnections.sort(function (c1, c2) { return (c1.createdAt > c2.createdAt) ? 1 : ((c2.createdAt > c1.createdAt) ? -1 : 0); }); - return this; - }; - /** - * @hidden - */ - Session.prototype.equalTo = function (other) { - var equals = (this.sessionId === other.sessionId && - this.createdAt === other.createdAt && - this.recording === other.recording && - this.activeConnections.length === other.activeConnections.length && - JSON.stringify(this.properties) === JSON.stringify(other.properties)); - if (equals) { - var i = 0; - while (equals && i < this.activeConnections.length) { - equals = this.activeConnections[i].equalTo(other.activeConnections[i]); - i++; - } - return equals; - } - else { - return false; - } - }; - return Session; -}()); -exports.Session = Session; -//# sourceMappingURL=Session.js.map \ No newline at end of file diff --git a/openvidu-node-client/lib/Session.js.map b/openvidu-node-client/lib/Session.js.map deleted file mode 100644 index f2a4cfa2..00000000 --- a/openvidu-node-client/lib/Session.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Session.js","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,+BAA0B;AAC1B,2CAA0C;AAC1C,yCAAwC;AACxC,uCAAsC;AACtC,+CAA8C;AAC9C,yCAAwC;AACxC,qDAAoD;AACpD,iDAAgD;AAKhD;IAkCI;;OAEG;IACH,iB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BAAiB,CAAC,MAAM,KAAK,KAAK,CAAC,iBAAiB,CAAC,MAAM;YAChE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CACvE,CAAC;QACF,IAAI,MAAM,EAAE;YACR,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,OAAO,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE;gBAChD,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvE,CAAC,EAAE,CAAC;aACP;YACD,OAAO,MAAM,CAAC;SACjB;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC;IAEL,cAAC;AAAD,CAAC,AAjfD,IAifC;AAjfY,0BAAO"} \ No newline at end of file diff --git a/openvidu-node-client/lib/TokenOptions.d.ts b/openvidu-node-client/lib/TokenOptions.d.ts deleted file mode 100644 index 662ae85e..00000000 --- a/openvidu-node-client/lib/TokenOptions.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { OpenViduRole } from './OpenViduRole'; -/** - * See [[Session.generateToken]] - */ -export interface TokenOptions { - /** - * Secure (server-side) data associated to this token. Every client will receive this data in property `Connection.data`. Object `Connection` can be retrieved by subscribing to event `connectionCreated` of Session object. - * - If you have provided no data in your clients when calling method `Session.connect(TOKEN, DATA)` (`DATA` not defined), then `Connection.data` will only have this [[TokenOptions.data]] property. - * - If you have provided some data when calling `Session.connect(TOKEN, DATA)` (`DATA` defined), then `Connection.data` will have the following structure: `"CLIENT_DATA%/%SERVER_DATA"`, being `CLIENT_DATA` the second - * parameter passed in OpenVidu Browser in method `Session.connect` and `SERVER_DATA` this [[TokenOptions.data]] property. - */ - data?: string; - /** - * The role assigned to this token - */ - role?: OpenViduRole; - /** - * **WARNING**: experimental option. This interface may change in the near future - * - * Some advanced properties setting the configuration that the WebRTC streams of the user owning the token will have in Kurento Media Server. - * You can adjust: - * - `videoMaxRecvBandwidth`: maximum number of Kbps that the client owning the token will be able to receive from Kurento Media Server. 0 means unconstrained. Giving a value to this property will override - * the global configuration set in [OpenVidu Server configuration](https://openvidu.io/docs/reference-docs/openvidu-server-params/#list-of-configuration-parameters-when-launching-openvidu-server) - * (parameter `openvidu.streams.video.max-recv-bandwidth`) for every incoming stream of the user owning the token. - * _**WARNING**: the lower value set to this property limits every other bandwidth of the WebRTC pipeline this server-to-client stream belongs to. This includes the user publishing the stream and every other user subscribed to the stream_ - * - `videoMinRecvBandwidth`: minimum number of Kbps that the client owning the token will try to receive from Kurento Media Server. 0 means unconstrained. Giving a value to this property will override - * the global configuration set in [OpenVidu Server configuration](https://openvidu.io/docs/reference-docs/openvidu-server-params/#list-of-configuration-parameters-when-launching-openvidu-server) - * (parameter `openvidu.streams.video.min-recv-bandwidth`) for every incoming stream of the user owning the token - * - `videoMaxSendBandwidth`: maximum number of Kbps that the client owning the token will be able to send to Kurento Media Server. 0 means unconstrained. Giving a value to this property will override - * the global configuration set in [OpenVidu Server configuration](https://openvidu.io/docs/reference-docs/openvidu-server-params/#list-of-configuration-parameters-when-launching-openvidu-server) - * (parameter `openvidu.streams.video.max-send-bandwidth`) for every outgoing stream of the user owning the token. - * _**WARNING**: this value limits every other bandwidth of the WebRTC pipeline this client-to-server stream belongs to. This includes every other user subscribed to the stream_ - * - `videoMinSendBandwidth`: minimum number of Kbps that the client owning the token will try to send to Kurento Media Server. 0 means unconstrained. Giving a value to this property will override - * the global configuration set in [OpenVidu Server configuration](https://openvidu.io/docs/reference-docs/openvidu-server-params/#list-of-configuration-parameters-when-launching-openvidu-server) - * (parameter `openvidu.streams.video.min-send-bandwidth`) for every outgoing stream of the user owning the token - * - `allowedFilters`: names of the filters the user owning the token will be able to apply. See [Voice and video filters](https://openvidu.io/docs/advanced-features/filters/) - */ - kurentoOptions?: { - videoMaxRecvBandwidth?: number; - videoMinRecvBandwidth?: number; - videoMaxSendBandwidth?: number; - videoMinSendBandwidth?: number; - allowedFilters?: string[]; - }; -} diff --git a/openvidu-node-client/lib/TokenOptions.js b/openvidu-node-client/lib/TokenOptions.js deleted file mode 100644 index fcedc0e0..00000000 --- a/openvidu-node-client/lib/TokenOptions.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/* - * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) - * - * 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. - * - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=TokenOptions.js.map \ No newline at end of file diff --git a/openvidu-node-client/lib/TokenOptions.js.map b/openvidu-node-client/lib/TokenOptions.js.map deleted file mode 100644 index c6d102b7..00000000 --- a/openvidu-node-client/lib/TokenOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenOptions.js","sourceRoot":"","sources":["../src/TokenOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-node-client/lib/index.d.ts b/openvidu-node-client/lib/index.d.ts deleted file mode 100644 index ae9a4981..00000000 --- a/openvidu-node-client/lib/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from './OpenVidu'; -export * from './OpenViduRole'; -export * from './Session'; -export * from './SessionProperties'; -export * from './TokenOptions'; -export * from './MediaMode'; -export * from './RecordingLayout'; -export * from './RecordingMode'; -export * from './Recording'; -export * from './RecordingProperties'; -export * from './Connection'; -export * from './Publisher'; diff --git a/openvidu-node-client/lib/index.js b/openvidu-node-client/lib/index.js deleted file mode 100644 index 6bab7269..00000000 --- a/openvidu-node-client/lib/index.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./OpenVidu")); -__export(require("./OpenViduRole")); -__export(require("./Session")); -__export(require("./MediaMode")); -__export(require("./RecordingLayout")); -__export(require("./RecordingMode")); -__export(require("./Recording")); -__export(require("./Connection")); -__export(require("./Publisher")); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/openvidu-node-client/lib/index.js.map b/openvidu-node-client/lib/index.js.map deleted file mode 100644 index 1f92ba4d..00000000 --- a/openvidu-node-client/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,gCAA2B;AAC3B,oCAA+B;AAC/B,+BAA0B;AAG1B,iCAA4B;AAC5B,uCAAkC;AAClC,qCAAgC;AAChC,iCAA4B;AAE5B,kCAA6B;AAC7B,iCAA4B"} \ No newline at end of file