From 05b825c43eddfa1b34d866aadf992d6005e07449 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Tue, 22 Jan 2019 15:38:12 +0100 Subject: [PATCH] openvidu-browser: lib compilation folder removed from repo --- .../typedoc/custom-theme/assets/js/main.js | 2 +- openvidu-browser/lib/OpenVidu/Connection.d.ts | 60 - openvidu-browser/lib/OpenVidu/Connection.js | 123 -- .../lib/OpenVidu/Connection.js.map | 1 - openvidu-browser/lib/OpenVidu/Filter.d.ts | 73 -- openvidu-browser/lib/OpenVidu/Filter.js | 145 --- openvidu-browser/lib/OpenVidu/Filter.js.map | 1 - .../lib/OpenVidu/LocalRecorder.d.ts | 83 -- .../lib/OpenVidu/LocalRecorder.js | 329 ------ .../lib/OpenVidu/LocalRecorder.js.map | 1 - openvidu-browser/lib/OpenVidu/OpenVidu.d.ts | 172 --- openvidu-browser/lib/OpenVidu/OpenVidu.js | 623 ---------- openvidu-browser/lib/OpenVidu/OpenVidu.js.map | 1 - openvidu-browser/lib/OpenVidu/Publisher.d.ts | 101 -- openvidu-browser/lib/OpenVidu/Publisher.js | 564 --------- .../lib/OpenVidu/Publisher.js.map | 1 - openvidu-browser/lib/OpenVidu/Session.d.ts | 293 ----- openvidu-browser/lib/OpenVidu/Session.js | 1024 ----------------- openvidu-browser/lib/OpenVidu/Session.js.map | 1 - openvidu-browser/lib/OpenVidu/Stream.d.ts | 273 ----- openvidu-browser/lib/OpenVidu/Stream.js | 700 ----------- openvidu-browser/lib/OpenVidu/Stream.js.map | 1 - .../lib/OpenVidu/StreamManager.d.ts | 129 --- .../lib/OpenVidu/StreamManager.js | 398 ------- .../lib/OpenVidu/StreamManager.js.map | 1 - openvidu-browser/lib/OpenVidu/Subscriber.d.ts | 23 - openvidu-browser/lib/OpenVidu/Subscriber.js | 73 -- .../lib/OpenVidu/Subscriber.js.map | 1 - .../Enums/LocalRecorderState.d.ts | 6 - .../Enums/LocalRecorderState.js | 26 - .../Enums/LocalRecorderState.js.map | 1 - .../OpenViduInternal/Enums/OpenViduError.d.ts | 80 -- .../OpenViduInternal/Enums/OpenViduError.js | 103 -- .../Enums/OpenViduError.js.map | 1 - .../Enums/VideoInsertMode.d.ts | 25 - .../OpenViduInternal/Enums/VideoInsertMode.js | 45 - .../Enums/VideoInsertMode.js.map | 1 - .../Events/ConnectionEvent.d.ts | 33 - .../Events/ConnectionEvent.js | 57 - .../Events/ConnectionEvent.js.map | 1 - .../lib/OpenViduInternal/Events/Event.d.ts | 42 - .../lib/OpenViduInternal/Events/Event.js | 57 - .../lib/OpenViduInternal/Events/Event.js.map | 1 - .../OpenViduInternal/Events/FilterEvent.d.ts | 19 - .../OpenViduInternal/Events/FilterEvent.js | 54 - .../Events/FilterEvent.js.map | 1 - .../Events/PublisherSpeakingEvent.d.ts | 32 - .../Events/PublisherSpeakingEvent.js | 64 -- .../Events/PublisherSpeakingEvent.js.map | 1 - .../Events/RecordingEvent.d.ts | 30 - .../OpenViduInternal/Events/RecordingEvent.js | 59 - .../Events/RecordingEvent.js.map | 1 - .../Events/SessionDisconnectedEvent.d.ts | 23 - .../Events/SessionDisconnectedEvent.js | 69 -- .../Events/SessionDisconnectedEvent.js.map | 1 - .../OpenViduInternal/Events/SignalEvent.d.ts | 34 - .../OpenViduInternal/Events/SignalEvent.js | 58 - .../Events/SignalEvent.js.map | 1 - .../OpenViduInternal/Events/StreamEvent.d.ts | 37 - .../OpenViduInternal/Events/StreamEvent.js | 98 -- .../Events/StreamEvent.js.map | 1 - .../Events/StreamManagerEvent.d.ts | 28 - .../Events/StreamManagerEvent.js | 59 - .../Events/StreamManagerEvent.js.map | 1 - .../Events/StreamPropertyChangedEvent.d.ts | 42 - .../Events/StreamPropertyChangedEvent.js | 60 - .../Events/StreamPropertyChangedEvent.js.map | 1 - .../Events/VideoElementEvent.d.ts | 22 - .../Events/VideoElementEvent.js | 57 - .../Events/VideoElementEvent.js.map | 1 - .../Interfaces/Private/ConnectionOptions.d.ts | 6 - .../Interfaces/Private/ConnectionOptions.js | 19 - .../Private/ConnectionOptions.js.map | 1 - .../Private/InboundStreamOptions.d.ts | 17 - .../Private/InboundStreamOptions.js | 19 - .../Private/InboundStreamOptions.js.map | 1 - .../Interfaces/Private/ObjMap.d.ts | 3 - .../Interfaces/Private/ObjMap.js | 19 - .../Interfaces/Private/ObjMap.js.map | 1 - .../Private/OutboundStreamOptions.d.ts | 5 - .../Private/OutboundStreamOptions.js | 19 - .../Private/OutboundStreamOptions.js.map | 1 - .../Interfaces/Private/SessionOptions.d.ts | 5 - .../Interfaces/Private/SessionOptions.js | 19 - .../Interfaces/Private/SessionOptions.js.map | 1 - .../Private/StreamOptionsServer.d.ts | 12 - .../Interfaces/Private/StreamOptionsServer.js | 19 - .../Private/StreamOptionsServer.js.map | 1 - .../Interfaces/Public/Capabilities.d.ts | 21 - .../Interfaces/Public/Capabilities.js | 19 - .../Interfaces/Public/Capabilities.js.map | 1 - .../Interfaces/Public/Device.d.ts | 17 - .../Interfaces/Public/Device.js | 19 - .../Interfaces/Public/Device.js.map | 1 - .../Interfaces/Public/EventDispatcher.d.ts | 21 - .../Interfaces/Public/EventDispatcher.js | 19 - .../Interfaces/Public/EventDispatcher.js.map | 1 - .../Public/OpenViduAdvancedConfiguration.d.ts | 21 - .../Public/OpenViduAdvancedConfiguration.js | 19 - .../OpenViduAdvancedConfiguration.js.map | 1 - .../Public/PublisherProperties.d.ts | 64 -- .../Interfaces/Public/PublisherProperties.js | 19 - .../Public/PublisherProperties.js.map | 1 - .../Interfaces/Public/SignalOptions.d.ts | 20 - .../Interfaces/Public/SignalOptions.js | 19 - .../Interfaces/Public/SignalOptions.js.map | 1 - .../Interfaces/Public/StreamManagerVideo.d.ts | 31 - .../Interfaces/Public/StreamManagerVideo.js | 19 - .../Public/StreamManagerVideo.js.map | 1 - .../Public/SubscriberProperties.d.ts | 21 - .../Interfaces/Public/SubscriberProperties.js | 19 - .../Public/SubscriberProperties.js.map | 1 - .../KurentoUtils/kurento-jsonrpc/Mapper.js | 45 - .../kurento-jsonrpc/Mapper.js.map | 1 - .../kurento-jsonrpc/clients/index.js | 3 - .../kurento-jsonrpc/clients/index.js.map | 1 - .../kurento-jsonrpc/clients/jsonrpcclient.js | 193 ---- .../clients/jsonrpcclient.js.map | 1 - .../clients/transports/index.js | 3 - .../clients/transports/index.js.map | 1 - .../transports/webSocketWithReconnection.js | 166 --- .../webSocketWithReconnection.js.map | 1 - .../KurentoUtils/kurento-jsonrpc/index.js | 483 -------- .../KurentoUtils/kurento-jsonrpc/index.js.map | 1 - .../kurento-jsonrpc/packers/JsonRPC.js | 53 - .../kurento-jsonrpc/packers/JsonRPC.js.map | 1 - .../kurento-jsonrpc/packers/XmlRPC.js | 11 - .../kurento-jsonrpc/packers/XmlRPC.js.map | 1 - .../kurento-jsonrpc/packers/index.js | 5 - .../kurento-jsonrpc/packers/index.js.map | 1 - .../ScreenSharing/Screen-Capturing-Auto.js | 158 --- .../Screen-Capturing-Auto.js.map | 1 - .../ScreenSharing/Screen-Capturing.js | 140 --- .../ScreenSharing/Screen-Capturing.js.map | 1 - .../WebRtcPeer/WebRtcPeer.d.ts | 62 - .../OpenViduInternal/WebRtcPeer/WebRtcPeer.js | 339 ------ .../WebRtcPeer/WebRtcPeer.js.map | 1 - .../WebRtcStats/WebRtcStats.d.ts | 16 - .../WebRtcStats/WebRtcStats.js | 364 ------ .../WebRtcStats/WebRtcStats.js.map | 1 - openvidu-browser/lib/index.d.ts | 31 - openvidu-browser/lib/index.js | 49 - openvidu-browser/lib/index.js.map | 1 - 143 files changed, 1 insertion(+), 9208 deletions(-) delete mode 100644 openvidu-browser/lib/OpenVidu/Connection.d.ts delete mode 100644 openvidu-browser/lib/OpenVidu/Connection.js delete mode 100644 openvidu-browser/lib/OpenVidu/Connection.js.map delete mode 100644 openvidu-browser/lib/OpenVidu/Filter.d.ts delete mode 100644 openvidu-browser/lib/OpenVidu/Filter.js delete mode 100644 openvidu-browser/lib/OpenVidu/Filter.js.map delete mode 100644 openvidu-browser/lib/OpenVidu/LocalRecorder.d.ts delete mode 100644 openvidu-browser/lib/OpenVidu/LocalRecorder.js delete mode 100644 openvidu-browser/lib/OpenVidu/LocalRecorder.js.map delete mode 100644 openvidu-browser/lib/OpenVidu/OpenVidu.d.ts delete mode 100644 openvidu-browser/lib/OpenVidu/OpenVidu.js delete mode 100644 openvidu-browser/lib/OpenVidu/OpenVidu.js.map delete mode 100644 openvidu-browser/lib/OpenVidu/Publisher.d.ts delete mode 100644 openvidu-browser/lib/OpenVidu/Publisher.js delete mode 100644 openvidu-browser/lib/OpenVidu/Publisher.js.map delete mode 100644 openvidu-browser/lib/OpenVidu/Session.d.ts delete mode 100644 openvidu-browser/lib/OpenVidu/Session.js delete mode 100644 openvidu-browser/lib/OpenVidu/Session.js.map delete mode 100644 openvidu-browser/lib/OpenVidu/Stream.d.ts delete mode 100644 openvidu-browser/lib/OpenVidu/Stream.js delete mode 100644 openvidu-browser/lib/OpenVidu/Stream.js.map delete mode 100644 openvidu-browser/lib/OpenVidu/StreamManager.d.ts delete mode 100644 openvidu-browser/lib/OpenVidu/StreamManager.js delete mode 100644 openvidu-browser/lib/OpenVidu/StreamManager.js.map delete mode 100644 openvidu-browser/lib/OpenVidu/Subscriber.d.ts delete mode 100644 openvidu-browser/lib/OpenVidu/Subscriber.js delete mode 100644 openvidu-browser/lib/OpenVidu/Subscriber.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/Event.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/Event.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/Event.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js.map delete mode 100644 openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.d.ts delete mode 100644 openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js delete mode 100644 openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js.map delete mode 100644 openvidu-browser/lib/index.d.ts delete mode 100644 openvidu-browser/lib/index.js delete mode 100644 openvidu-browser/lib/index.js.map diff --git a/openvidu-browser/config/typedoc/custom-theme/assets/js/main.js b/openvidu-browser/config/typedoc/custom-theme/assets/js/main.js index 53ba8d40..18944250 100644 --- a/openvidu-browser/config/typedoc/custom-theme/assets/js/main.js +++ b/openvidu-browser/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-browser/lib/OpenVidu/Connection.d.ts b/openvidu-browser/lib/OpenVidu/Connection.d.ts deleted file mode 100644 index fb8af7d1..00000000 --- a/openvidu-browser/lib/OpenVidu/Connection.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Session } from './Session'; -import { Stream } from './Stream'; -import { ConnectionOptions } from '../OpenViduInternal/Interfaces/Private/ConnectionOptions'; -import { StreamOptionsServer } from '../OpenViduInternal/Interfaces/Private/StreamOptionsServer'; -/** - * Represents each one of the user's connection to the session (the local one and other user's connections). - * Therefore each [[Session]] and [[Stream]] object has an attribute of type Connection - */ -export declare class Connection { - private session; - /** - * Unique identifier of the connection - */ - connectionId: string; - /** - * Time when this connection was created (UTC milliseconds) - */ - creationTime: number; - /** - * Data associated to this connection (and therefore to certain user). This is an important field: - * it allows you to broadcast all the information you want for each user (a username, for example) - */ - data: string; - /** - * @hidden - */ - stream: Stream; - /** - * @hidden - */ - options: ConnectionOptions | undefined; - /** - * @hidden - */ - disposed: boolean; - /** - * @hidden - */ - constructor(session: Session, opts?: ConnectionOptions); - /** - * @hidden - */ - sendIceCandidate(candidate: RTCIceCandidate): void; - /** - * @hidden - */ - initRemoteStreams(options: StreamOptionsServer[]): void; - /** - * @hidden - */ - addStream(stream: Stream): void; - /** - * @hidden - */ - removeStream(streamId: string): void; - /** - * @hidden - */ - dispose(): void; -} diff --git a/openvidu-browser/lib/OpenVidu/Connection.js b/openvidu-browser/lib/OpenVidu/Connection.js deleted file mode 100644 index f30d3dc9..00000000 --- a/openvidu-browser/lib/OpenVidu/Connection.js +++ /dev/null @@ -1,123 +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. - * - */ -exports.__esModule = true; -var Stream_1 = require("./Stream"); -/** - * Represents each one of the user's connection to the session (the local one and other user's connections). - * Therefore each [[Session]] and [[Stream]] object has an attribute of type Connection - */ -var Connection = /** @class */ (function () { - /** - * @hidden - */ - function Connection(session, opts) { - this.session = session; - /** - * @hidden - */ - this.disposed = false; - var msg = "'Connection' created "; - if (!!opts) { - msg += "(remote) with 'connectionId' [" + opts.id + ']'; - } - else { - msg += '(local)'; - } - console.info(msg); - this.options = opts; - if (!!opts) { - // Connection is remote - this.connectionId = opts.id; - if (opts.metadata) { - this.data = opts.metadata; - } - if (opts.streams) { - this.initRemoteStreams(opts.streams); - } - } - this.creationTime = new Date().getTime(); - } - /* Hidden methods */ - /** - * @hidden - */ - Connection.prototype.sendIceCandidate = function (candidate) { - console.debug((!!this.stream.outboundStreamOpts ? 'Local' : 'Remote'), 'candidate for', this.connectionId, JSON.stringify(candidate)); - this.session.openvidu.sendRequest('onIceCandidate', { - endpointName: this.connectionId, - candidate: candidate.candidate, - sdpMid: candidate.sdpMid, - sdpMLineIndex: candidate.sdpMLineIndex - }, function (error, response) { - if (error) { - console.error('Error sending ICE candidate: ' - + JSON.stringify(error)); - } - }); - }; - /** - * @hidden - */ - Connection.prototype.initRemoteStreams = function (options) { - var _this = this; - // This is ready for supporting multiple streams per Connection object. Right now the loop will always run just once - // this.stream should also be replaced by a collection of streams to support multiple streams per Connection - options.forEach(function (opts) { - 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, - videoDimensions: !!opts.videoDimensions ? JSON.parse(opts.videoDimensions) : undefined, - filter: !!opts.filter ? opts.filter : undefined - }; - var stream = new Stream_1.Stream(_this.session, streamOptions); - _this.addStream(stream); - }); - console.info("Remote 'Connection' with 'connectionId' [" + this.connectionId + '] is now configured for receiving Streams with options: ', this.stream.inboundStreamOpts); - }; - /** - * @hidden - */ - Connection.prototype.addStream = function (stream) { - stream.connection = this; - this.stream = stream; - }; - /** - * @hidden - */ - Connection.prototype.removeStream = function (streamId) { - delete this.stream; - }; - /** - * @hidden - */ - Connection.prototype.dispose = function () { - if (!!this.stream) { - delete this.stream; - } - this.disposed = true; - }; - return Connection; -}()); -exports.Connection = Connection; -//# sourceMappingURL=Connection.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Connection.js.map b/openvidu-browser/lib/OpenVidu/Connection.js.map deleted file mode 100644 index 79732dd8..00000000 --- a/openvidu-browser/lib/OpenVidu/Connection.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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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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,AA3ID,IA2IC;AA3IY,gCAAU"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Filter.d.ts b/openvidu-browser/lib/OpenVidu/Filter.d.ts deleted file mode 100644 index 81972ce8..00000000 --- a/openvidu-browser/lib/OpenVidu/Filter.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Stream } from './Stream'; -import { FilterEvent } from '../OpenViduInternal/Events/FilterEvent'; -import { ObjMap } from '../OpenViduInternal/Interfaces/Private/ObjMap'; -/** - * **WARNING**: experimental option. This interface may change in the near future - * - * Video/audio filter applied to a Stream. See [[Stream.applyFilter]] - */ -export declare class Filter { - /** - * Type of filter applied. This is the name of the remote class identifying the filter to apply in Kurento Media Server. - * For example: `"FaceOverlayFilter"`, `"GStreamerFilter"`. - * - * You can get this property in `*.kmd.json` files defining the Kurento filters. For example, for GStreamerFilter that's - * [here](https://github.com/Kurento/kms-filters/blob/53a452fac71d61795952e3d2202156c6b00f6d65/src/server/interface/filters.GStreamerFilter.kmd.json#L4) - */ - type: string; - /** - * Parameters used to initialize the filter. - * These correspond to the constructor parameters used in the filter in Kurento Media Server (except for `mediaPipeline` parameter, which is never needed). - * - * For example: for `filter.type = "GStreamerFilter"` could be `filter.options = {"command": "videobalance saturation=0.0"}` - * - * You can get this property in `*.kmd.json` files defining the Kurento filters. For example, for GStreamerFilter that's - * [here](https://github.com/Kurento/kms-filters/blob/53a452fac71d61795952e3d2202156c6b00f6d65/src/server/interface/filters.GStreamerFilter.kmd.json#L13-L31) - */ - options: Object; - /** - * Value passed the last time [[Filter.execMethod]] was called. If `undefined` this method has not been called yet. - * - * You can use this value to know the current status of any applied filter - */ - lastExecMethod?: { - method: string; - params: Object; - }; - /** - * @hidden - */ - handlers: ObjMap<(event: FilterEvent) => void>; - /** - * @hidden - */ - stream: Stream; - /** - * @hidden - */ - constructor(type: string, options: Object); - /** - * Executes a filter method. Available methods are specific for each filter - * - * @param method Name of the method - * @param params Parameters of the method - */ - execMethod(method: string, params: Object): Promise; - /** - * Subscribe to certain filter event. Available events are specific for each filter - * - * @param eventType Event to which subscribe to. - * @param handler Function to execute upon event dispatched. It receives as parameter a [[FilterEvent]] object - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the event listener was successfully attached to the filter and rejected with an Error object if not - */ - addEventListener(eventType: string, handler: (event: FilterEvent) => void): Promise; - /** - * Removes certain filter event listener previously set. - * - * @param eventType Event to unsubscribe from. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the event listener was successfully removed from the filter and rejected with an Error object in other case - */ - removeEventListener(eventType: string): Promise; -} diff --git a/openvidu-browser/lib/OpenVidu/Filter.js b/openvidu-browser/lib/OpenVidu/Filter.js deleted file mode 100644 index f4de4e9a..00000000 --- a/openvidu-browser/lib/OpenVidu/Filter.js +++ /dev/null @@ -1,145 +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. - * - */ -exports.__esModule = true; -var StreamPropertyChangedEvent_1 = require("../OpenViduInternal/Events/StreamPropertyChangedEvent"); -var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError"); -/** - * **WARNING**: experimental option. This interface may change in the near future - * - * Video/audio filter applied to a Stream. See [[Stream.applyFilter]] - */ -var Filter = /** @class */ (function () { - /** - * @hidden - */ - function Filter(type, options) { - /** - * @hidden - */ - this.handlers = {}; - this.type = type; - this.options = options; - } - /** - * Executes a filter method. Available methods are specific for each filter - * - * @param method Name of the method - * @param params Parameters of the method - */ - Filter.prototype.execMethod = function (method, params) { - var _this = this; - return new Promise(function (resolve, reject) { - console.info('Executing filter method to stream ' + _this.stream.streamId); - var stringParams; - if (typeof params !== 'string') { - try { - stringParams = JSON.stringify(params); - } - catch (error) { - var errorMsg = "'params' property must be a JSON formatted object"; - console.error(errorMsg); - reject(errorMsg); - } - } - else { - stringParams = params; - } - _this.stream.session.openvidu.sendRequest('execFilterMethod', { streamId: _this.stream.streamId, method: method, params: stringParams }, function (error, response) { - if (error) { - console.error('Error executing filter method for Stream ' + _this.stream.streamId, error); - if (error.code === 401) { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED, "You don't have permissions to execute a filter method")); - } - else { - reject(error); - } - } - else { - console.info('Filter method successfully executed on Stream ' + _this.stream.streamId); - var oldValue = Object.assign({}, _this.stream.filter); - _this.stream.filter.lastExecMethod = { method: method, params: JSON.parse(stringParams) }; - _this.stream.session.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.stream.session, _this.stream, 'filter', _this.stream.filter, oldValue, 'execFilterMethod')]); - _this.stream.streamManager.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.stream.streamManager, _this.stream, 'filter', _this.stream.filter, oldValue, 'execFilterMethod')]); - resolve(); - } - }); - }); - }; - /** - * Subscribe to certain filter event. Available events are specific for each filter - * - * @param eventType Event to which subscribe to. - * @param handler Function to execute upon event dispatched. It receives as parameter a [[FilterEvent]] object - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the event listener was successfully attached to the filter and rejected with an Error object if not - */ - Filter.prototype.addEventListener = function (eventType, handler) { - var _this = this; - return new Promise(function (resolve, reject) { - console.info('Adding filter event listener to event ' + eventType + ' to stream ' + _this.stream.streamId); - _this.stream.session.openvidu.sendRequest('addFilterEventListener', { streamId: _this.stream.streamId, eventType: eventType }, function (error, response) { - if (error) { - console.error('Error adding filter event listener to event ' + eventType + 'for Stream ' + _this.stream.streamId, error); - if (error.code === 401) { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED, "You don't have permissions to add a filter event listener")); - } - else { - reject(error); - } - } - else { - _this.handlers[eventType] = handler; - console.info('Filter event listener to event ' + eventType + ' successfully applied on Stream ' + _this.stream.streamId); - resolve(); - } - }); - }); - }; - /** - * Removes certain filter event listener previously set. - * - * @param eventType Event to unsubscribe from. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the event listener was successfully removed from the filter and rejected with an Error object in other case - */ - Filter.prototype.removeEventListener = function (eventType) { - var _this = this; - return new Promise(function (resolve, reject) { - console.info('Removing filter event listener to event ' + eventType + ' to stream ' + _this.stream.streamId); - _this.stream.session.openvidu.sendRequest('removeFilterEventListener', { streamId: _this.stream.streamId, eventType: eventType }, function (error, response) { - if (error) { - console.error('Error removing filter event listener to event ' + eventType + 'for Stream ' + _this.stream.streamId, error); - if (error.code === 401) { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED, "You don't have permissions to add a filter event listener")); - } - else { - reject(error); - } - } - else { - delete _this.handlers[eventType]; - console.info('Filter event listener to event ' + eventType + ' successfully removed on Stream ' + _this.stream.streamId); - resolve(); - } - }); - }); - }; - return Filter; -}()); -exports.Filter = Filter; -//# sourceMappingURL=Filter.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Filter.js.map b/openvidu-browser/lib/OpenVidu/Filter.js.map deleted file mode 100644 index 311aa446..00000000 --- a/openvidu-browser/lib/OpenVidu/Filter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Filter.js","sourceRoot":"","sources":["../../src/OpenVidu/Filter.ts"],"names":[],"mappings":";AAAA;;;;;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AC3B,EAAE,QAAQ,EAAE,KAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,WAAA,EAAE,EAC7C,UAAC,KAAK,EAAE,QAAQ;gBACZ,IAAI,KAAK,EAAE;oBACP,OAAO,CAAC,KAAK,CAAC,gDAAgD,GAAG,SAAS,GAAG,aAAa,GAAG,KAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;oBAC1H,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE;wBACpB,MAAM,CAAC,IAAI,6BAAa,CAAC,iCAAiB,CAAC,0BAA0B,EAAE,2DAA2D,CAAC,CAAC,CAAC;qBACxI;yBAAM;wBACH,MAAM,CAAC,KAAK,CAAC,CAAC;qBACjB;iBACJ;qBAAM;oBACH,OAAO,KAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;oBAChC,OAAO,CAAC,IAAI,CAAC,iCAAiC,GAAG,SAAS,GAAG,kCAAkC,GAAG,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;oBACxH,OAAO,EAAE,CAAC;iBACb;YACL,CAAC,CACJ,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;IAEL,aAAC;AAAD,CAAC,AAjKD,IAiKC;AAjKY,wBAAM"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/LocalRecorder.d.ts b/openvidu-browser/lib/OpenVidu/LocalRecorder.d.ts deleted file mode 100644 index 095660ed..00000000 --- a/openvidu-browser/lib/OpenVidu/LocalRecorder.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Stream } from './Stream'; -import { LocalRecorderState } from '../OpenViduInternal/Enums/LocalRecorderState'; -/** - * Easy recording of [[Stream]] objects straightaway from the browser. Initialized with [[OpenVidu.initLocalRecorder]] method - * - * > WARNINGS: - * - Performing browser local recording of **remote streams** may cause some troubles. A long waiting time may be required after calling _LocalRecorder.stop()_ in this case - * - Only Chrome and Firefox support local stream recording - */ -export declare class LocalRecorder { - private stream; - state: LocalRecorderState; - private connectionId; - private mediaRecorder; - private chunks; - private blob; - private id; - private videoPreviewSrc; - private videoPreview; - /** - * @hidden - */ - constructor(stream: Stream); - /** - * Starts the recording of the Stream. [[state]] property must be `READY`. After method succeeds is set to `RECORDING` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully started and rejected with an Error object if not - */ - record(): Promise; - /** - * Ends the recording of the Stream. [[state]] property must be `RECORDING` or `PAUSED`. After method succeeds is set to `FINISHED` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully stopped and rejected with an Error object if not - */ - stop(): Promise; - /** - * Pauses the recording of the Stream. [[state]] property must be `RECORDING`. After method succeeds is set to `PAUSED` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully paused and rejected with an Error object if not - */ - pause(): Promise; - /** - * Resumes the recording of the Stream. [[state]] property must be `PAUSED`. After method succeeds is set to `RECORDING` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully resumed and rejected with an Error object if not - */ - resume(): Promise; - /** - * Previews the recording, appending a new HTMLVideoElement to element with id `parentId`. [[state]] property must be `FINISHED` - */ - preview(parentElement: any): HTMLVideoElement; - /** - * Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets [[state]] to `READY` so the recording can start again - */ - clean(): void; - /** - * Downloads the recorded video through the browser. [[state]] property must be `FINISHED` - */ - download(): void; - /** - * Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions. [[state]] property must be `FINISHED` - */ - getBlob(): Blob; - /** - * Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example: - * ``` - * var headers = { - * "Cookie": "$Version=1; Skin=new;", - * "Authorization":"Basic QWxhZGpbjpuIHNlctZQ==" - * } - * ``` - * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not - */ - uploadAsBinary(endpoint: string, headers?: any): Promise; - /** - * Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example: - * ``` - * var headers = { - * "Cookie": "$Version=1; Skin=new;", - * "Authorization":"Basic QWxhZGpbjpuIHNlctZQ==" - * } - * ``` - * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not: - */ - uploadAsMultipartfile(endpoint: string, headers?: any): Promise; - private onStopDefault; -} diff --git a/openvidu-browser/lib/OpenVidu/LocalRecorder.js b/openvidu-browser/lib/OpenVidu/LocalRecorder.js deleted file mode 100644 index 7ec77cb0..00000000 --- a/openvidu-browser/lib/OpenVidu/LocalRecorder.js +++ /dev/null @@ -1,329 +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. - * - */ -exports.__esModule = true; -var LocalRecorderState_1 = require("../OpenViduInternal/Enums/LocalRecorderState"); -var platform = require("platform"); -/** - * Easy recording of [[Stream]] objects straightaway from the browser. Initialized with [[OpenVidu.initLocalRecorder]] method - * - * > WARNINGS: - * - Performing browser local recording of **remote streams** may cause some troubles. A long waiting time may be required after calling _LocalRecorder.stop()_ in this case - * - Only Chrome and Firefox support local stream recording - */ -var LocalRecorder = /** @class */ (function () { - /** - * @hidden - */ - function LocalRecorder(stream) { - this.stream = stream; - this.chunks = []; - this.connectionId = (!!this.stream.connection) ? this.stream.connection.connectionId : 'default-connection'; - this.id = this.stream.streamId + '_' + this.connectionId + '_localrecord'; - this.state = LocalRecorderState_1.LocalRecorderState.READY; - } - /** - * Starts the recording of the Stream. [[state]] property must be `READY`. After method succeeds is set to `RECORDING` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully started and rejected with an Error object if not - */ - LocalRecorder.prototype.record = function () { - var _this = this; - return new Promise(function (resolve, reject) { - try { - if (typeof MediaRecorder === 'undefined') { - console.error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder'); - throw (Error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder')); - } - if (_this.state !== LocalRecorderState_1.LocalRecorderState.READY) { - throw (Error('\'LocalRecord.record()\' needs \'LocalRecord.state\' to be \'READY\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.clean()\' or init a new LocalRecorder before')); - } - console.log("Starting local recording of stream '" + _this.stream.streamId + "' of connection '" + _this.connectionId + "'"); - if (typeof MediaRecorder.isTypeSupported === 'function') { - var options = void 0; - if (MediaRecorder.isTypeSupported('video/webm;codecs=vp9')) { - options = { mimeType: 'video/webm;codecs=vp9' }; - } - else if (MediaRecorder.isTypeSupported('video/webm;codecs=h264')) { - options = { mimeType: 'video/webm;codecs=h264' }; - } - else if (MediaRecorder.isTypeSupported('video/webm;codecs=vp8')) { - options = { mimeType: 'video/webm;codecs=vp8' }; - } - console.log('Using mimeType ' + options.mimeType); - _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream(), options); - } - else { - console.warn('isTypeSupported is not supported, using default codecs for browser'); - _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream()); - } - _this.mediaRecorder.start(10); - } - catch (err) { - reject(err); - } - _this.mediaRecorder.ondataavailable = function (e) { - _this.chunks.push(e.data); - }; - _this.mediaRecorder.onerror = function (e) { - console.error('MediaRecorder error: ', e); - }; - _this.mediaRecorder.onstart = function () { - console.log('MediaRecorder started (state=' + _this.mediaRecorder.state + ')'); - }; - _this.mediaRecorder.onstop = function () { - _this.onStopDefault(); - }; - _this.mediaRecorder.onpause = function () { - console.log('MediaRecorder paused (state=' + _this.mediaRecorder.state + ')'); - }; - _this.mediaRecorder.onresume = function () { - console.log('MediaRecorder resumed (state=' + _this.mediaRecorder.state + ')'); - }; - _this.mediaRecorder.onwarning = function (e) { - console.log('MediaRecorder warning: ' + e); - }; - _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING; - resolve(); - }); - }; - /** - * Ends the recording of the Stream. [[state]] property must be `RECORDING` or `PAUSED`. After method succeeds is set to `FINISHED` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully stopped and rejected with an Error object if not - */ - LocalRecorder.prototype.stop = function () { - var _this = this; - return new Promise(function (resolve, reject) { - try { - if (_this.state === LocalRecorderState_1.LocalRecorderState.READY || _this.state === LocalRecorderState_1.LocalRecorderState.FINISHED) { - throw (Error('\'LocalRecord.stop()\' needs \'LocalRecord.state\' to be \'RECORDING\' or \'PAUSED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.start()\' before')); - } - _this.mediaRecorder.onstop = function () { - _this.onStopDefault(); - resolve(); - }; - _this.mediaRecorder.stop(); - } - catch (e) { - reject(e); - } - }); - }; - /** - * Pauses the recording of the Stream. [[state]] property must be `RECORDING`. After method succeeds is set to `PAUSED` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully paused and rejected with an Error object if not - */ - LocalRecorder.prototype.pause = function () { - var _this = this; - return new Promise(function (resolve, reject) { - try { - if (_this.state !== LocalRecorderState_1.LocalRecorderState.RECORDING) { - reject(Error('\'LocalRecord.pause()\' needs \'LocalRecord.state\' to be \'RECORDING\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.start()\' or \'LocalRecorder.resume()\' before')); - } - _this.mediaRecorder.pause(); - _this.state = LocalRecorderState_1.LocalRecorderState.PAUSED; - } - catch (error) { - reject(error); - } - }); - }; - /** - * Resumes the recording of the Stream. [[state]] property must be `PAUSED`. After method succeeds is set to `RECORDING` - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully resumed and rejected with an Error object if not - */ - LocalRecorder.prototype.resume = function () { - var _this = this; - return new Promise(function (resolve, reject) { - try { - if (_this.state !== LocalRecorderState_1.LocalRecorderState.PAUSED) { - throw (Error('\'LocalRecord.resume()\' needs \'LocalRecord.state\' to be \'PAUSED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.pause()\' before')); - } - _this.mediaRecorder.resume(); - _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING; - } - catch (error) { - reject(error); - } - }); - }; - /** - * Previews the recording, appending a new HTMLVideoElement to element with id `parentId`. [[state]] property must be `FINISHED` - */ - LocalRecorder.prototype.preview = function (parentElement) { - if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - throw (Error('\'LocalRecord.preview()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + this.state + '\'). Call \'LocalRecorder.stop()\' before')); - } - this.videoPreview = document.createElement('video'); - this.videoPreview.id = this.id; - this.videoPreview.autoplay = true; - if (platform.name === 'Safari') { - this.videoPreview.setAttribute('playsinline', 'true'); - } - if (typeof parentElement === 'string') { - var parentElementDom = document.getElementById(parentElement); - if (parentElementDom) { - this.videoPreview = parentElementDom.appendChild(this.videoPreview); - } - } - else { - this.videoPreview = parentElement.appendChild(this.videoPreview); - } - this.videoPreview.src = this.videoPreviewSrc; - return this.videoPreview; - }; - /** - * Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets [[state]] to `READY` so the recording can start again - */ - LocalRecorder.prototype.clean = function () { - var _this = this; - var f = function () { - delete _this.blob; - _this.chunks = []; - delete _this.mediaRecorder; - _this.state = LocalRecorderState_1.LocalRecorderState.READY; - }; - if (this.state === LocalRecorderState_1.LocalRecorderState.RECORDING || this.state === LocalRecorderState_1.LocalRecorderState.PAUSED) { - this.stop().then(function () { return f(); })["catch"](function () { return f(); }); - } - else { - f(); - } - }; - /** - * Downloads the recorded video through the browser. [[state]] property must be `FINISHED` - */ - LocalRecorder.prototype.download = function () { - if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - throw (Error('\'LocalRecord.download()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + this.state + '\'). Call \'LocalRecorder.stop()\' before')); - } - else { - var a = document.createElement('a'); - a.style.display = 'none'; - document.body.appendChild(a); - var url = window.URL.createObjectURL(this.blob); - a.href = url; - a.download = this.id + '.webm'; - a.click(); - window.URL.revokeObjectURL(url); - document.body.removeChild(a); - } - }; - /** - * Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions. [[state]] property must be `FINISHED` - */ - LocalRecorder.prototype.getBlob = function () { - if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - throw (Error('Call \'LocalRecord.stop()\' before getting Blob file')); - } - else { - return this.blob; - } - }; - /** - * Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example: - * ``` - * var headers = { - * "Cookie": "$Version=1; Skin=new;", - * "Authorization":"Basic QWxhZGpbjpuIHNlctZQ==" - * } - * ``` - * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not - */ - LocalRecorder.prototype.uploadAsBinary = function (endpoint, headers) { - var _this = this; - return new Promise(function (resolve, reject) { - if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - reject(Error('\'LocalRecord.uploadAsBinary()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.stop()\' before')); - } - else { - var http_1 = new XMLHttpRequest(); - http_1.open('POST', endpoint, true); - if (typeof headers === 'object') { - for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) { - var key = _a[_i]; - http_1.setRequestHeader(key, headers[key]); - } - } - http_1.onreadystatechange = function () { - if (http_1.readyState === 4) { - if (http_1.status.toString().charAt(0) === '2') { - // Success response from server (HTTP status standard: 2XX is success) - resolve(http_1.responseText); - } - else { - reject(http_1.status); - } - } - }; - http_1.send(_this.blob); - } - }); - }; - /** - * Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example: - * ``` - * var headers = { - * "Cookie": "$Version=1; Skin=new;", - * "Authorization":"Basic QWxhZGpbjpuIHNlctZQ==" - * } - * ``` - * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not: - */ - LocalRecorder.prototype.uploadAsMultipartfile = function (endpoint, headers) { - var _this = this; - return new Promise(function (resolve, reject) { - if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { - reject(Error('\'LocalRecord.uploadAsMultipartfile()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.stop()\' before')); - } - else { - var http_2 = new XMLHttpRequest(); - http_2.open('POST', endpoint, true); - if (typeof headers === 'object') { - for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) { - var key = _a[_i]; - http_2.setRequestHeader(key, headers[key]); - } - } - var sendable = new FormData(); - sendable.append('file', _this.blob, _this.id + '.webm'); - http_2.onreadystatechange = function () { - if (http_2.readyState === 4) { - if (http_2.status.toString().charAt(0) === '2') { - // Success response from server (HTTP status standard: 2XX is success) - resolve(http_2.responseText); - } - else { - reject(http_2.status); - } - } - }; - http_2.send(sendable); - } - }); - }; - /* Private methods */ - LocalRecorder.prototype.onStopDefault = function () { - console.log('MediaRecorder stopped (state=' + this.mediaRecorder.state + ')'); - this.blob = new Blob(this.chunks, { type: 'video/webm' }); - this.chunks = []; - this.videoPreviewSrc = window.URL.createObjectURL(this.blob); - this.state = LocalRecorderState_1.LocalRecorderState.FINISHED; - }; - return LocalRecorder; -}()); -exports.LocalRecorder = LocalRecorder; -//# sourceMappingURL=LocalRecorder.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/LocalRecorder.js.map b/openvidu-browser/lib/OpenVidu/LocalRecorder.js.map deleted file mode 100644 index 3172735b..00000000 --- a/openvidu-browser/lib/OpenVidu/LocalRecorder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LocalRecorder.js","sourceRoot":"","sources":["../../src/OpenVidu/LocalRecorder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAGH,mFAAkF;AAClF,mCAAsC;AAStC;;;;;;GAMG;AACH;IAYI;;OAEG;IACH,uBAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAT1B,WAAM,GAAU,EAAE,CAAC;QAUvB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,oBAAoB,CAAC;QAC5G,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,YAAY,GAAG,cAAc,CAAC;QAC1E,IAAI,CAAC,KAAK,GAAG,uCAAkB,CAAC,KAAK,CAAC;IAC1C,CAAC;IAGD;;;OAGG;IACH,8BAAM,GAAN;QAAA,iBAqEC;QApEG,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAE/B,IAAI;gBAEA,IAAI,OAAO,aAAa,KAAK,WAAW,EAAE;oBACtC,OAAO,CAAC,KAAK,CAAC,6GAA6G,CAAC,CAAC;oBAC7H,MAAM,CAAC,KAAK,CAAC,6GAA6G,CAAC,CAAC,CAAC;iBAChI;gBACD,IAAI,KAAI,CAAC,KAAK,KAAK,uCAAkB,CAAC,KAAK,EAAE;oBACzC,MAAM,CAAC,KAAK,CAAC,yFAAyF,GAAG,KAAI,CAAC,KAAK,GAAG,wEAAwE,CAAC,CAAC,CAAC;iBACpM;gBACD,OAAO,CAAC,GAAG,CAAC,sCAAsC,GAAG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AAC,CAAC;yBACvB;qBACJ;gBACL,CAAC,CAAC;gBAEF,MAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACvB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAGD,qBAAqB;IAEb,qCAAa,GAArB;QACI,OAAO,CAAC,GAAG,CAAC,gCAAgC,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;QAE/E,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QAEjB,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE7D,IAAI,CAAC,KAAK,GAAG,uCAAkB,CAAC,QAAQ,CAAC;IAC7C,CAAC;IAEL,oBAAC;AAAD,CAAC,AAlVD,IAkVC;AAlVY,sCAAa"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/OpenVidu.d.ts b/openvidu-browser/lib/OpenVidu/OpenVidu.d.ts deleted file mode 100644 index b5c47ed4..00000000 --- a/openvidu-browser/lib/OpenVidu/OpenVidu.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { LocalRecorder } from './LocalRecorder'; -import { Publisher } from './Publisher'; -import { Session } from './Session'; -import { Stream } from './Stream'; -import { Device } from '../OpenViduInternal/Interfaces/Public/Device'; -import { OpenViduAdvancedConfiguration } from '../OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration'; -import { PublisherProperties } from '../OpenViduInternal/Interfaces/Public/PublisherProperties'; -/** - * Entrypoint of OpenVidu Browser library. - * Use it to initialize objects of type [[Session]], [[Publisher]] and [[LocalRecorder]] - */ -export declare class OpenVidu { - private jsonRpcClient; - /** - * @hidden - */ - session: Session; - /** - * @hidden - */ - publishers: Publisher[]; - /** - * @hidden - */ - wsUri: string; - /** - * @hidden - */ - secret: string; - /** - * @hidden - */ - recorder: boolean; - /** - * @hidden - */ - iceServers: RTCIceServer[]; - /** - * @hidden - */ - role: string; - /** - * @hidden - */ - advancedConfiguration: OpenViduAdvancedConfiguration; - constructor(); - /** - * Returns new session - */ - initSession(): Session; - initPublisher(targetElement: string | HTMLElement): Publisher; - initPublisher(targetElement: string | HTMLElement, properties: PublisherProperties): Publisher; - initPublisher(targetElement: string | HTMLElement, completionHandler: (error: Error | undefined) => void): Publisher; - initPublisher(targetElement: string | HTMLElement, properties: PublisherProperties, completionHandler: (error: Error | undefined) => void): Publisher; - /** - * Promisified version of [[OpenVidu.initPublisher]] - * - * > WARNING: events `accessDialogOpened` and `accessDialogClosed` will not be dispatched if using this method instead of [[OpenVidu.initPublisher]] - */ - initPublisherAsync(targetElement: string | HTMLElement): Promise; - initPublisherAsync(targetElement: string | HTMLElement, properties: PublisherProperties): Promise; - /** - * Returns a new local recorder for recording streams straight away from the browser - * @param stream Stream to record - */ - initLocalRecorder(stream: Stream): LocalRecorder; - /** - * Checks if the browser supports OpenVidu - * @returns 1 if the browser supports OpenVidu, 0 otherwise - */ - checkSystemRequirements(): number; - /** - * Checks if the browser supports screen-sharing. Desktop Chrome, Firefox and Opera support screen-sharing - * @returns 1 if the browser supports screen-sharing, 0 otherwise - */ - checkScreenSharingCapabilities(): number; - /** - * Collects information about the media input devices available on the system. You can pass property `deviceId` of a [[Device]] object as value of `audioSource` or `videoSource` properties in [[initPublisher]] method - */ - getDevices(): Promise; - /** - * Get a MediaStream object that you can customize before calling [[initPublisher]] (pass _MediaStreamTrack_ property of the _MediaStream_ value resolved by the Promise as `audioSource` or `videoSource` properties in [[initPublisher]]) - * - * Parameter `options` is the same as in [[initPublisher]] second parameter (of type [[PublisherProperties]]), but only the following properties will be applied: `audioSource`, `videoSource`, `frameRate`, `resolution` - * - * To customize the Publisher's video, the API for HTMLCanvasElement is very useful. For example, to get a black-and-white video at 10 fps and HD resolution with no sound: - * ``` - * var OV = new OpenVidu(); - * var FRAME_RATE = 10; - * - * OV.getUserMedia({ - * audioSource: false; - * videoSource: undefined, - * resolution: '1280x720', - * frameRate: FRAME_RATE - * }) - * .then(mediaStream => { - * - * var videoTrack = mediaStream.getVideoTracks()[0]; - * var video = document.createElement('video'); - * video.srcObject = new MediaStream([videoTrack]); - * - * var canvas = document.createElement('canvas'); - * var ctx = canvas.getContext('2d'); - * ctx.filter = 'grayscale(100%)'; - * - * video.addEventListener('play', () => { - * var loop = () => { - * if (!video.paused && !video.ended) { - * ctx.drawImage(video, 0, 0, 300, 170); - * setTimeout(loop, 1000/ FRAME_RATE); // Drawing at 10 fps - * } - * }; - * loop(); - * }); - * video.play(); - * - * var grayVideoTrack = canvas.captureStream(FRAME_RATE).getVideoTracks()[0]; - * var publisher = this.OV.initPublisher( - * myHtmlTarget, - * { - * audioSource: false, - * videoSource: grayVideoTrack - * }); - * }); - * ``` - */ - getUserMedia(options: PublisherProperties): Promise; - /** - * Disable all logging except error level - */ - enableProdMode(): void; - /** - * Set OpenVidu advanced configuration options. Currently `configuration` is an object with the following optional properties (see [[OpenViduAdvancedConfiguration]] for more details): - * - `iceServers`: set custom STUN/TURN servers to be used by OpenVidu Browser - * - `screenShareChromeExtension`: url to a custom screen share extension for Chrome to be used instead of the default one, based on ours [https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension) - * - `publisherSpeakingEventsOptions`: custom configuration for the [[PublisherSpeakingEvent]] feature - */ - setAdvancedConfiguration(configuration: OpenViduAdvancedConfiguration): void; - /** - * @hidden - */ - generateMediaConstraints(publisherProperties: PublisherProperties): Promise; - /** - * @hidden - */ - startWs(onConnectSucces: (error: Error) => void): void; - /** - * @hidden - */ - closeWs(): void; - /** - * @hidden - */ - sendRequest(method: string, params: any, callback?: any): void; - /** - * @hidden - */ - getWsUri(): string; - /** - * @hidden - */ - getSecret(): string; - /** - * @hidden - */ - getRecorder(): boolean; - private disconnectCallback; - private reconnectingCallback; - private reconnectedCallback; - private isRoomAvailable; -} diff --git a/openvidu-browser/lib/OpenVidu/OpenVidu.js b/openvidu-browser/lib/OpenVidu/OpenVidu.js deleted file mode 100644 index 84d552f2..00000000 --- a/openvidu-browser/lib/OpenVidu/OpenVidu.js +++ /dev/null @@ -1,623 +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. - * - */ -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"); -var screenSharing = require("../OpenViduInternal/ScreenSharing/Screen-Capturing"); -var RpcBuilder = require("../OpenViduInternal/KurentoUtils/kurento-jsonrpc"); -var platform = require("platform"); -platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua.indexOf('Safari') === -1; -/** - * Entrypoint of OpenVidu Browser library. - * Use it to initialize objects of type [[Session]], [[Publisher]] and [[LocalRecorder]] - */ -var OpenVidu = /** @class */ (function () { - function OpenVidu() { - var _this = this; - /** - * @hidden - */ - this.publishers = []; - /** - * @hidden - */ - this.secret = ''; - /** - * @hidden - */ - this.recorder = false; - /** - * @hidden - */ - this.advancedConfiguration = {}; - console.info("'OpenVidu' initialized"); - if (platform.os.family === 'iOS' || platform.os.family === 'Android') { - // Listen to orientationchange only on mobile devices - window.addEventListener('orientationchange', 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; - var getNewVideoDimensions_1 = function () { - return new Promise(function (resolve, reject) { - if (platform['isIonicIos']) { - // iOS Ionic. Limitation: must get new dimensions from an existing video element already inserted into DOM - resolve({ - newWidth: publisher.stream.streamManager.videos[0].video.videoWidth, - newHeight: publisher.stream.streamManager.videos[0].video.videoHeight - }); - } - else { - // Rest of platforms - // 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 = publisher.stream.getMediaStream().getVideoTracks()[0].getSettings(); - var newWidth = ((platform.name.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings.width : publisher.videoReference.videoWidth); - var newHeight = ((platform.name.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings.height : publisher.videoReference.videoHeight); - resolve({ newWidth: newWidth, newHeight: newHeight }); - } - }); - }; - var repeatUntilChange_1 = setInterval(function () { - getNewVideoDimensions_1().then(function (newDimensions) { - sendStreamPropertyChangedEvent_1(oldWidth_1, oldHeight_1, newDimensions.newWidth, newDimensions.newHeight); - }); - }, 75); - var sendStreamPropertyChangedEvent_1 = function (oldWidth, oldHeight, newWidth, newHeight) { - attempts_1++; - if (attempts_1 > 10) { - 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 - */ - OpenVidu.prototype.initSession = function () { - this.session = new Session_1.Session(this); - return this.session; - }; - /** - * Returns a new publisher - * - * #### Events dispatched - * - * The [[Publisher]] object will dispatch an `accessDialogOpened` event, only if the pop-up shown by the browser to request permissions for the camera is opened. You can use this event to alert the user about granting permissions - * for your website. An `accessDialogClosed` event will also be dispatched after user clicks on "Allow" or "Block" in the pop-up. - * - * The [[Publisher]] object will dispatch an `accessAllowed` or `accessDenied` event once it has been granted access to the requested input devices or not. - * - * The [[Publisher]] object will dispatch a `videoElementCreated` event once a HTML video element has been added to DOM (only if you - * [let OpenVidu take care of the video players](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more. - * - * The [[Publisher]] object will dispatch a `streamPlaying` event once the local streams starts playing. See [[StreamManagerEvent]] to learn more. - * - * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher will be inserted (see [[PublisherProperties.insertMode]]). If *null* or *undefined* no default video will be created for this Publisher. - * You can always call method [[Publisher.addVideoElement]] or [[Publisher.createVideoElement]] to manage the video elements on your own (see [Manage video players](/docs/how-do-i/manage-videos) section) - * @param completionHandler `error` parameter is null if `initPublisher` succeeds, and is defined if it fails. - * `completionHandler` function is called before the Publisher dispatches an `accessAllowed` or an `accessDenied` event - */ - OpenVidu.prototype.initPublisher = function (targetElement, param2, param3) { - var properties; - if (!!param2 && (typeof param2 !== 'function')) { - // Matches 'initPublisher(targetElement, properties)' or 'initPublisher(targetElement, properties, completionHandler)' - properties = param2; - properties = { - audioSource: (typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined, - frameRate: (properties.videoSource instanceof MediaStreamTrack) ? undefined : ((typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined), - insertMode: (typeof properties.insertMode !== 'undefined') ? ((typeof properties.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[properties.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND, - mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true, - publishAudio: (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true, - publishVideo: (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true, - resolution: (properties.videoSource instanceof MediaStreamTrack) ? undefined : ((typeof properties.resolution !== 'undefined') ? properties.resolution : '640x480'), - videoSource: (typeof properties.videoSource !== 'undefined') ? properties.videoSource : undefined, - filter: properties.filter - }; - } - else { - // Matches 'initPublisher(targetElement)' or 'initPublisher(targetElement, completionHandler)' - properties = { - insertMode: VideoInsertMode_1.VideoInsertMode.APPEND, - mirror: true, - publishAudio: true, - publishVideo: true, - resolution: '640x480' - }; - } - var publisher = new Publisher_1.Publisher(targetElement, properties, this); - var completionHandler; - if (!!param2 && (typeof param2 === 'function')) { - completionHandler = param2; - } - else if (!!param3) { - completionHandler = param3; - } - publisher.initialize() - .then(function () { - if (completionHandler !== undefined) { - completionHandler(undefined); - } - publisher.emitEvent('accessAllowed', []); - })["catch"](function (error) { - if (completionHandler !== undefined) { - completionHandler(error); - } - publisher.emitEvent('accessDenied', []); - }); - this.publishers.push(publisher); - return publisher; - }; - OpenVidu.prototype.initPublisherAsync = function (targetElement, properties) { - var _this = this; - return new Promise(function (resolve, reject) { - var publisher; - var callback = function (error) { - if (!!error) { - reject(error); - } - else { - resolve(publisher); - } - }; - if (!!properties) { - publisher = _this.initPublisher(targetElement, properties, callback); - } - else { - publisher = _this.initPublisher(targetElement, callback); - } - }); - }; - /** - * Returns a new local recorder for recording streams straight away from the browser - * @param stream Stream to record - */ - OpenVidu.prototype.initLocalRecorder = function (stream) { - return new LocalRecorder_1.LocalRecorder(stream); - }; - /** - * Checks if the browser supports OpenVidu - * @returns 1 if the browser supports OpenVidu, 0 otherwise - */ - OpenVidu.prototype.checkSystemRequirements = function () { - var browser = platform.name; - var family = platform.os.family; - var userAgent = !!platform.ua ? platform.ua : navigator.userAgent; - // Reject iPhones and iPads if not Safari ('Safari' also covers Ionic for iOS) - if (family === 'iOS' && (browser !== 'Safari' || userAgent.indexOf('CriOS') !== -1 || userAgent.indexOf('FxiOS') !== -1)) { - return 0; - } - // Accept: Chrome (desktop and Android), Firefox (desktop and Android), Opera (desktop and Android), - // Safari (OSX and iOS), Ionic (Android and iOS) - if ((browser !== 'Safari') && - (browser !== 'Chrome') && (browser !== 'Chrome Mobile') && - (browser !== 'Firefox') && (browser !== 'Firefox Mobile') && - (browser !== 'Opera') && (browser !== 'Opera Mobile') && - (browser !== 'Android Browser')) { - return 0; - } - else { - return 1; - } - }; - /** - * Checks if the browser supports screen-sharing. Desktop Chrome, Firefox and Opera support screen-sharing - * @returns 1 if the browser supports screen-sharing, 0 otherwise - */ - OpenVidu.prototype.checkScreenSharingCapabilities = function () { - var browser = platform.name; - var family = platform.os.family; - // Reject mobile devices - if (family === 'iOS' || family === 'Android') { - return 0; - } - if ((browser !== 'Chrome') && (browser !== 'Firefox') && (browser !== 'Opera')) { - return 0; - } - else { - return 1; - } - }; - /** - * Collects information about the media input devices available on the system. You can pass property `deviceId` of a [[Device]] object as value of `audioSource` or `videoSource` properties in [[initPublisher]] method - */ - OpenVidu.prototype.getDevices = function () { - return new Promise(function (resolve, reject) { - navigator.mediaDevices.enumerateDevices().then(function (deviceInfos) { - var devices = []; - deviceInfos.forEach(function (deviceInfo) { - if (deviceInfo.kind === 'audioinput' || deviceInfo.kind === 'videoinput') { - devices.push({ - kind: deviceInfo.kind, - deviceId: deviceInfo.deviceId, - label: deviceInfo.label - }); - } - }); - resolve(devices); - })["catch"](function (error) { - console.error('Error getting devices', error); - reject(error); - }); - }); - }; - /** - * Get a MediaStream object that you can customize before calling [[initPublisher]] (pass _MediaStreamTrack_ property of the _MediaStream_ value resolved by the Promise as `audioSource` or `videoSource` properties in [[initPublisher]]) - * - * Parameter `options` is the same as in [[initPublisher]] second parameter (of type [[PublisherProperties]]), but only the following properties will be applied: `audioSource`, `videoSource`, `frameRate`, `resolution` - * - * To customize the Publisher's video, the API for HTMLCanvasElement is very useful. For example, to get a black-and-white video at 10 fps and HD resolution with no sound: - * ``` - * var OV = new OpenVidu(); - * var FRAME_RATE = 10; - * - * OV.getUserMedia({ - * audioSource: false; - * videoSource: undefined, - * resolution: '1280x720', - * frameRate: FRAME_RATE - * }) - * .then(mediaStream => { - * - * var videoTrack = mediaStream.getVideoTracks()[0]; - * var video = document.createElement('video'); - * video.srcObject = new MediaStream([videoTrack]); - * - * var canvas = document.createElement('canvas'); - * var ctx = canvas.getContext('2d'); - * ctx.filter = 'grayscale(100%)'; - * - * video.addEventListener('play', () => { - * var loop = () => { - * if (!video.paused && !video.ended) { - * ctx.drawImage(video, 0, 0, 300, 170); - * setTimeout(loop, 1000/ FRAME_RATE); // Drawing at 10 fps - * } - * }; - * loop(); - * }); - * video.play(); - * - * var grayVideoTrack = canvas.captureStream(FRAME_RATE).getVideoTracks()[0]; - * var publisher = this.OV.initPublisher( - * myHtmlTarget, - * { - * audioSource: false, - * videoSource: grayVideoTrack - * }); - * }); - * ``` - */ - OpenVidu.prototype.getUserMedia = function (options) { - var _this = this; - return new Promise(function (resolve, reject) { - _this.generateMediaConstraints(options) - .then(function (constraints) { - navigator.mediaDevices.getUserMedia(constraints) - .then(function (mediaStream) { - resolve(mediaStream); - })["catch"](function (error) { - var errorName; - var errorMessage = error.toString(); - if (!(options.videoSource === 'screen')) { - errorName = OpenViduError_1.OpenViduErrorName.DEVICE_ACCESS_DENIED; - } - else { - errorName = OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED; - } - reject(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - }); - })["catch"](function (error) { - reject(error); - }); - }); - }; - /* tslint:disable:no-empty */ - /** - * Disable all logging except error level - */ - OpenVidu.prototype.enableProdMode = function () { - console.log = function () { }; - console.debug = function () { }; - console.info = function () { }; - console.warn = function () { }; - }; - /* tslint:enable:no-empty */ - /** - * Set OpenVidu advanced configuration options. Currently `configuration` is an object with the following optional properties (see [[OpenViduAdvancedConfiguration]] for more details): - * - `iceServers`: set custom STUN/TURN servers to be used by OpenVidu Browser - * - `screenShareChromeExtension`: url to a custom screen share extension for Chrome to be used instead of the default one, based on ours [https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension) - * - `publisherSpeakingEventsOptions`: custom configuration for the [[PublisherSpeakingEvent]] feature - */ - OpenVidu.prototype.setAdvancedConfiguration = function (configuration) { - this.advancedConfiguration = configuration; - }; - /* Hidden methods */ - /** - * @hidden - */ - OpenVidu.prototype.generateMediaConstraints = function (publisherProperties) { - var _this = this; - return new Promise(function (resolve, reject) { - var audio, video; - if (publisherProperties.audioSource === null || publisherProperties.audioSource === false) { - audio = false; - } - else if (publisherProperties.audioSource === undefined) { - audio = true; - } - else { - audio = publisherProperties.audioSource; - } - if (publisherProperties.videoSource === null || publisherProperties.videoSource === false) { - video = false; - } - else { - video = { - height: { - ideal: 480 - }, - width: { - ideal: 640 - } - }; - } - var mediaConstraints = { - audio: audio, - video: video - }; - if (typeof mediaConstraints.audio === 'string') { - mediaConstraints.audio = { deviceId: { exact: mediaConstraints.audio } }; - } - if (mediaConstraints.video) { - if (!!publisherProperties.resolution) { - var widthAndHeight = publisherProperties.resolution.toLowerCase().split('x'); - var width = Number(widthAndHeight[0]); - var height = Number(widthAndHeight[1]); - mediaConstraints.video.width.ideal = width; - mediaConstraints.video.height.ideal = height; - } - if (!!publisherProperties.frameRate) { - mediaConstraints.video.frameRate = { ideal: publisherProperties.frameRate }; - } - if (!!publisherProperties.videoSource && typeof publisherProperties.videoSource === 'string') { - if (publisherProperties.videoSource === 'screen' || - (platform.name.indexOf('Firefox') !== -1 && publisherProperties.videoSource === 'window')) { - if (platform.name !== 'Chrome' && platform.name.indexOf('Firefox') === -1 && platform.name !== 'Opera') { - var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED, 'You can only screen share in desktop Chrome, Firefox or Opera. Detected browser: ' + platform.name); - console.error(error); - reject(error); - } - else { - if (!!_this.advancedConfiguration.screenShareChromeExtension && !(platform.name.indexOf('Firefox') !== -1)) { - // Custom screen sharing extension for Chrome (and Opera) - screenSharing.getScreenConstraints(function (error, screenConstraints) { - if (!!error || !!screenConstraints.mandatory && screenConstraints.mandatory.chromeMediaSource === 'screen') { - if (error === 'permission-denied' || error === 'PermissionDeniedError') { - var error_1 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop'); - console.error(error_1); - reject(error_1); - } - else { - var extensionId = _this.advancedConfiguration.screenShareChromeExtension.split('/').pop().trim(); - screenSharing.getChromeExtensionStatus(extensionId, function (status) { - if (status === 'installed-disabled') { - var error_2 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension'); - console.error(error_2); - reject(error_2); - } - if (status === 'not-installed') { - var error_3 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, _this.advancedConfiguration.screenShareChromeExtension); - console.error(error_3); - reject(error_3); - } - }); - } - } - else { - mediaConstraints.video = screenConstraints; - resolve(mediaConstraints); - } - }); - } - else { - // Default screen sharing extension for Chrome (or is Firefox) - var firefoxString = platform.name.indexOf('Firefox') !== -1 ? publisherProperties.videoSource : undefined; - screenSharingAuto.getScreenId(firefoxString, function (error, sourceId, screenConstraints) { - if (!!error) { - if (error === 'not-installed') { - var extensionUrl = !!_this.advancedConfiguration.screenShareChromeExtension ? _this.advancedConfiguration.screenShareChromeExtension : - 'https://chrome.google.com/webstore/detail/openvidu-screensharing/lfcgfepafnobdloecchnfaclibenjold'; - var error_4 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, extensionUrl); - console.error(error_4); - reject(error_4); - } - else if (error === 'installed-disabled') { - var error_5 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension'); - console.error(error_5); - reject(error_5); - } - else if (error === 'permission-denied') { - var error_6 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop'); - console.error(error_6); - reject(error_6); - } - } - else { - mediaConstraints.video = screenConstraints.video; - resolve(mediaConstraints); - } - }); - } - publisherProperties.videoSource = 'screen'; - } - } - else { - // tslint:disable-next-line:no-string-literal - mediaConstraints.video['deviceId'] = { exact: publisherProperties.videoSource }; - resolve(mediaConstraints); - } - } - else { - resolve(mediaConstraints); - } - } - else { - resolve(mediaConstraints); - } - }); - }; - /** - * @hidden - */ - OpenVidu.prototype.startWs = function (onConnectSucces) { - var config = { - heartbeat: 5000, - sendCloseMessage: false, - ws: { - uri: this.wsUri, - useSockJS: false, - onconnected: onConnectSucces, - ondisconnect: this.disconnectCallback.bind(this), - onreconnecting: this.reconnectingCallback.bind(this), - onreconnected: this.reconnectedCallback.bind(this) - }, - rpc: { - requestTimeout: 10000, - participantJoined: this.session.onParticipantJoined.bind(this.session), - participantPublished: this.session.onParticipantPublished.bind(this.session), - participantUnpublished: this.session.onParticipantUnpublished.bind(this.session), - participantLeft: this.session.onParticipantLeft.bind(this.session), - participantEvicted: this.session.onParticipantEvicted.bind(this.session), - 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), - filterEventDispatched: this.session.onFilterEventDispatched.bind(this.session), - iceCandidate: this.session.recvIceCandidate.bind(this.session), - mediaError: this.session.onMediaError.bind(this.session) - } - }; - this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient(config); - }; - /** - * @hidden - */ - OpenVidu.prototype.closeWs = function () { - this.jsonRpcClient.close(); - }; - /** - * @hidden - */ - OpenVidu.prototype.sendRequest = function (method, params, callback) { - if (params && params instanceof Function) { - callback = params; - params = {}; - } - console.debug('Sending request: {method:"' + method + '", params: ' + JSON.stringify(params) + '}'); - this.jsonRpcClient.send(method, params, callback); - }; - /** - * @hidden - */ - OpenVidu.prototype.getWsUri = function () { - return this.wsUri; - }; - /** - * @hidden - */ - OpenVidu.prototype.getSecret = function () { - return this.secret; - }; - /** - * @hidden - */ - OpenVidu.prototype.getRecorder = function () { - return this.recorder; - }; - /* Private methods */ - OpenVidu.prototype.disconnectCallback = function () { - console.warn('Websocket connection lost'); - if (this.isRoomAvailable()) { - this.session.onLostConnection(); - } - else { - alert('Connection error. Please reload page.'); - } - }; - OpenVidu.prototype.reconnectingCallback = function () { - console.warn('Websocket connection lost (reconnecting)'); - if (this.isRoomAvailable()) { - this.session.onLostConnection(); - } - else { - alert('Connection error. Please reload page.'); - } - }; - 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) { - return true; - } - else { - console.warn('Session instance not found'); - return false; - } - }; - return OpenVidu; -}()); -exports.OpenVidu = OpenVidu; -//# sourceMappingURL=OpenVidu.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/OpenVidu.js.map b/openvidu-browser/lib/OpenVidu/OpenVidu.js.map deleted file mode 100644 index 0f8b3654..00000000 --- a/openvidu-browser/lib/OpenVidu/OpenVidu.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OpenVidu.js","sourceRoot":"","sources":["../../src/OpenVidu/OpenVidu.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,iDAAgD;AAChD,yCAAwC;AACxC,qCAAoC;AAEpC,oGAAmG;AAInG,yEAA2F;AAC3F,6EAA4E;AAE5E,2FAA6F;AAC7F,kFAAoF;AAEpF,6EAAgF;AAChF,mCAAsC;AACtC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,EAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAElI;;;GAGG;AACH;IAqCE;QAAA,iBAyEC;QAtGD;;WAEG;QACH,eAAU,GAAgB,EAAE,CAAC;QAK7B;;WAEG;QACH,WAAM,GAAG,EAAE,CAAC;QACZ;;WAEG;QACH,aAAQ,GAAG,KAAK,CAAC;QASjB;;WAEG;QACH,0BAAqB,GAAkC,EAAE,CAAC;QAGxD,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAEvC,IAAI,QAAQ,CAAC,EAAI,CAAC,MAAM,KAAK,KAAK,IAAI,QAAQ,CAAC,EAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YACxE,qDAAqD;YAC/C,MAAO,CAAC,gBAAgB,CAAC,mBAAmB,EAAE;gBAClD,KAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAA,SAAS;oBAC/B,IAAI,CAAC,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,M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C,uBAAuB,CAAC,CAAC;QACtC,IAAI,IAAI,CAAC,eAAe,EAAE,EAAE;YAC1B,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;SACtC;aAAM;YACL,KAAK,CAAC,uCAAuC,CAAC,CAAC;SAChD;IACH,CAAC;IAEO,kCAAe,GAAvB;QACE,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,YAAY,iBAAO,EAAE;YACjE,OAAO,IAAI,CAAC;SACb;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;YAC3C,OAAO,KAAK,CAAC;SACd;IACH,CAAC;IAEH,eAAC;AAAD,CAAC,AAlqBD,IAkqBC;AAlqBY,4BAAQ"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Publisher.d.ts b/openvidu-browser/lib/OpenVidu/Publisher.d.ts deleted file mode 100644 index 92aa13cf..00000000 --- a/openvidu-browser/lib/OpenVidu/Publisher.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -/// -import { OpenVidu } from './OpenVidu'; -import { Session } from './Session'; -import { StreamManager } from './StreamManager'; -import { EventDispatcher } from '../OpenViduInternal/Interfaces/Public/EventDispatcher'; -import { PublisherProperties } from '../OpenViduInternal/Interfaces/Public/PublisherProperties'; -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 { - /** - * Whether the Publisher has been granted access to the requested input devices or not - */ - accessAllowed: boolean; - /** - * Whether you have called [[Publisher.subscribeToRemote]] with value `true` or `false` (*false* by default) - */ - isSubscribedToRemote: boolean; - /** - * The [[Session]] to which the Publisher belongs - */ - session: Session; - 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 - * - * > _Only if `Session.publish(Publisher)` has been called for this Publisher_ - * - * 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 - * - * > _Only if `Session.publish(Publisher)` has been called for this Publisher_ - * - * 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]] 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; - /** - * See [[EventDispatcher.on]] - */ - on(type: string, handler: (event: Event) => void): EventDispatcher; - /** - * See [[EventDispatcher.once]] - */ - once(type: string, handler: (event: Event) => void): Publisher; - /** - * @hidden - */ - initialize(): Promise; - /** - * @hidden - */ - reestablishStreamPlayingEvent(): void; - private setPermissionDialogTimer; - private clearPermissionDialogTimer; -} diff --git a/openvidu-browser/lib/OpenVidu/Publisher.js b/openvidu-browser/lib/OpenVidu/Publisher.js deleted file mode 100644 index 6742c6aa..00000000 --- a/openvidu-browser/lib/OpenVidu/Publisher.js +++ /dev/null @@ -1,564 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -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"); -platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua.indexOf('Safari') === -1; -/** - * Packs local media streams. Participants can publish it to a session. Initialized with [[OpenVidu.initPublisher]] method - */ -var Publisher = /** @class */ (function (_super) { - __extends(Publisher, _super); - /** - * @hidden - */ - 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; - /** - * Whether the Publisher has been granted access to the requested input devices or not - */ - _this.accessAllowed = false; - /** - * Whether you have called [[Publisher.subscribeToRemote]] with value `true` or `false` (*false* by default) - */ - _this.isSubscribedToRemote = false; - _this.accessDenied = false; - _this.properties = properties; - _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.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 - * - * > _Only if `Session.publish(Publisher)` has been called for this Publisher_ - * - * 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) { - var _this = this; - if (this.stream.audioActive !== value) { - this.stream.getMediaStream().getAudioTracks().forEach(function (track) { - track.enabled = value; - }); - if (!!this.session && !!this.stream.streamId) { - 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 - * - * > _Only if `Session.publish(Publisher)` has been called for this Publisher_ - * - * 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) { - var _this = this; - if (this.stream.videoActive !== value) { - this.stream.getMediaStream().getVideoTracks().forEach(function (track) { - track.enabled = value; - }); - if (!!this.session && !!this.stream.streamId) { - 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]] 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; - this.isSubscribedToRemote = value; - this.stream.subscribeToMyRemote(value); - }; - /** - * See [[EventDispatcher.on]] - */ - Publisher.prototype.on = function (type, handler) { - var _this = this; - _super.prototype.on.call(this, type, handler); - if (type === 'streamCreated') { - if (!!this.stream && this.stream.isLocalStreamPublished) { - this.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]); - } - else { - this.stream.ee.on('stream-created-by-publisher', function () { - _this.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]); - }); - } - } - if (type === 'remoteVideoPlaying') { - if (this.stream.displayMyRemote() && this.videos[0] && this.videos[0].video && - this.videos[0].video.currentTime > 0 && - this.videos[0].video.paused === false && - this.videos[0].video.ended === false && - this.videos[0].video.readyState === 4) { - this.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]); - } - } - if (type === 'accessAllowed') { - if (this.accessAllowed) { - this.emitEvent('accessAllowed', []); - } - } - if (type === 'accessDenied') { - if (this.accessDenied) { - this.emitEvent('accessDenied', []); - } - } - return this; - }; - /** - * See [[EventDispatcher.once]] - */ - Publisher.prototype.once = function (type, handler) { - var _this = this; - _super.prototype.once.call(this, type, handler); - if (type === 'streamCreated') { - if (!!this.stream && this.stream.isLocalStreamPublished) { - this.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]); - } - else { - this.stream.ee.once('stream-created-by-publisher', function () { - _this.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]); - }); - } - } - if (type === 'remoteVideoPlaying') { - if (this.stream.displayMyRemote() && this.videos[0] && this.videos[0].video && - this.videos[0].video.currentTime > 0 && - this.videos[0].video.paused === false && - this.videos[0].video.ended === false && - this.videos[0].video.readyState === 4) { - this.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'remoteVideoPlaying')]); - } - } - if (type === 'accessAllowed') { - if (this.accessAllowed) { - this.emitEvent('accessAllowed', []); - } - } - if (type === 'accessDenied') { - if (this.accessDenied) { - this.emitEvent('accessDenied', []); - } - } - return this; - }; - /* Hidden methods */ - /** - * @hidden - */ - Publisher.prototype.initialize = function () { - var _this = this; - return new Promise(function (resolve, reject) { - var errorCallback = function (openViduError) { - _this.accessDenied = true; - _this.accessAllowed = false; - reject(openViduError); - }; - var successCallback = function (mediaStream) { - _this.accessAllowed = true; - _this.accessDenied = false; - if (_this.properties.audioSource instanceof MediaStreamTrack) { - mediaStream.removeTrack(mediaStream.getAudioTracks()[0]); - mediaStream.addTrack(_this.properties.audioSource); - } - if (_this.properties.videoSource instanceof MediaStreamTrack) { - mediaStream.removeTrack(mediaStream.getVideoTracks()[0]); - mediaStream.addTrack(_this.properties.videoSource); - } - // Apply PublisherProperties.publishAudio and PublisherProperties.publishVideo - if (!!mediaStream.getAudioTracks()[0]) { - var enabled = (_this.stream.audioActive !== undefined && _this.stream.audioActive !== null) ? _this.stream.audioActive : !!_this.stream.outboundStreamOpts.publisherProperties.publishAudio; - mediaStream.getAudioTracks()[0].enabled = enabled; - } - if (!!mediaStream.getVideoTracks()[0]) { - var enabled = (_this.stream.videoActive !== undefined && _this.stream.videoActive !== null) ? _this.stream.videoActive : !!_this.stream.outboundStreamOpts.publisherProperties.publishVideo; - mediaStream.getVideoTracks()[0].enabled = enabled; - } - _this.videoReference = document.createElement('video'); - if (platform.name === 'Safari') { - _this.videoReference.setAttribute('playsinline', 'true'); - } - _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(); - } - if (!!_this.firstVideoElement) { - _this.createVideoElement(_this.firstVideoElement.targetElement, _this.properties.insertMode); - } - delete _this.firstVideoElement; - if (_this.stream.isSendVideo()) { - if (!_this.stream.isSendScreen()) { - if (platform['isIonicIos'] || platform.name === 'Safari') { - // iOS Ionic or Safari. Limitation: cannot set videoDimensions directly, as the videoReference is not loaded - // if not added to DOM. Must add it to DOM and wait for videoWidth and videoHeight properties to be defined - _this.videoReference.style.display = 'none'; - document.body.appendChild(_this.videoReference); - var videoDimensionsSet_1 = function () { - _this.stream.videoDimensions = { - width: _this.videoReference.videoWidth, - height: _this.videoReference.videoHeight - }; - _this.stream.isLocalStreamReadyToPublish = true; - _this.stream.ee.emitEvent('stream-ready-to-publish', []); - document.body.removeChild(_this.videoReference); - }; - var interval_1; - _this.videoReference.onloadedmetadata = function () { - if (_this.videoReference.videoWidth === 0) { - interval_1 = setInterval(function () { - if (_this.videoReference.videoWidth !== 0) { - videoDimensionsSet_1(); - clearInterval(interval_1); - } - }, 10); - } - else { - videoDimensionsSet_1(); - } - }; - } - else { - // Rest of platforms - // 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.os.family === 'iOS' || platform.os.family === 'Android') && (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' || platform.name === 'Opera') ? _this.videoReference.videoWidth : firefoxSettings.width; - var newHeight = (platform.name === 'Chrome' || platform.name === 'Opera') ? _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(); - }; - // Check if new constraints need to be generated. No constraints needed if - // - video track is given and no audio - // - audio track is given and no video - // - both video and audio tracks are given - if ((_this.properties.videoSource instanceof MediaStreamTrack && !_this.properties.audioSource) - || (_this.properties.audioSource instanceof MediaStreamTrack && !_this.properties.videoSource) - || (_this.properties.videoSource instanceof MediaStreamTrack && _this.properties.audioSource instanceof MediaStreamTrack)) { - var mediaStream = new MediaStream(); - if (_this.properties.videoSource instanceof MediaStreamTrack) { - mediaStream.addTrack(_this.properties.videoSource); - } - if (_this.properties.audioSource instanceof MediaStreamTrack) { - mediaStream.addTrack(_this.properties.audioSource); - } - // MediaStreamTracks are handled within callback - just call callback with new MediaStream() and let it handle the sources - successCallback(mediaStream); - // Return as we do not need to process further - return; - } - _this.openvidu.generateMediaConstraints(_this.properties) - .then(function (constraints) { - var outboundStreamOptions = { - mediaConstraints: constraints, - publisherProperties: _this.properties - }; - _this.stream.setOutboundStreamOptions(outboundStreamOptions); - var constraintsAux = {}; - var timeForDialogEvent = 1250; - if (_this.stream.isSendVideo() || _this.stream.isSendAudio()) { - var definedAudioConstraint_1 = ((constraints.audio === undefined) ? true : constraints.audio); - constraintsAux.audio = _this.stream.isSendScreen() ? false : definedAudioConstraint_1; - constraintsAux.video = constraints.video; - var startTime_1 = Date.now(); - _this.setPermissionDialogTimer(timeForDialogEvent); - navigator.mediaDevices.getUserMedia(constraintsAux) - .then(function (mediaStream) { - _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent); - if (_this.stream.isSendScreen() && _this.stream.isSendAudio()) { - // When getting desktop as user media audio constraint must be false. Now we can ask for it if required - constraintsAux.audio = definedAudioConstraint_1; - constraintsAux.video = false; - startTime_1 = Date.now(); - _this.setPermissionDialogTimer(timeForDialogEvent); - navigator.mediaDevices.getUserMedia(constraintsAux) - .then(function (audioOnlyStream) { - _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent); - mediaStream.addTrack(audioOnlyStream.getAudioTracks()[0]); - successCallback(mediaStream); - })["catch"](function (error) { - _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent); - if (error.name === 'Error') { - // Safari OverConstrainedError has as name property 'Error' instead of 'OverConstrainedError' - error.name = error.constructor.name; - } - var errorName, errorMessage; - switch (error.name.toLowerCase()) { - case 'notfounderror': - errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - break; - case 'notallowederror': - errorName = OpenViduError_1.OpenViduErrorName.DEVICE_ACCESS_DENIED; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - break; - case 'overconstrainederror': - if (error.constraint.toLowerCase() === 'deviceid') { - errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND; - errorMessage = "Audio input device with deviceId '" + constraints.video.deviceId.exact + "' not found"; - } - else { - errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR; - errorMessage = "Audio input device doesn't support the value passed for constraint '" + error.constraint + "'"; - } - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - break; - } - }); - } - else { - successCallback(mediaStream); - } - })["catch"](function (error) { - _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent); - if (error.name === 'Error') { - // Safari OverConstrainedError has as name property 'Error' instead of 'OverConstrainedError' - error.name = error.constructor.name; - } - var errorName, errorMessage; - switch (error.name.toLowerCase()) { - case 'notfounderror': - navigator.mediaDevices.getUserMedia({ - audio: false, - video: constraints.video - }) - .then(function (mediaStream) { - mediaStream.getVideoTracks().forEach(function (track) { - track.stop(); - }); - errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - })["catch"](function (e) { - errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - }); - break; - case 'notallowederror': - errorName = _this.stream.isSendScreen() ? OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED : OpenViduError_1.OpenViduErrorName.DEVICE_ACCESS_DENIED; - errorMessage = error.toString(); - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - break; - case 'overconstrainederror': - navigator.mediaDevices.getUserMedia({ - audio: false, - video: constraints.video - }) - .then(function (mediaStream) { - mediaStream.getVideoTracks().forEach(function (track) { - track.stop(); - }); - if (error.constraint.toLowerCase() === 'deviceid') { - errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND; - errorMessage = "Audio input device with deviceId '" + constraints.audio.deviceId.exact + "' not found"; - } - else { - errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR; - errorMessage = "Audio input device doesn't support the value passed for constraint '" + error.constraint + "'"; - } - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - })["catch"](function (e) { - if (error.constraint.toLowerCase() === 'deviceid') { - errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND; - errorMessage = "Video input device with deviceId '" + constraints.video.deviceId.exact + "' not found"; - } - else { - errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR; - errorMessage = "Video input device doesn't support the value passed for constraint '" + error.constraint + "'"; - } - errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage)); - }); - break; - } - }); - } - else { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.NO_INPUT_SOURCE_SET, "Properties 'audioSource' and 'videoSource' cannot be set to false or null at the same time when calling 'OpenVidu.initPublisher'")); - } - })["catch"](function (error) { - errorCallback(error); - }); - }); - }; - /** - * @hidden - */ - Publisher.prototype.reestablishStreamPlayingEvent = function () { - if (this.ee.getListeners('streamPlaying').length > 0) { - this.addPlayEventToFirstVideo(); - } - }; - /* Private methods */ - Publisher.prototype.setPermissionDialogTimer = function (waitTime) { - var _this = this; - this.permissionDialogTimeout = setTimeout(function () { - _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.emitEvent('accessDialogClosed', []); - } - }; - return Publisher; -}(StreamManager_1.StreamManager)); -exports.Publisher = Publisher; -//# sourceMappingURL=Publisher.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Publisher.js.map b/openvidu-browser/lib/OpenVidu/Publisher.js.map deleted file mode 100644 index 29887016..00000000 --- a/openvidu-browser/lib/OpenVidu/Publisher.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Publisher.js","sourceRoot":"","sources":["../../src/OpenVidu/Publisher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;AAGH,qCAAoC;AACpC,mCAAkC;AAClC,iDAAgD;AAIhD,sEAAqE;AACrE,oGAAmG;AACnG,kFAAiF;AACjF,yEAA2F;AAG3F,mCAAsC;AACtC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,EAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAElI;;GAEG;AACH;IAA+B,6BAAa;IAkCxC;;OAEG;IACH,mBAAY,MAA4B,EAAE,UAA+B,EAAE,QAAkB;QAA7F,YACI,kBAAM,IAAI,eAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,iBAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,mBAAmB,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,SAUxJ;QA9CD;;WAEG;QACH,mBAAa,GAAG,KAAK,CAAC;QAEtB;;WAEG;QACH,0BAAoB,GAAG,KAAK,CAAC;QAOrB,kBAAY,GAAG,KAAK,CAAC;QAsBzB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,KAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,wBAAwB,EAAE,UAAC,MAAc;YACvD,KAA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SAAS,CAAC,GAAG,QAAQ,EAAE;YACrC,gDAAgD;YAChD,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;SAC5C;IACL,CAAC;IAEL,gBAAC;AAAD,CAAC,AAhkBD,CAA+B,6BAAa,GAgkB3C;AAhkBY,8BAAS"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Session.d.ts b/openvidu-browser/lib/OpenVidu/Session.d.ts deleted file mode 100644 index a8b96deb..00000000 --- a/openvidu-browser/lib/OpenVidu/Session.d.ts +++ /dev/null @@ -1,293 +0,0 @@ -import { Connection } from './Connection'; -import { OpenVidu } from './OpenVidu'; -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'; -import { ConnectionOptions } from '../OpenViduInternal/Interfaces/Private/ConnectionOptions'; -import { ObjMap } from '../OpenViduInternal/Interfaces/Private/ObjMap'; -import { SessionOptions } from '../OpenViduInternal/Interfaces/Private/SessionOptions'; -import { ConnectionEvent } from '../OpenViduInternal/Events/ConnectionEvent'; -import { PublisherSpeakingEvent } from '../OpenViduInternal/Events/PublisherSpeakingEvent'; -import { RecordingEvent } from '../OpenViduInternal/Events/RecordingEvent'; -import { SessionDisconnectedEvent } from '../OpenViduInternal/Events/SessionDisconnectedEvent'; -import { SignalEvent } from '../OpenViduInternal/Events/SignalEvent'; -import { StreamEvent } from '../OpenViduInternal/Events/StreamEvent'; -/** - * Represents a video call. It can also be seen as a videoconference room where multiple users can connect. - * Participants who publish their videos to a session can be seen by the rest of users connected to that specific session. - * Initialized with [[OpenVidu.initSession]] method - */ -export declare class Session implements EventDispatcher { - /** - * Local connection to the Session. This object is defined only after [[Session.connect]] has been successfully executed, and can be retrieved subscribing to `connectionCreated` event - */ - connection: Connection; - /** - * Unique identifier of the Session - */ - sessionId: string; - /** - * 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 - */ - remoteStreamsCreated: ObjMap; - /** - * @hidden - */ - isFirstIonicIosSubscriber: boolean; - /** - * @hidden - */ - countDownForIonicIosSubscribers: boolean; - /** - * @hidden - */ - remoteConnections: ObjMap; - /** - * @hidden - */ - openvidu: OpenVidu; - /** - * @hidden - */ - options: SessionOptions; - /** - * @hidden - */ - speakingEventsEnabled: boolean; - private ee; - /** - * @hidden - */ - constructor(openvidu: OpenVidu); - connect(token: string): Promise; - connect(token: string, metadata: any): Promise; - /** - * Leaves the session, destroying all streams and deleting the user as a participant. - * - * #### Events dispatched - * - * The [[Session]] object of the local participant will dispatch a `sessionDisconnected` event. - * 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()` 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()` 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()` 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. - */ - disconnect(): void; - subscribe(stream: Stream, targetElement: string | HTMLElement): Subscriber; - subscribe(stream: Stream, targetElement: string | HTMLElement, properties: SubscriberProperties): Subscriber; - subscribe(stream: Stream, targetElement: string | HTMLElement, completionHandler: (error: Error | undefined) => void): Subscriber; - subscribe(stream: Stream, targetElement: string | HTMLElement, properties: SubscriberProperties, completionHandler: (error: Error | undefined) => void): Subscriber; - /** - * Promisified version of [[Session.subscribe]] - */ - subscribeAsync(stream: Stream, targetElement: string | HTMLElement): Promise; - subscribeAsync(stream: Stream, targetElement: string | HTMLElement, properties: SubscriberProperties): Promise; - /** - * Unsubscribes from `subscriber`, automatically removing its associated HTML video elements. - * - * #### Events dispatched - * - * The [[Subscriber]] object will dispatch a `videoElementDestroyed` event for each video associated to it that was removed from DOM. - * Only videos [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)) will be automatically removed - * - * See [[VideoElementEvent]] to learn more - */ - unsubscribe(subscriber: Subscriber): void; - /** - * Publishes to the Session the Publisher object - * - * #### Events dispatched - * - * The local [[Publisher]] object will dispatch a `streamCreated` event upon successful termination of this method. See [[StreamEvent]] to learn more. - * - * The local [[Publisher]] object will dispatch a `streamPlaying` once the media stream starts playing. See [[StreamManagerEvent]] to learn more. - * - * The [[Session]] object of every other participant connected to the session will dispatch a `streamCreated` event so they can subscribe to it. See [[StreamEvent]] to learn more. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved only after the publisher was successfully published and rejected with an Error object if not - */ - publish(publisher: Publisher): Promise; - /** - * Unpublishes from the Session the Publisher object. - * - * #### Events dispatched - * - * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event. - * 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()` 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()` 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; - /** - * 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; - /** - * Sends one signal. `signal` object has the following optional properties: - * ```json - * {data:string, to:Connection[], type:string} - * ``` - * All users subscribed to that signal (`session.on('signal:type', ...)` or `session.on('signal', ...)` for all signals) and whose Connection objects are in `to` array will receive it. Their local - * Session objects will dispatch a `signal` or `signal:type` event. See [[SignalEvent]] to learn more. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the message successfully reached openvidu-server and rejected with an Error object if not. _This doesn't - * mean that openvidu-server could resend the message to all the listed receivers._ - */ - signal(signal: SignalOptions): Promise; - /** - * See [[EventDispatcher.on]] - */ - on(type: string, handler: (event: SessionDisconnectedEvent | SignalEvent | StreamEvent | ConnectionEvent | PublisherSpeakingEvent | RecordingEvent) => void): EventDispatcher; - /** - * See [[EventDispatcher.once]] - */ - once(type: string, handler: (event: SessionDisconnectedEvent | SignalEvent | StreamEvent | ConnectionEvent | PublisherSpeakingEvent | RecordingEvent) => void): Session; - /** - * See [[EventDispatcher.off]] - */ - off(type: string, handler?: (event: SessionDisconnectedEvent | SignalEvent | StreamEvent | ConnectionEvent | PublisherSpeakingEvent | RecordingEvent) => void): Session; - /** - * @hidden - */ - onParticipantJoined(response: ConnectionOptions): void; - /** - * @hidden - */ - onParticipantLeft(msg: any): void; - /** - * @hidden - */ - onParticipantPublished(response: ConnectionOptions): void; - /** - * @hidden - */ - onParticipantUnpublished(msg: any): void; - /** - * @hidden - */ - onParticipantEvicted(msg: any): void; - /** - * @hidden - */ - onNewMessage(msg: any): void; - /** - * @hidden - */ - onStreamPropertyChanged(msg: any): void; - /** - * @hidden - */ - recvIceCandidate(msg: any): void; - /** - * @hidden - */ - onSessionClosed(msg: any): void; - /** - * @hidden - */ - onLostConnection(): void; - /** - * @hidden - */ - onRecoveredConnection(): void; - /** - * @hidden - */ - onMediaError(params: any): void; - /** - * @hidden - */ - onRecordingStarted(response: any): void; - /** - * @hidden - */ - onRecordingStopped(response: any): void; - /** - * @hidden - * response = {connectionId: string, streamId: string, type: string, data: Object} - */ - onFilterEventDispatched(response: any): void; - /** - * @hidden - */ - emitEvent(type: string, eventArray: any[]): void; - /** - * @hidden - */ - leave(forced: boolean, reason: string): void; - private connectAux; - private stopPublisherStream; - private stringClientMetadata; - private getConnection; - private getRemoteConnection; - private processToken; -} diff --git a/openvidu-browser/lib/OpenVidu/Session.js b/openvidu-browser/lib/OpenVidu/Session.js deleted file mode 100644 index 47b9f0cc..00000000 --- a/openvidu-browser/lib/OpenVidu/Session.js +++ /dev/null @@ -1,1024 +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. - * - */ -exports.__esModule = true; -var Connection_1 = require("./Connection"); -var Filter_1 = require("./Filter"); -var Subscriber_1 = require("./Subscriber"); -var ConnectionEvent_1 = require("../OpenViduInternal/Events/ConnectionEvent"); -var FilterEvent_1 = require("../OpenViduInternal/Events/FilterEvent"); -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 EventEmitter = require("wolfy87-eventemitter"); -var platform = require("platform"); -/** - * Represents a video call. It can also be seen as a videoconference room where multiple users can connect. - * Participants who publish their videos to a session can be seen by the rest of users connected to that specific session. - * Initialized with [[OpenVidu.initSession]] method - */ -var Session = /** @class */ (function () { - /** - * @hidden - */ - function Session(openvidu) { - /** - * Collection of all StreamManagers of this Session ([[Publisher]] and [[Subscriber]]) - */ - this.streamManagers = []; - // This map is only used to avoid race condition between 'joinRoom' response and 'onParticipantPublished' notification - /** - * @hidden - */ - this.remoteStreamsCreated = {}; - /** - * @hidden - */ - this.isFirstIonicIosSubscriber = true; - /** - * @hidden - */ - this.countDownForIonicIosSubscribers = true; - /** - * @hidden - */ - this.remoteConnections = {}; - /** - * @hidden - */ - this.speakingEventsEnabled = false; - this.ee = new EventEmitter(); - this.openvidu = openvidu; - } - /** - * Connects to the session using `token`. Parameter `metadata` allows you to pass extra data to share with other users when - * they receive `streamCreated` event. The structure of `metadata` string is up to you (maybe some standardized format - * as JSON or XML is a good idea). - * - * This metadata is not considered secure, as it is generated in the client side. To pass secure data, add it as a parameter in the - * token generation operation (through the API REST, openvidu-java-client or openvidu-node-client). - * - * Only after the returned Promise is successfully resolved [[Session.connection]] object will be available and properly defined. - * - * #### Events dispatched - * - * The [[Session]] object of the local participant will first dispatch one or more `connectionCreated` events upon successful termination of this method: - * - First one for your own local Connection object, so you can retrieve [[Session.connection]] property. - * - Then one for each remote Connection previously connected to the Session, if any. Any other remote user connecting to the Session after you have - * successfully connected will also dispatch a `connectionCreated` event when they do so. - * - * The [[Session]] object of the local participant will also dispatch a `streamCreated` event for each remote active [[Publisher]] that was already streaming - * when connecting, just after dispatching all remote `connectionCreated` events. - * - * The [[Session]] object of every other participant connected to the session will dispatch a `connectionCreated` event. - * - * See [[ConnectionEvent]] and [[StreamEvent]] to learn more. - * - * @returns A Promise to which you must subscribe that is resolved if the the connection to the Session was successful and rejected with an Error object if not - * - */ - Session.prototype.connect = function (token, metadata) { - var _this = this; - return new Promise(function (resolve, reject) { - _this.processToken(token); - if (_this.openvidu.checkSystemRequirements()) { - // Early configuration to deactivate automatic subscription to streams - _this.options = { - sessionId: _this.sessionId, - participantId: token, - metadata: !!metadata ? _this.stringClientMetadata(metadata) : '' - }; - _this.connectAux(token).then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - } - else { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' for ' + platform.os.family + ' is not supported in OpenVidu')); - } - }); - }; - /** - * Leaves the session, destroying all streams and deleting the user as a participant. - * - * #### Events dispatched - * - * The [[Session]] object of the local participant will dispatch a `sessionDisconnected` event. - * 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()` 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()` 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()` 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. - */ - Session.prototype.disconnect = function () { - this.leave(false, 'disconnect'); - }; - /** - * Subscribes to a `stream`, adding a new HTML video element to DOM with `subscriberProperties` settings. This method is usually called in the callback of `streamCreated` event. - * - * #### Events dispatched - * - * The [[Subscriber]] object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM (only if you - * [let OpenVidu take care of the video players](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more. - * - * The [[Subscriber]] object will dispatch a `streamPlaying` event once the remote stream starts playing. See [[StreamManagerEvent]] to learn more. - * - * @param stream Stream object to subscribe to - * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Subscriber will be inserted (see [[SubscriberProperties.insertMode]]). If *null* or *undefined* no default video will be created for this Subscriber. - * You can always call method [[Subscriber.addVideoElement]] or [[Subscriber.createVideoElement]] to manage the video elements on your own (see [Manage video players](/docs/how-do-i/manage-videos) section) - * @param completionHandler `error` parameter is null if `subscribe` succeeds, and is defined if it fails. - */ - Session.prototype.subscribe = function (stream, targetElement, param3, param4) { - var properties = {}; - if (!!param3 && typeof param3 !== 'function') { - properties = { - insertMode: (typeof param3.insertMode !== 'undefined') ? ((typeof param3.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[param3.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND, - subscribeToAudio: (typeof param3.subscribeToAudio !== 'undefined') ? param3.subscribeToAudio : true, - subscribeToVideo: (typeof param3.subscribeToVideo !== 'undefined') ? param3.subscribeToVideo : true - }; - } - else { - properties = { - insertMode: VideoInsertMode_1.VideoInsertMode.APPEND, - subscribeToAudio: true, - subscribeToVideo: true - }; - } - var completionHandler; - if (!!param3 && (typeof param3 === 'function')) { - completionHandler = param3; - } - else if (!!param4) { - completionHandler = param4; - } - console.info('Subscribing to ' + stream.connection.connectionId); - stream.subscribe() - .then(function () { - console.info('Subscribed correctly to ' + stream.connection.connectionId); - if (completionHandler !== undefined) { - completionHandler(undefined); - } - })["catch"](function (error) { - if (completionHandler !== undefined) { - completionHandler(error); - } - }); - var subscriber = new Subscriber_1.Subscriber(stream, targetElement, properties); - if (!!subscriber.targetElement) { - stream.streamManager.createVideoElement(subscriber.targetElement, properties.insertMode); - } - return subscriber; - }; - Session.prototype.subscribeAsync = function (stream, targetElement, properties) { - var _this = this; - return new Promise(function (resolve, reject) { - var subscriber; - var callback = function (error) { - if (!!error) { - reject(error); - } - else { - resolve(subscriber); - } - }; - if (!!properties) { - subscriber = _this.subscribe(stream, targetElement, properties, callback); - } - else { - subscriber = _this.subscribe(stream, targetElement, callback); - } - }); - }; - /** - * Unsubscribes from `subscriber`, automatically removing its associated HTML video elements. - * - * #### Events dispatched - * - * The [[Subscriber]] object will dispatch a `videoElementDestroyed` event for each video associated to it that was removed from DOM. - * Only videos [created by OpenVidu Browser](/docs/how-do-i/manage-videos/#let-openvidu-take-care-of-the-video-players)) will be automatically removed - * - * See [[VideoElementEvent]] to learn more - */ - Session.prototype.unsubscribe = function (subscriber) { - var connectionId = subscriber.stream.connection.connectionId; - console.info('Unsubscribing from ' + connectionId); - this.openvidu.sendRequest('unsubscribeFromVideo', { sender: subscriber.stream.connection.connectionId }, function (error, response) { - if (error) { - console.error('Error unsubscribing from ' + connectionId, error); - } - else { - console.info('Unsubscribed correctly from ' + connectionId); - } - subscriber.stream.disposeWebRtcPeer(); - subscriber.stream.disposeMediaStream(); - }); - subscriber.stream.streamManager.removeAllVideos(); - }; - /** - * Publishes to the Session the Publisher object - * - * #### Events dispatched - * - * The local [[Publisher]] object will dispatch a `streamCreated` event upon successful termination of this method. See [[StreamEvent]] to learn more. - * - * The local [[Publisher]] object will dispatch a `streamPlaying` once the media stream starts playing. See [[StreamManagerEvent]] to learn more. - * - * The [[Session]] object of every other participant connected to the session will dispatch a `streamCreated` event so they can subscribe to it. See [[StreamEvent]] to learn more. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved only after the publisher was successfully published and rejected with an Error object if not - */ - Session.prototype.publish = function (publisher) { - var _this = this; - return new Promise(function (resolve, reject) { - publisher.session = _this; - publisher.stream.session = _this; - if (!publisher.stream.publishedOnce) { - // 'Session.unpublish(Publisher)' has NOT been called - _this.connection.addStream(publisher.stream); - publisher.stream.publish() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - } - else { - // 'Session.unpublish(Publisher)' has been called. Must initialize again Publisher - publisher.initialize() - .then(function () { - _this.connection.addStream(publisher.stream); - publisher.reestablishStreamPlayingEvent(); - publisher.stream.publish() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - })["catch"](function (error) { - reject(error); - }); - } - }); - }; - /** - * Unpublishes from the Session the Publisher object. - * - * #### Events dispatched - * - * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event. - * 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()` 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()` 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. - */ - Session.prototype.unpublish = function (publisher) { - var stream = publisher.stream; - if (!stream.connection) { - console.error('The associated Connection object of this Publisher is null', stream); - return; - } - else if (stream.connection !== this.connection) { - console.error('The associated Connection object of this Publisher is not your local Connection.' + - "Only moderators can force unpublish on remote Streams via 'forceUnpublish' method", stream); - return; - } - else { - console.info('Unpublishing local media (' + stream.connection.connectionId + ')'); - this.openvidu.sendRequest('unpublishVideo', function (error, response) { - if (error) { - console.error(error); - } - else { - console.info('Media unpublished correctly'); - } - }); - stream.disposeWebRtcPeer(); - delete stream.connection.stream; - var streamEvent = new StreamEvent_1.StreamEvent(true, publisher, 'streamDestroyed', publisher.stream, 'unpublish'); - publisher.emitEvent('streamDestroyed', [streamEvent]); - 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 - * {data:string, to:Connection[], type:string} - * ``` - * All users subscribed to that signal (`session.on('signal:type', ...)` or `session.on('signal', ...)` for all signals) and whose Connection objects are in `to` array will receive it. Their local - * Session objects will dispatch a `signal` or `signal:type` event. See [[SignalEvent]] to learn more. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the message successfully reached openvidu-server and rejected with an Error object if not. _This doesn't - * mean that openvidu-server could resend the message to all the listed receivers._ - */ - /* tslint:disable:no-string-literal */ - Session.prototype.signal = function (signal) { - var _this = this; - return new Promise(function (resolve, reject) { - var signalMessage = {}; - if (signal.to && signal.to.length > 0) { - var connectionIds_1 = []; - signal.to.forEach(function (connection) { - connectionIds_1.push(connection.connectionId); - }); - signalMessage['to'] = connectionIds_1; - } - else { - signalMessage['to'] = []; - } - signalMessage['data'] = signal.data ? signal.data : ''; - signalMessage['type'] = signal.type ? signal.type : ''; - _this.openvidu.sendRequest('sendMessage', { - message: JSON.stringify(signalMessage) - }, function (error, response) { - if (!!error) { - reject(error); - } - else { - resolve(); - } - }); - }); - }; - /* tslint:enable:no-string-literal */ - /** - * See [[EventDispatcher.on]] - */ - Session.prototype.on = function (type, handler) { - this.ee.on(type, function (event) { - if (event) { - console.info("Event '" + type + "' triggered by 'Session'", event); - } - else { - console.info("Event '" + type + "' triggered by 'Session'"); - } - handler(event); - }); - if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') { - this.speakingEventsEnabled = true; - // If there are already available remote streams, enable hark 'speaking' event in all of them - for (var connectionId in this.remoteConnections) { - var str = this.remoteConnections[connectionId].stream; - if (!!str && str.hasAudio) { - str.enableSpeakingEvents(); - } - } - } - return this; - }; - /** - * See [[EventDispatcher.once]] - */ - Session.prototype.once = function (type, handler) { - this.ee.once(type, function (event) { - if (event) { - console.info("Event '" + type + "' triggered by 'Session'", event); - } - else { - console.info("Event '" + type + "' triggered by 'Session'"); - } - handler(event); - }); - if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') { - this.speakingEventsEnabled = true; - // If there are already available remote streams, enable hark in all of them - for (var connectionId in this.remoteConnections) { - var str = this.remoteConnections[connectionId].stream; - if (!!str && str.hasAudio) { - str.enableOnceSpeakingEvents(); - } - } - } - return this; - }; - /** - * See [[EventDispatcher.off]] - */ - Session.prototype.off = function (type, handler) { - if (!handler) { - this.ee.removeAllListeners(type); - } - else { - this.ee.off(type, handler); - } - if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') { - this.speakingEventsEnabled = false; - // If there are already available remote streams, disable hark in all of them - for (var connectionId in this.remoteConnections) { - var str = this.remoteConnections[connectionId].stream; - if (!!str) { - str.disableSpeakingEvents(); - } - } - } - return this; - }; - /* Hidden methods */ - /** - * @hidden - */ - Session.prototype.onParticipantJoined = function (response) { - var _this = this; - // Connection shouldn't exist - this.getConnection(response.id, '') - .then(function (connection) { - console.warn('Connection ' + response.id + ' already exists in connections list'); - })["catch"](function (openViduError) { - var connection = new Connection_1.Connection(_this, response); - _this.remoteConnections[response.id] = connection; - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); - }); - }; - /** - * @hidden - */ - Session.prototype.onParticipantLeft = function (msg) { - var _this = this; - 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.callDefaultBehavior(); - delete _this.remoteStreamsCreated[stream.streamId]; - if (Object.keys(_this.remoteStreamsCreated).length === 0) { - _this.isFirstIonicIosSubscriber = true; - _this.countDownForIonicIosSubscribers = true; - } - } - delete _this.remoteConnections[connection.connectionId]; - _this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionDestroyed', connection, msg.reason)]); - })["catch"](function (openViduError) { - console.error(openViduError); - }); - }; - /** - * @hidden - */ - Session.prototype.onParticipantPublished = function (response) { - var _this = this; - var afterConnectionFound = function (connection) { - _this.remoteConnections[connection.connectionId] = connection; - if (!_this.remoteStreamsCreated[connection.stream.streamId]) { - // Avoid race condition between stream.subscribe() in "onParticipantPublished" and in "joinRoom" rpc callback - // This condition is false if openvidu-server sends "participantPublished" event to a subscriber participant that has - // already subscribed to certain stream in the callback of "joinRoom" method - _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', connection.stream, '')]); - } - _this.remoteStreamsCreated[connection.stream.streamId] = true; - }; - // Get the existing Connection created on 'onParticipantJoined' for - // existing participants or create a new one for new participants - var connection; - this.getRemoteConnection(response.id, "Remote connection '" + response.id + "' unknown when 'onParticipantPublished'. " + - 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections))) - .then(function (con) { - // Update existing Connection - connection = con; - response.metadata = con.data; - connection.options = response; - connection.initRemoteStreams(response.streams); - afterConnectionFound(connection); - })["catch"](function (openViduError) { - // Create new Connection - connection = new Connection_1.Connection(_this, response); - afterConnectionFound(connection); - }); - }; - /** - * @hidden - */ - Session.prototype.onParticipantUnpublished = function (msg) { - var _this = this; - 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]; - if (Object.keys(_this.remoteStreamsCreated).length === 0) { - _this.isFirstIonicIosSubscriber = true; - _this.countDownForIonicIosSubscribers = true; - } - connection.removeStream(streamId); - })["catch"](function (openViduError) { - console.error(openViduError); - }); - } - }; - /** - * @hidden - */ - Session.prototype.onParticipantEvicted = function (msg) { - 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 - */ - Session.prototype.onNewMessage = function (msg) { - var _this = this; - console.info('New signal: ' + JSON.stringify(msg)); - this.getConnection(msg.from, "Connection '" + msg.from + "' unknow when 'onNewMessage'. Existing remote connections: " - + JSON.stringify(Object.keys(this.remoteConnections)) + '. Existing local connection: ' + this.connection.connectionId) - .then(function (connection) { - _this.ee.emitEvent('signal', [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]); - _this.ee.emitEvent('signal:' + msg.type, [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]); - })["catch"](function (openViduError) { - console.error(openViduError); - }); - }; - /** - * @hidden - */ - Session.prototype.onStreamPropertyChanged = function (msg) { - var _this = this; - var callback = 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; - case 'filter': - oldValue = stream.filter; - msg.newValue = (Object.keys(msg.newValue).length > 0) ? msg.newValue : undefined; - if (msg.newValue !== undefined) { - stream.filter = new Filter_1.Filter(msg.newValue.type, msg.newValue.options); - stream.filter.stream = stream; - if (msg.newValue.lastExecMethod) { - stream.filter.lastExecMethod = msg.newValue.lastExecMethod; - } - } - else { - delete stream.filter; - } - msg.newValue = stream.filter; - 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"); - } - }; - if (msg.connectionId === this.connection.connectionId) { - // Your stream has been forcedly changed (filter feature) - callback(this.connection); - } - else { - this.getRemoteConnection(msg.connectionId, 'Remote connection ' + msg.connectionId + " unknown when 'onStreamPropertyChanged'. " + - 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections))) - .then(function (connection) { - callback(connection); - })["catch"](function (openViduError) { - console.error(openViduError); - }); - } - }; - /** - * @hidden - */ - Session.prototype.recvIceCandidate = function (msg) { - var candidate = { - candidate: msg.candidate, - component: msg.component, - foundation: msg.foundation, - ip: msg.ip, - port: msg.port, - priority: msg.priority, - protocol: msg.protocol, - relatedAddress: msg.relatedAddress, - relatedPort: msg.relatedPort, - sdpMid: msg.sdpMid, - sdpMLineIndex: msg.sdpMLineIndex, - tcpType: msg.tcpType, - usernameFragment: msg.usernameFragment, - type: msg.type, - toJSON: function () { - return { candidate: msg.candidate }; - } - }; - this.getConnection(msg.endpointName, 'Connection not found for endpoint ' + msg.endpointName + '. Ice candidate will be ignored: ' + candidate) - .then(function (connection) { - var stream = connection.stream; - stream.getWebRtcPeer().addIceCandidate(candidate)["catch"](function (error) { - console.error('Error adding candidate for ' + stream.streamId - + ' stream of endpoint ' + msg.endpointName + ': ' + error); - }); - })["catch"](function (openViduError) { - console.error(openViduError); - }); - }; - /** - * @hidden - */ - Session.prototype.onSessionClosed = function (msg) { - console.info('Session closed: ' + JSON.stringify(msg)); - var s = msg.sessionId; - if (s !== undefined) { - this.ee.emitEvent('session-closed', [{ - session: s - }]); - } - else { - console.warn('Session undefined on session closed', msg); - } - }; - /** - * @hidden - */ - Session.prototype.onLostConnection = function () { - /*if (!this.connection) { - - console.warn('Not connected to session: if you are not debugging, this is probably a certificate error'); - - const url = 'https://' + this.openvidu.getWsUri().split('wss://')[1].split('/openvidu')[0]; - if (window.confirm('If you are not debugging, this is probably a certificate error at \"' + url + '\"\n\nClick OK to navigate and accept it')) { - location.assign(url + '/accept-certificate'); - } - return; - }*/ - console.warn('Lost connection in Session ' + this.sessionId); - if (!!this.sessionId && !this.connection.disposed) { - this.leave(true, 'networkDisconnect'); - } - }; - /** - * @hidden - */ - Session.prototype.onRecoveredConnection = function () { - console.warn('Recovered connection in Session ' + this.sessionId); - this.ee.emitEvent('connectionRecovered', []); - }; - /** - * @hidden - */ - Session.prototype.onMediaError = function (params) { - console.error('Media error: ' + JSON.stringify(params)); - var err = params.error; - if (err) { - this.ee.emitEvent('error-media', [{ - error: err - }]); - } - else { - console.warn('Received undefined media error. Params:', params); - } - }; - /** - * @hidden - */ - Session.prototype.onRecordingStarted = function (response) { - this.ee.emitEvent('recordingStarted', [new RecordingEvent_1.RecordingEvent(this, 'recordingStarted', response.id, response.name)]); - }; - /** - * @hidden - */ - Session.prototype.onRecordingStopped = function (response) { - this.ee.emitEvent('recordingStopped', [new RecordingEvent_1.RecordingEvent(this, 'recordingStopped', response.id, response.name)]); - }; - /** - * @hidden - * response = {connectionId: string, streamId: string, type: string, data: Object} - */ - Session.prototype.onFilterEventDispatched = function (response) { - var connectionId = response.connectionId; - var streamId = response.streamId; - this.getConnection(connectionId, 'No connection found for connectionId ' + connectionId) - .then(function (connection) { - console.info('Filter event dispatched'); - var stream = connection.stream; - stream.filter.handlers[response.eventType](new FilterEvent_1.FilterEvent(stream.filter, response.eventType, response.data)); - }); - }; - /** - * @hidden - */ - Session.prototype.emitEvent = function (type, eventArray) { - this.ee.emitEvent(type, eventArray); - }; - /** - * @hidden - */ - Session.prototype.leave = function (forced, reason) { - var _this = this; - forced = !!forced; - console.info('Leaving Session (forced=' + forced + ')'); - if (!!this.connection) { - if (!this.connection.disposed && !forced) { - this.openvidu.sendRequest('leaveRoom', function (error, response) { - if (error) { - console.error(error); - } - _this.openvidu.closeWs(); - }); - } - else { - this.openvidu.closeWs(); - } - 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.callDefaultBehavior(); - } - } - else { - console.warn('You were not connected to the session ' + this.sessionId); - } - }; - /* Private methods */ - Session.prototype.connectAux = function (token) { - var _this = this; - return new Promise(function (resolve, reject) { - _this.openvidu.startWs(function (error) { - if (!!error) { - reject(error); - } - else { - var joinParams = { - token: (!!token) ? token : '', - session: _this.sessionId, - platform: platform.description, - metadata: !!_this.options.metadata ? _this.options.metadata : '', - secret: _this.openvidu.getSecret(), - recorder: _this.openvidu.getRecorder() - }; - _this.openvidu.sendRequest('joinRoom', joinParams, function (error, response) { - if (!!error) { - 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; - _this.connection.data = response.metadata; - // Initialize remote Connections with value returned by openvidu-server - var events_1 = { - connections: new Array(), - streams: new Array() - }; - var existingParticipants = response.value; - existingParticipants.forEach(function (participant) { - var connection = new Connection_1.Connection(_this, participant); - _this.remoteConnections[connection.connectionId] = connection; - events_1.connections.push(connection); - if (!!connection.stream) { - _this.remoteStreamsCreated[connection.stream.streamId] = true; - events_1.streams.push(connection.stream); - } - }); - // Own 'connectionCreated' event - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', _this.connection, '')]); - // One 'connectionCreated' event for each existing connection in the session - events_1.connections.forEach(function (connection) { - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); - }); - // One 'streamCreated' event for each active stream in the session - events_1.streams.forEach(function (stream) { - _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', stream, '')]); - }); - resolve(); - } - }); - } - }); - }); - }; - 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); - } - else { - return metadata; - } - }; - Session.prototype.getConnection = function (connectionId, errorMessage) { - var _this = this; - return new Promise(function (resolve, reject) { - var connection = _this.remoteConnections[connectionId]; - if (!!connection) { - // Resolve remote connection - resolve(connection); - } - else { - if (_this.connection.connectionId === connectionId) { - // Resolve local connection - resolve(_this.connection); - } - else { - // Connection not found. Reject with OpenViduError - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage)); - } - } - }); - }; - Session.prototype.getRemoteConnection = function (connectionId, errorMessage) { - var _this = this; - return new Promise(function (resolve, reject) { - var connection = _this.remoteConnections[connectionId]; - if (!!connection) { - // Resolve remote connection - resolve(connection); - } - else { - // Remote connection not found. Reject with OpenViduError - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage)); - } - }); - }; - Session.prototype.processToken = function (token) { - var url = new URL(token); - this.sessionId = url.searchParams.get('sessionId'); - var secret = url.searchParams.get('secret'); - var recorder = url.searchParams.get('recorder'); - var turnUsername = url.searchParams.get('turnUsername'); - var turnCredential = url.searchParams.get('turnCredential'); - var role = url.searchParams.get('role'); - if (!!secret) { - this.openvidu.secret = secret; - } - if (!!recorder) { - this.openvidu.recorder = true; - } - if (!!turnUsername && !!turnCredential) { - var stunUrl = 'stun:' + url.hostname + ':3478'; - var turnUrl1 = 'turn:' + url.hostname + ':3478'; - var turnUrl2 = turnUrl1 + '?transport=tcp'; - this.openvidu.iceServers = [ - { urls: [stunUrl] }, - { urls: [turnUrl1, turnUrl2], username: turnUsername, credential: turnCredential } - ]; - console.log('TURN temp credentials [' + turnUsername + ':' + turnCredential + ']'); - } - if (!!role) { - this.openvidu.role = role; - } - this.openvidu.wsUri = 'wss://' + url.host + '/openvidu'; - }; - return Session; -}()); -exports.Session = Session; -//# sourceMappingURL=Session.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Session.js.map b/openvidu-browser/lib/OpenVidu/Session.js.map deleted file mode 100644 index 090f68a1..00000000 --- a/openvidu-browser/lib/OpenVidu/Session.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Session.js","sourceRoot":"","sources":["../../src/OpenVidu/Session.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,2CAA0C;AAC1C,mCAAkC;AAKlC,2CAA0C;AAQ1C,8EAA6E;AAC7E,sEAAqE;AAErE,4EAA2E;AAC3E,gGAA+F;AAC/F,sEAAqE;AACrE,sEAAqE;AACrE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CAAC,CAAC,MAAM,EAAE;YACV,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;SACjC;QACD,IAAI,CAAC,CAAC,QAAQ,EAAE;YACZ,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;SACjC;QACD,IAAI,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,cAAc,EAAE;YACpC,IAAM,OAAO,GAAG,OAAO,GAAG,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC;YACjD,IAAM,QAAQ,GAAG,OAAO,GAAG,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC;YAClD,IAAM,QAAQ,GAAG,QAAQ,GAAG,gBAAgB,CAAC;YAC7C,IAAI,CAAC,QAAQ,CAAC,UAAU,GAAG;gBACvB,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE;gBACnB,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE;aACrF,CAAC;YACF,OAAO,CAAC,GAAG,CAAC,yBAAyB,GAAG,YAAY,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,CAAC,CAAC;SACtF;QACD,IAAI,CAAC,CAAC,IAAI,EAAE;YACR,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;SAC7B;QAED,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,QAAQ,GAAG,GAAG,CAAC,IAAI,GAAG,WAAW,CAAC;IAC5D,CAAC;IAEL,cAAC;AAAD,CAAC,AA/lCD,IA+lCC;AA/lCY,0BAAO"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Stream.d.ts b/openvidu-browser/lib/OpenVidu/Stream.d.ts deleted file mode 100644 index 3ada90e5..00000000 --- a/openvidu-browser/lib/OpenVidu/Stream.d.ts +++ /dev/null @@ -1,273 +0,0 @@ -import { Connection } from './Connection'; -import { Event } from '../OpenViduInternal/Events/Event'; -import { Filter } from './Filter'; -import { Session } from './Session'; -import { StreamManager } from './StreamManager'; -import { EventDispatcher } from '../OpenViduInternal/Interfaces/Public/EventDispatcher'; -import { InboundStreamOptions } from '../OpenViduInternal/Interfaces/Private/InboundStreamOptions'; -import { OutboundStreamOptions } from '../OpenViduInternal/Interfaces/Private/OutboundStreamOptions'; -import { WebRtcPeer } from '../OpenViduInternal/WebRtcPeer/WebRtcPeer'; -import EventEmitter = require('wolfy87-eventemitter'); -/** - * Represents each one of the media streams available in OpenVidu Server for certain session. - * Each [[Publisher]] and [[Subscriber]] has an attribute of type Stream, as they give access - * to one of them (sending and receiving it, respectively) - */ -export declare class Stream implements EventDispatcher { - /** - * The Connection object that is publishing the stream - */ - connection: Connection; - /** - * Frame rate of the video in frames per second. This property is only defined if the [[Publisher]] of - * the stream was initialized passing a _frameRate_ property on [[OpenVidu.initPublisher]] method - */ - frameRate?: number; - /** - * Whether the stream has a video track or not - */ - hasVideo: boolean; - /** - * 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. If the stream belongs to a... - * - Subscriber object: property `streamId` is always defined - * - Publisher object: property `streamId` is only defined after successful execution of [[Session.publish]] - */ - streamId: string; - /** - * `"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; - }; - /** - * **WARNING**: experimental option. This interface may change in the near future - * - * Filter applied to the Stream. You can apply filters by calling [[Stream.applyFilter]], execute methods of the applied filter with - * [[Filter.execMethod]] and remove it with [[Stream.removeFilter]]. Be aware that the client calling this methods must have the - * necessary permissions: the token owned by the client must have been initialized with the appropriated `allowedFilters` array. - */ - filter: Filter; - /** - * @hidden - */ - ee: EventEmitter; - private webRtcPeer; - private mediaStream; - private webRtcStats; - private isSubscribeToRemote; - /** - * @hidden - */ - isLocalStreamReadyToPublish: boolean; - /** - * @hidden - */ - isLocalStreamPublished: boolean; - /** - * @hidden - */ - publishedOnce: boolean; - /** - * @hidden - */ - session: Session; - /** - * @hidden - */ - inboundStreamOpts: InboundStreamOptions; - /** - * @hidden - */ - outboundStreamOpts: OutboundStreamOptions; - /** - * @hidden - */ - speechEvent: any; - /** - * @hidden - */ - publisherStartSpeakingEventEnabled: boolean; - /** - * @hidden - */ - publisherStopSpeakingEventEnabled: boolean; - /** - * @hidden - */ - volumeChangeEventEnabled: boolean; - /** - * @hidden - */ - constructor(session: Session, options: InboundStreamOptions | OutboundStreamOptions | {}); - /** - * See [[EventDispatcher.on]] - */ - on(type: string, handler: (event: Event) => void): EventDispatcher; - /** - * See [[EventDispatcher.once]] - */ - once(type: string, handler: (event: Event) => void): EventDispatcher; - /** - * See [[EventDispatcher.off]] - */ - off(type: string, handler?: (event: Event) => void): EventDispatcher; - /** - * Applies an audio/video filter to the stream. - * - * @param type Type of filter applied. See [[Filter.type]] - * @param options Parameters used to initialize the filter. See [[Filter.options]] - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved to the applied filter if success and rejected with an Error object if not - */ - applyFilter(type: string, options: Object): Promise; - /** - * Removes an audio/video filter previously applied. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the previously applied filter has been successfully removed and rejected with an Error object in other case - */ - removeFilter(): Promise; - /** - * @hidden - */ - getMediaStream(): MediaStream; - /** - * @hidden - */ - setMediaStream(mediaStream: MediaStream): void; - /** - * @hidden - */ - updateMediaStreamInVideos(): void; - /** - * @hidden - */ - getWebRtcPeer(): WebRtcPeer; - /** - * @hidden - */ - getRTCPeerConnection(): RTCPeerConnection; - /** - * @hidden - */ - subscribeToMyRemote(value: boolean): void; - /** - * @hidden - */ - setOutboundStreamOptions(outboundStreamOpts: OutboundStreamOptions): void; - /** - * @hidden - */ - subscribe(): Promise; - /** - * @hidden - */ - publish(): Promise; - /** - * @hidden - */ - disposeWebRtcPeer(): void; - /** - * @hidden - */ - disposeMediaStream(): void; - /** - * @hidden - */ - displayMyRemote(): boolean; - /** - * @hidden - */ - isSendAudio(): boolean; - /** - * @hidden - */ - isSendVideo(): boolean; - /** - * @hidden - */ - isSendScreen(): boolean; - /** - * @hidden - */ - setSpeechEventIfNotExists(): void; - /** - * @hidden - */ - enableSpeakingEvents(): void; - /** - * @hidden - */ - enableOnceSpeakingEvents(): void; - /** - * @hidden - */ - disableSpeakingEvents(): void; - /** - * @hidden - */ - enableVolumeChangeEvent(): void; - /** - * @hidden - */ - enableOnceVolumeChangeEvent(): void; - /** - * @hidden - */ - disableVolumeChangeEvent(): void; - /** - * @hidden - */ - isLocal(): boolean; - /** - * @hidden - */ - getSelectedIceCandidate(): Promise; - /** - * @hidden - */ - getRemoteIceCandidateList(): RTCIceCandidate[]; - /** - * @hidden - */ - getLocalIceCandidateList(): RTCIceCandidate[]; - private initWebRtcPeerSend; - private initWebRtcPeerReceive; - private remotePeerSuccessfullyEstablished; - private initWebRtcStats; - private stopWebRtcStats; - private getIceServersConf; -} diff --git a/openvidu-browser/lib/OpenVidu/Stream.js b/openvidu-browser/lib/OpenVidu/Stream.js deleted file mode 100644 index cce04855..00000000 --- a/openvidu-browser/lib/OpenVidu/Stream.js +++ /dev/null @@ -1,700 +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. - * - */ -exports.__esModule = true; -var Filter_1 = require("./Filter"); -var WebRtcPeer_1 = require("../OpenViduInternal/WebRtcPeer/WebRtcPeer"); -var WebRtcStats_1 = require("../OpenViduInternal/WebRtcStats/WebRtcStats"); -var PublisherSpeakingEvent_1 = require("../OpenViduInternal/Events/PublisherSpeakingEvent"); -var StreamManagerEvent_1 = require("../OpenViduInternal/Events/StreamManagerEvent"); -var StreamPropertyChangedEvent_1 = require("../OpenViduInternal/Events/StreamPropertyChangedEvent"); -var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError"); -var EventEmitter = require("wolfy87-eventemitter"); -var hark = require("hark"); -var platform = require("platform"); -platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua.indexOf('Safari') === -1; -/** - * 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 - * to one of them (sending and receiving it, respectively) - */ -var Stream = /** @class */ (function () { - /** - * @hidden - */ - function Stream(session, options) { - var _this = this; - /** - * @hidden - */ - this.ee = new EventEmitter(); - this.isSubscribeToRemote = false; - /** - * @hidden - */ - this.isLocalStreamReadyToPublish = false; - /** - * @hidden - */ - this.isLocalStreamPublished = false; - /** - * @hidden - */ - this.publishedOnce = false; - /** - * @hidden - */ - this.publisherStartSpeakingEventEnabled = false; - /** - * @hidden - */ - this.publisherStopSpeakingEventEnabled = false; - /** - * @hidden - */ - this.volumeChangeEventEnabled = 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.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; - } - if (!!this.inboundStreamOpts.filter && (Object.keys(this.inboundStreamOpts.filter).length > 0)) { - if (!!this.inboundStreamOpts.filter.lastExecMethod && Object.keys(this.inboundStreamOpts.filter.lastExecMethod).length === 0) { - delete this.inboundStreamOpts.filter.lastExecMethod; - } - this.filter = this.inboundStreamOpts.filter; - } - } - else { - // OutboundStreamOptions: stream belongs to a Publisher - this.outboundStreamOpts = options; - 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'; - } - } - if (!!this.outboundStreamOpts.publisherProperties.filter) { - this.filter = this.outboundStreamOpts.publisherProperties.filter; - } - } - this.ee.on('mediastream-updated', function () { - _this.streamManager.updateMediaStream(_this.mediaStream); - console.debug('Video srcObject [' + _this.mediaStream + '] updated in stream [' + _this.streamId + ']'); - }); - } - /** - * See [[EventDispatcher.on]] - */ - Stream.prototype.on = function (type, handler) { - var _this = this; - this.ee.on(type, function (event) { - if (event) { - console.info("Event '" + type + "' triggered by stream '" + _this.streamId + "'", event); - } - else { - console.info("Event '" + type + "' triggered by stream '" + _this.streamId + "'"); - } - handler(event); - }); - return this; - }; - /** - * See [[EventDispatcher.once]] - */ - Stream.prototype.once = function (type, handler) { - var _this = this; - this.ee.once(type, function (event) { - if (event) { - console.info("Event '" + type + "' triggered once by stream '" + _this.streamId + "'", event); - } - else { - console.info("Event '" + type + "' triggered once by stream '" + _this.streamId + "'"); - } - handler(event); - }); - return this; - }; - /** - * See [[EventDispatcher.off]] - */ - Stream.prototype.off = function (type, handler) { - if (!handler) { - this.ee.removeAllListeners(type); - } - else { - this.ee.off(type, handler); - } - return this; - }; - /** - * Applies an audio/video filter to the stream. - * - * @param type Type of filter applied. See [[Filter.type]] - * @param options Parameters used to initialize the filter. See [[Filter.options]] - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved to the applied filter if success and rejected with an Error object if not - */ - Stream.prototype.applyFilter = function (type, options) { - var _this = this; - return new Promise(function (resolve, reject) { - console.info('Applying filter to stream ' + _this.streamId); - options = !!options ? options : {}; - if (typeof options !== 'string') { - options = JSON.stringify(options); - } - _this.session.openvidu.sendRequest('applyFilter', { streamId: _this.streamId, type: type, options: options }, function (error, response) { - if (error) { - console.error('Error applying filter for Stream ' + _this.streamId, error); - if (error.code === 401) { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED, "You don't have permissions to apply a filter")); - } - else { - reject(error); - } - } - else { - console.info('Filter successfully applied on Stream ' + _this.streamId); - var oldValue = _this.filter; - _this.filter = new Filter_1.Filter(type, options); - _this.filter.stream = _this; - _this.session.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.session, _this, 'filter', _this.filter, oldValue, 'applyFilter')]); - _this.streamManager.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.streamManager, _this, 'filter', _this.filter, oldValue, 'applyFilter')]); - resolve(_this.filter); - } - }); - }); - }; - /** - * Removes an audio/video filter previously applied. - * - * @returns A Promise (to which you can optionally subscribe to) that is resolved if the previously applied filter has been successfully removed and rejected with an Error object in other case - */ - Stream.prototype.removeFilter = function () { - var _this = this; - return new Promise(function (resolve, reject) { - console.info('Removing filter of stream ' + _this.streamId); - _this.session.openvidu.sendRequest('removeFilter', { streamId: _this.streamId }, function (error, response) { - if (error) { - console.error('Error removing filter for Stream ' + _this.streamId, error); - if (error.code === 401) { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED, "You don't have permissions to remove a filter")); - } - else { - reject(error); - } - } - else { - console.info('Filter successfully removed from Stream ' + _this.streamId); - var oldValue = _this.filter; - delete _this.filter; - _this.session.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.session, _this, 'filter', _this.filter, oldValue, 'applyFilter')]); - _this.streamManager.emitEvent('streamPropertyChanged', [new StreamPropertyChangedEvent_1.StreamPropertyChangedEvent(_this.streamManager, _this, 'filter', _this.filter, oldValue, 'applyFilter')]); - resolve(); - } - }); - }); - }; - /* Hidden methods */ - /** - * @hidden - */ - Stream.prototype.getMediaStream = function () { - return this.mediaStream; - }; - /** - * @hidden - */ - Stream.prototype.setMediaStream = function (mediaStream) { - this.mediaStream = mediaStream; - }; - /** - * @hidden - */ - Stream.prototype.updateMediaStreamInVideos = function () { - this.ee.emitEvent('mediastream-updated'); - }; - /** - * @hidden - */ - Stream.prototype.getWebRtcPeer = function () { - return this.webRtcPeer; - }; - /** - * @hidden - */ - Stream.prototype.getRTCPeerConnection = function () { - return this.webRtcPeer.pc; - }; - /** - * @hidden - */ - Stream.prototype.subscribeToMyRemote = function (value) { - this.isSubscribeToRemote = value; - }; - /** - * @hidden - */ - Stream.prototype.setOutboundStreamOptions = function (outboundStreamOpts) { - this.outboundStreamOpts = outboundStreamOpts; - }; - /** - * @hidden - */ - Stream.prototype.subscribe = function () { - var _this = this; - return new Promise(function (resolve, reject) { - _this.initWebRtcPeerReceive() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - }); - }; - /** - * @hidden - */ - Stream.prototype.publish = function () { - var _this = this; - return new Promise(function (resolve, reject) { - if (_this.isLocalStreamReadyToPublish) { - _this.initWebRtcPeerSend() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - } - else { - _this.ee.once('stream-ready-to-publish', function () { - _this.publish() - .then(function () { - resolve(); - })["catch"](function (error) { - reject(error); - }); - }); - } - }); - }; - /** - * @hidden - */ - Stream.prototype.disposeWebRtcPeer = function () { - if (this.webRtcPeer) { - var isSenderAndCustomTrack = !!this.outboundStreamOpts && - this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack; - this.webRtcPeer.dispose(isSenderAndCustomTrack); - } - if (this.speechEvent) { - this.speechEvent.stop(); - delete this.speechEvent; - } - this.stopWebRtcStats(); - console.info((!!this.outboundStreamOpts ? 'Outbound ' : 'Inbound ') + "WebRTCPeer from 'Stream' with id [" + this.streamId + '] is now closed'); - }; - /** - * @hidden - */ - Stream.prototype.disposeMediaStream = function () { - if (this.mediaStream) { - this.mediaStream.getAudioTracks().forEach(function (track) { - track.stop(); - }); - this.mediaStream.getVideoTracks().forEach(function (track) { - track.stop(); - }); - delete this.mediaStream; - } - console.info((!!this.outboundStreamOpts ? 'Local ' : 'Remote ') + "MediaStream from 'Stream' with id [" + this.streamId + '] is now disposed'); - }; - /** - * @hidden - */ - Stream.prototype.displayMyRemote = function () { - return this.isSubscribeToRemote; - }; - /** - * @hidden - */ - Stream.prototype.isSendAudio = function () { - return (!!this.outboundStreamOpts && - this.outboundStreamOpts.publisherProperties.audioSource !== null && - this.outboundStreamOpts.publisherProperties.audioSource !== false); - }; - /** - * @hidden - */ - Stream.prototype.isSendVideo = function () { - return (!!this.outboundStreamOpts && - this.outboundStreamOpts.publisherProperties.videoSource !== null && - this.outboundStreamOpts.publisherProperties.videoSource !== false); - }; - /** - * @hidden - */ - Stream.prototype.isSendScreen = function () { - return (!!this.outboundStreamOpts && - this.outboundStreamOpts.publisherProperties.videoSource === 'screen'); - }; - /** - * @hidden - */ - Stream.prototype.setSpeechEventIfNotExists = function () { - if (!this.speechEvent) { - var harkOptions = this.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions || {}; - harkOptions.interval = (typeof harkOptions.interval === 'number') ? harkOptions.interval : 50; - harkOptions.threshold = (typeof harkOptions.threshold === 'number') ? harkOptions.threshold : -50; - this.speechEvent = hark(this.mediaStream, harkOptions); - } - }; - /** - * @hidden - */ - Stream.prototype.enableSpeakingEvents = function () { - var _this = this; - this.setSpeechEventIfNotExists(); - if (!this.publisherStartSpeakingEventEnabled) { - this.publisherStartSpeakingEventEnabled = true; - this.speechEvent.on('speaking', function () { - _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]); - }); - } - if (!this.publisherStopSpeakingEventEnabled) { - this.publisherStopSpeakingEventEnabled = true; - this.speechEvent.on('stopped_speaking', function () { - _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]); - }); - } - }; - /** - * @hidden - */ - Stream.prototype.enableOnceSpeakingEvents = function () { - var _this = this; - this.setSpeechEventIfNotExists(); - if (!this.publisherStartSpeakingEventEnabled) { - this.publisherStartSpeakingEventEnabled = true; - this.speechEvent.once('speaking', function () { - _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]); - _this.disableSpeakingEvents(); - }); - } - if (!this.publisherStopSpeakingEventEnabled) { - this.publisherStopSpeakingEventEnabled = true; - this.speechEvent.once('stopped_speaking', function () { - _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]); - _this.disableSpeakingEvents(); - }); - } - }; - /** - * @hidden - */ - Stream.prototype.disableSpeakingEvents = function () { - if (!!this.speechEvent) { - if (this.volumeChangeEventEnabled) { - // 'streamAudioVolumeChange' event is enabled. Cannot stop the hark process - this.speechEvent.off('speaking'); - this.speechEvent.off('stopped_speaking'); - } - else { - this.speechEvent.stop(); - delete this.speechEvent; - } - } - this.publisherStartSpeakingEventEnabled = false; - this.publisherStopSpeakingEventEnabled = false; - }; - /** - * @hidden - */ - Stream.prototype.enableVolumeChangeEvent = function () { - var _this = this; - this.setSpeechEventIfNotExists(); - if (!this.volumeChangeEventEnabled) { - this.volumeChangeEventEnabled = true; - this.speechEvent.on('volume_change', function (harkEvent) { - var oldValue = _this.speechEvent.oldVolumeValue; - var value = { newValue: harkEvent, oldValue: oldValue }; - _this.speechEvent.oldVolumeValue = harkEvent; - _this.streamManager.emitEvent('streamAudioVolumeChange', [new StreamManagerEvent_1.StreamManagerEvent(_this.streamManager, 'streamAudioVolumeChange', value)]); - }); - } - }; - /** - * @hidden - */ - Stream.prototype.enableOnceVolumeChangeEvent = function () { - var _this = this; - this.setSpeechEventIfNotExists(); - if (!this.volumeChangeEventEnabled) { - this.volumeChangeEventEnabled = true; - this.speechEvent.once('volume_change', function (harkEvent) { - var oldValue = _this.speechEvent.oldVolumeValue; - var value = { newValue: harkEvent, oldValue: oldValue }; - _this.speechEvent.oldVolumeValue = harkEvent; - _this.disableVolumeChangeEvent(); - _this.streamManager.emitEvent('streamAudioVolumeChange', [new StreamManagerEvent_1.StreamManagerEvent(_this.streamManager, 'streamAudioVolumeChange', value)]); - }); - } - }; - /** - * @hidden - */ - Stream.prototype.disableVolumeChangeEvent = function () { - if (!!this.speechEvent) { - if (this.session.speakingEventsEnabled) { - // 'publisherStartSpeaking' and/or publisherStopSpeaking` events are enabled. Cannot stop the hark process - this.speechEvent.off('volume_change'); - } - else { - this.speechEvent.stop(); - delete this.speechEvent; - } - } - this.volumeChangeEventEnabled = false; - }; - /** - * @hidden - */ - Stream.prototype.isLocal = function () { - // inbound options undefined and outbound options defined - return (!this.inboundStreamOpts && !!this.outboundStreamOpts); - }; - /** - * @hidden - */ - Stream.prototype.getSelectedIceCandidate = function () { - var _this = this; - return new Promise(function (resolve, reject) { - _this.webRtcStats.getSelectedIceCandidateInfo() - .then(function (report) { return resolve(report); })["catch"](function (error) { return reject(error); }); - }); - }; - /** - * @hidden - */ - Stream.prototype.getRemoteIceCandidateList = function () { - return this.webRtcPeer.remoteCandidatesQueue; - }; - /** - * @hidden - */ - Stream.prototype.getLocalIceCandidateList = function () { - return this.webRtcPeer.localCandidatesQueue; - }; - /* Private methods */ - Stream.prototype.initWebRtcPeerSend = function () { - var _this = this; - return new Promise(function (resolve, reject) { - var userMediaConstraints = { - audio: _this.isSendAudio(), - video: _this.isSendVideo() - }; - var options = { - mediaStream: _this.mediaStream, - mediaConstraints: userMediaConstraints, - onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection), - iceServers: _this.getIceServersConf(), - simulcast: false - }; - 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, - 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), - filter: _this.outboundStreamOpts.publisherProperties.filter - }, function (error, response) { - if (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, false) - .then(function () { - _this.streamId = response.id; - _this.isLocalStreamPublished = true; - _this.publishedOnce = true; - if (_this.displayMyRemote()) { - _this.remotePeerSuccessfullyEstablished(); - } - _this.ee.emitEvent('stream-created-by-publisher'); - _this.initWebRtcStats(); - resolve(); - })["catch"](function (error) { - reject(error); - }); - console.info("'Publisher' successfully published to session"); - } - }); - }; - if (_this.displayMyRemote()) { - _this.webRtcPeer = new WebRtcPeer_1.WebRtcPeerSendrecv(options); - } - else { - _this.webRtcPeer = new WebRtcPeer_1.WebRtcPeerSendonly(options); - } - _this.webRtcPeer.generateOffer().then(function (offer) { - successCallback(offer); - })["catch"](function (error) { - reject(new Error('(publish) SDP offer error: ' + JSON.stringify(error))); - }); - }); - }; - Stream.prototype.initWebRtcPeerReceive = function () { - var _this = this; - return new Promise(function (resolve, reject) { - var offerConstraints = { - audio: _this.inboundStreamOpts.hasAudio, - video: _this.inboundStreamOpts.hasVideo - }; - console.debug("'Session.subscribe(Stream)' called. Constraints of generate SDP offer", offerConstraints); - var options = { - onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection), - mediaConstraints: offerConstraints, - iceServers: _this.getIceServersConf(), - simulcast: false - }; - var successCallback = function (sdpOfferParam) { - console.debug('Sending SDP offer to subscribe to ' - + _this.streamId, sdpOfferParam); - _this.session.openvidu.sendRequest('receiveVideoFrom', { - sender: _this.streamId, - sdpOffer: sdpOfferParam - }, function (error, response) { - if (error) { - reject(new Error('Error on recvVideoFrom: ' + JSON.stringify(error))); - } - else { - // Ios Ionic. Limitation: some bug in iosrtc cordova plugin makes - // it necessary to add a timeout before processAnswer method - if (_this.session.isFirstIonicIosSubscriber) { - _this.session.isFirstIonicIosSubscriber = false; - _this.session['iosInterval'] = setTimeout(function () { - _this.session.countDownForIonicIosSubscribers = false; - }, 400); - } - var needsTimeoutOnProcessAswer = _this.session.countDownForIonicIosSubscribers; - _this.webRtcPeer.processAnswer(response.sdpAnswer, needsTimeoutOnProcessAswer).then(function () { - _this.remotePeerSuccessfullyEstablished(); - _this.initWebRtcStats(); - resolve(); - })["catch"](function (error) { - reject(error); - }); - } - }); - }; - _this.webRtcPeer = new WebRtcPeer_1.WebRtcPeerRecvonly(options); - _this.webRtcPeer.generateOffer() - .then(function (offer) { - successCallback(offer); - })["catch"](function (error) { - reject(new Error('(subscribe) SDP offer error: ' + JSON.stringify(error))); - }); - }); - }; - Stream.prototype.remotePeerSuccessfullyEstablished = function () { - if (platform['isIonicIos']) { - // iOS Ionic. LIMITATION: must use deprecated WebRTC API - var pc1 = this.webRtcPeer.pc; - this.mediaStream = pc1.getRemoteStreams()[0]; - } - else { - this.mediaStream = new MediaStream(); - var receiver = void 0; - for (var _i = 0, _a = this.webRtcPeer.pc.getReceivers(); _i < _a.length; _i++) { - receiver = _a[_i]; - if (!!receiver.track) { - this.mediaStream.addTrack(receiver.track); - } - } - } - console.debug('Peer remote stream', this.mediaStream); - if (!!this.mediaStream) { - this.ee.emitEvent('mediastream-updated'); - if (!this.displayMyRemote() && !!this.mediaStream.getAudioTracks()[0] && this.session.speakingEventsEnabled) { - this.enableSpeakingEvents(); - } - } - }; - Stream.prototype.initWebRtcStats = function () { - this.webRtcStats = new WebRtcStats_1.WebRtcStats(this); - this.webRtcStats.initWebRtcStats(); - }; - Stream.prototype.stopWebRtcStats = function () { - if (!!this.webRtcStats && this.webRtcStats.isEnabled()) { - this.webRtcStats.stopWebRtcStats(); - } - }; - Stream.prototype.getIceServersConf = function () { - var returnValue; - if (!!this.session.openvidu.advancedConfiguration.iceServers) { - returnValue = this.session.openvidu.advancedConfiguration.iceServers === 'freeice' ? - undefined : - this.session.openvidu.advancedConfiguration.iceServers; - } - else if (this.session.openvidu.iceServers) { - returnValue = this.session.openvidu.iceServers; - } - else { - returnValue = undefined; - } - return returnValue; - }; - return Stream; -}()); -exports.Stream = Stream; -//# sourceMappingURL=Stream.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Stream.js.map b/openvidu-browser/lib/OpenVidu/Stream.js.map deleted file mode 100644 index ff967cc6..00000000 --- a/openvidu-browser/lib/OpenVidu/Stream.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Stream.js","sourceRoot":"","sources":["../../src/OpenVidu/Stream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAIH,mCAAkC;AAMlC,wEAAmI;AACnI,2EAA0E;AAC1E,4FAA2F;AAC3F,oFAAmF;AACnF,oGAAmG;AACnG,yEAA2F;AAE3F,mDAAsD;AACtD,2BAA8B;AAC9B,mCAAsC;AACtC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,EAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAGlI;;;;GAIG;AACH;IAkII;;OAEG;IACH,gBAAY,OAAgB,EAAE,OAA0D;QAAxF,iBAqDC;QA7GD;;WAEG;QACH,OAAE,GAAG,IAAI,YAAY,EAAE,CAAC;QAMhB,wBAAmB,GAAG,KAAK,CAAC;QAEpC;;WAEG;QACH,gCAA2B,GAAG,KAAK,CAAC;QACpC;;WAEG;QACH,2BAAsB,GAAG,KAAK,CAAC;QAC/B;;WAEG;QACH,kBAAa,GAAG,KAAK,CAAC;QAiBtB;;WAEG;QACH,uCAAkC,GAAG,K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IAAI,yBAAW,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;IACvC,CAAC;IAEO,gCAAe,GAAvB;QACI,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE;YACpD,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;SACtC;IACL,CAAC;IAEO,kCAAiB,GAAzB;QACI,IAAI,WAAW,CAAC;QAChB,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,EAAE;YAC1D,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC;gBAChF,SAAS,CAAC,CAAC;gBACX,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,CAAC;SAC9D;aAAM,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE;YACzC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;SAClD;aAAM;YACH,WAAW,GAAG,SAAS,CAAC;SAC3B;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;IAEL,aAAC;AAAD,CAAC,AApyBD,IAoyBC;AApyBY,wBAAM"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/StreamManager.d.ts b/openvidu-browser/lib/OpenVidu/StreamManager.d.ts deleted file mode 100644 index 9bd3b842..00000000 --- a/openvidu-browser/lib/OpenVidu/StreamManager.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Stream } from './Stream'; -import { EventDispatcher } from '../OpenViduInternal/Interfaces/Public/EventDispatcher'; -import { StreamManagerVideo } from '../OpenViduInternal/Interfaces/Public/StreamManagerVideo'; -import { Event } from '../OpenViduInternal/Events/Event'; -import { VideoInsertMode } from '../OpenViduInternal/Enums/VideoInsertMode'; -import EventEmitter = require('wolfy87-eventemitter'); -/** - * Interface in charge of displaying the media streams in the HTML DOM. This wraps any [[Publisher]] and [[Subscriber]] object. - * You can insert as many video players fo the same Stream as you want by calling [[StreamManager.addVideoElement]] or - * [[StreamManager.createVideoElement]]. - * - * The use of StreamManager wrapper is particularly useful when you don't need to differentiate between Publisher or Subscriber streams or just - * want to directly manage your own video elements (even more than one video element per Stream). This scenario is pretty common in - * declarative, MVC frontend frameworks such as Angular, React or Vue.js - */ -export declare class StreamManager implements EventDispatcher { - /** - * The Stream represented in the DOM by the Publisher/Subscriber - */ - stream: Stream; - /** - * All the videos displaying the Stream of this Publisher/Subscriber - */ - videos: StreamManagerVideo[]; - /** - * Whether the Stream represented in the DOM is local or remote - * - `false` for [[Publisher]] - * - `true` for [[Subscriber]] - */ - remote: boolean; - /** - * The DOM HTMLElement assigned as target element when creating the video for the Publisher/Subscriber. This property is only defined if: - * - [[Publisher]] has been initialized by calling method [[OpenVidu.initPublisher]] with a valid `targetElement` parameter - * - [[Subscriber]] has been initialized by calling method [[Session.subscribe]] with a valid `targetElement` parameter - */ - targetElement: HTMLElement; - /** - * `id` attribute of the DOM video element displaying the Publisher/Subscriber's stream. This property is only defined if: - * - [[Publisher]] has been initialized by calling method [[OpenVidu.initPublisher]] with a valid `targetElement` parameter - * - [[Subscriber]] has been initialized by calling method [[Session.subscribe]] with a valid `targetElement` parameter - */ - id: string; - /** - * @hidden - */ - firstVideoElement: StreamManagerVideo; - /** - * @hidden - */ - lazyLaunchVideoElementCreatedEvent: boolean; - /** - * @hidden - */ - element: HTMLElement; - /** - * @hidden - */ - protected ee: EventEmitter; - /** - * @hidden - */ - protected canPlayListener: EventListenerOrEventListenerObject; - /** - * @hidden - */ - constructor(stream: Stream, targetElement?: HTMLElement | string); - /** - * See [[EventDispatcher.on]] - */ - on(type: string, handler: (event: Event) => void): EventDispatcher; - /** - * See [[EventDispatcher.once]] - */ - once(type: string, handler: (event: Event) => void): StreamManager; - /** - * See [[EventDispatcher.off]] - */ - off(type: string, handler?: (event: Event) => void): StreamManager; - /** - * Makes `video` element parameter display this [[stream]]. This is useful when you are - * [managing the video elements on your own](/docs/how-do-i/manage-videos/#you-take-care-of-the-video-players) - * - * Calling this method with a video already added to other Publisher/Subscriber will cause the video element to be - * disassociated from that previous Publisher/Subscriber and to be associated to this one. - * - * @returns 1 if the video wasn't associated to any other Publisher/Subscriber and has been successfully added to this one. - * 0 if the video was already added to this Publisher/Subscriber. -1 if the video was previously associated to any other - * Publisher/Subscriber and has been successfully disassociated from that one and properly added to this one. - */ - addVideoElement(video: HTMLVideoElement): number; - /** - * Creates a new video element displaying this [[stream]]. This allows you to have multiple video elements displaying the same media stream. - * - * #### Events dispatched - * - * The Publisher/Subscriber object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM. See [[VideoElementEvent]] - * - * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher/Subscriber will be inserted - * @param insertMode How the video element will be inserted accordingly to `targetElemet` - */ - createVideoElement(targetElement?: string | HTMLElement, insertMode?: VideoInsertMode): HTMLVideoElement; - /** - * @hidden - */ - initializeVideoProperties(video: HTMLVideoElement): void; - /** - * @hidden - */ - removeAllVideos(): void; - /** - * @hidden - */ - disassociateVideo(video: HTMLVideoElement): boolean; - /** - * @hidden - */ - addPlayEventToFirstVideo(): void; - /** - * @hidden - */ - updateMediaStream(mediaStream: MediaStream): void; - /** - * @hidden - */ - emitEvent(type: string, eventArray: any[]): void; - private pushNewStreamManagerVideo; - private mirrorVideo; - private removeMirrorVideo; -} diff --git a/openvidu-browser/lib/OpenVidu/StreamManager.js b/openvidu-browser/lib/OpenVidu/StreamManager.js deleted file mode 100644 index f3215fba..00000000 --- a/openvidu-browser/lib/OpenVidu/StreamManager.js +++ /dev/null @@ -1,398 +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. - * - */ -exports.__esModule = true; -var StreamManagerEvent_1 = require("../OpenViduInternal/Events/StreamManagerEvent"); -var VideoElementEvent_1 = require("../OpenViduInternal/Events/VideoElementEvent"); -var VideoInsertMode_1 = require("../OpenViduInternal/Enums/VideoInsertMode"); -var EventEmitter = require("wolfy87-eventemitter"); -var platform = require("platform"); -platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua.indexOf('Safari') === -1; -/** - * Interface in charge of displaying the media streams in the HTML DOM. This wraps any [[Publisher]] and [[Subscriber]] object. - * You can insert as many video players fo the same Stream as you want by calling [[StreamManager.addVideoElement]] or - * [[StreamManager.createVideoElement]]. - * - * The use of StreamManager wrapper is particularly useful when you don't need to differentiate between Publisher or Subscriber streams or just - * want to directly manage your own video elements (even more than one video element per Stream). This scenario is pretty common in - * declarative, MVC frontend frameworks such as Angular, React or Vue.js - */ -var StreamManager = /** @class */ (function () { - /** - * @hidden - */ - function StreamManager(stream, targetElement) { - var _this = this; - /** - * All the videos displaying the Stream of this Publisher/Subscriber - */ - this.videos = []; - /** - * @hidden - */ - this.lazyLaunchVideoElementCreatedEvent = false; - /** - * @hidden - */ - this.ee = new EventEmitter(); - this.stream = stream; - this.stream.streamManager = this; - this.remote = !this.stream.isLocal(); - if (!!targetElement) { - var targEl = void 0; - if (typeof targetElement === 'string') { - targEl = document.getElementById(targetElement); - } - else if (targetElement instanceof HTMLElement) { - targEl = targetElement; - } - if (!!targEl) { - this.firstVideoElement = { - targetElement: targEl, - video: document.createElement('video'), - id: '' - }; - if (platform.name === 'Safari') { - this.firstVideoElement.video.setAttribute('playsinline', 'true'); - } - this.targetElement = targEl; - this.element = targEl; - } - } - this.canPlayListener = function () { - if (_this.stream.isLocal()) { - if (!_this.stream.displayMyRemote()) { - console.info("Your local 'Stream' with id [" + _this.stream.streamId + '] video is now playing'); - _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(_this.videos[0].video, _this, 'videoPlaying')]); - } - else { - console.info("Your own remote 'Stream' with id [" + _this.stream.streamId + '] video is now playing'); - _this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(_this.videos[0].video, _this, 'remoteVideoPlaying')]); - } - } - else { - console.info("Remote 'Stream' with id [" + _this.stream.streamId + '] video is now playing'); - _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(_this.videos[0].video, _this, 'videoPlaying')]); - } - _this.ee.emitEvent('streamPlaying', [new StreamManagerEvent_1.StreamManagerEvent(_this, 'streamPlaying', undefined)]); - }; - } - /** - * 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 by '" + (_this.remote ? 'Subscriber' : 'Publisher') + "'", event); - } - else { - console.info("Event '" + type + "' triggered by '" + (_this.remote ? 'Subscriber' : 'Publisher') + "'"); - } - handler(event); - }); - if (type === 'videoElementCreated') { - if (!!this.stream && this.lazyLaunchVideoElementCreatedEvent) { - this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoElementCreated')]); - this.lazyLaunchVideoElementCreatedEvent = false; - } - } - if (type === 'streamPlaying' || type === 'videoPlaying') { - if (this.videos[0] && this.videos[0].video && - this.videos[0].video.currentTime > 0 && - this.videos[0].video.paused === false && - this.videos[0].video.ended === false && - this.videos[0].video.readyState === 4) { - this.ee.emitEvent('streamPlaying', [new StreamManagerEvent_1.StreamManagerEvent(this, 'streamPlaying', undefined)]); - this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoPlaying')]); - } - } - if (type === 'streamAudioVolumeChange' && this.stream.hasAudio) { - this.stream.enableVolumeChangeEvent(); - } - return this; - }; - /** - * See [[EventDispatcher.once]] - */ - StreamManager.prototype.once = function (type, handler) { - this.ee.once(type, function (event) { - if (event) { - console.info("Event '" + type + "' triggered once", event); - } - else { - console.info("Event '" + type + "' triggered once"); - } - handler(event); - }); - if (type === 'videoElementCreated') { - if (!!this.stream && this.lazyLaunchVideoElementCreatedEvent) { - this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoElementCreated')]); - } - } - if (type === 'streamPlaying' || type === 'videoPlaying') { - if (this.videos[0] && this.videos[0].video && - this.videos[0].video.currentTime > 0 && - this.videos[0].video.paused === false && - this.videos[0].video.ended === false && - this.videos[0].video.readyState === 4) { - this.ee.emitEvent('streamPlaying', [new StreamManagerEvent_1.StreamManagerEvent(this, 'streamPlaying', undefined)]); - this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.videos[0].video, this, 'videoPlaying')]); - } - } - if (type === 'streamAudioVolumeChange' && this.stream.hasAudio) { - this.stream.enableOnceVolumeChangeEvent(); - } - return this; - }; - /** - * See [[EventDispatcher.off]] - */ - StreamManager.prototype.off = function (type, handler) { - if (!handler) { - this.ee.removeAllListeners(type); - } - else { - this.ee.off(type, handler); - } - if (type === 'streamAudioVolumeChange') { - this.stream.disableVolumeChangeEvent(); - } - return this; - }; - /** - * Makes `video` element parameter display this [[stream]]. This is useful when you are - * [managing the video elements on your own](/docs/how-do-i/manage-videos/#you-take-care-of-the-video-players) - * - * Calling this method with a video already added to other Publisher/Subscriber will cause the video element to be - * disassociated from that previous Publisher/Subscriber and to be associated to this one. - * - * @returns 1 if the video wasn't associated to any other Publisher/Subscriber and has been successfully added to this one. - * 0 if the video was already added to this Publisher/Subscriber. -1 if the video was previously associated to any other - * Publisher/Subscriber and has been successfully disassociated from that one and properly added to this one. - */ - StreamManager.prototype.addVideoElement = function (video) { - this.initializeVideoProperties(video); - if (this.stream.isLocal() && this.stream.displayMyRemote()) { - video.srcObject = this.stream.getMediaStream(); - } - // If the video element is already part of this StreamManager do nothing - for (var _i = 0, _a = this.videos; _i < _a.length; _i++) { - var v = _a[_i]; - if (v.video === video) { - return 0; - } - } - var returnNumber = 1; - for (var _b = 0, _c = this.stream.session.streamManagers; _b < _c.length; _b++) { - var streamManager = _c[_b]; - if (streamManager.disassociateVideo(video)) { - returnNumber = -1; - break; - } - } - this.stream.session.streamManagers.forEach(function (streamManager) { - streamManager.disassociateVideo(video); - }); - this.pushNewStreamManagerVideo({ - video: video, - id: video.id - }); - console.info('New video element associated to ', this); - return returnNumber; - }; - /** - * Creates a new video element displaying this [[stream]]. This allows you to have multiple video elements displaying the same media stream. - * - * #### Events dispatched - * - * The Publisher/Subscriber object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM. See [[VideoElementEvent]] - * - * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher/Subscriber will be inserted - * @param insertMode How the video element will be inserted accordingly to `targetElemet` - */ - StreamManager.prototype.createVideoElement = function (targetElement, insertMode) { - var targEl; - if (typeof targetElement === 'string') { - targEl = document.getElementById(targEl); - if (!targEl) { - throw new Error("The provided 'targetElement' couldn't be resolved to any HTML element: " + targetElement); - } - } - else if (targetElement instanceof HTMLElement) { - targEl = targetElement; - } - else { - throw new Error("The provided 'targetElement' couldn't be resolved to any HTML element: " + targetElement); - } - var video = document.createElement('video'); - this.initializeVideoProperties(video); - var insMode = !!insertMode ? insertMode : VideoInsertMode_1.VideoInsertMode.APPEND; - switch (insMode) { - case VideoInsertMode_1.VideoInsertMode.AFTER: - targEl.parentNode.insertBefore(video, targEl.nextSibling); - break; - case VideoInsertMode_1.VideoInsertMode.APPEND: - targEl.appendChild(video); - break; - case VideoInsertMode_1.VideoInsertMode.BEFORE: - targEl.parentNode.insertBefore(video, targEl); - break; - case VideoInsertMode_1.VideoInsertMode.PREPEND: - targEl.insertBefore(video, targEl.childNodes[0]); - break; - case VideoInsertMode_1.VideoInsertMode.REPLACE: - targEl.parentNode.replaceChild(video, targEl); - break; - default: - insMode = VideoInsertMode_1.VideoInsertMode.APPEND; - targEl.appendChild(video); - break; - } - var v = { - targetElement: targEl, - video: video, - insertMode: insMode, - id: video.id - }; - this.pushNewStreamManagerVideo(v); - this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(v.video, this, 'videoElementCreated')]); - this.lazyLaunchVideoElementCreatedEvent = !!this.firstVideoElement; - return video; - }; - /** - * @hidden - */ - StreamManager.prototype.initializeVideoProperties = function (video) { - 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 (platform.name === 'Safari') { - video.setAttribute('playsinline', 'true'); - } - if (!video.id) { - video.id = (this.remote ? 'remote-' : 'local-') + 'video-' + this.stream.streamId; - // DEPRECATED property: assign once the property id if the user provided a valid targetElement - if (!this.id && !!this.targetElement) { - this.id = video.id; - } - } - if (!this.remote && !this.stream.displayMyRemote()) { - video.muted = true; - if (video.style.transform === 'rotateY(180deg)' && !this.stream.outboundStreamOpts.publisherProperties.mirror) { - // If the video was already rotated and now is set to not mirror - this.removeMirrorVideo(video); - } - else if (this.stream.outboundStreamOpts.publisherProperties.mirror) { - this.mirrorVideo(video); - } - } - }; - /** - * @hidden - */ - StreamManager.prototype.removeAllVideos = function () { - var _this = this; - for (var i = this.stream.session.streamManagers.length - 1; i >= 0; --i) { - if (this.stream.session.streamManagers[i] === this) { - this.stream.session.streamManagers.splice(i, 1); - } - } - this.videos.forEach(function (streamManagerVideo) { - // Remove oncanplay event listener (only OpenVidu browser one, not the user ones) - streamManagerVideo.video.removeEventListener('canplay', _this.canPlayListener); - if (!!streamManagerVideo.targetElement) { - // Only remove from DOM videos created by OpenVidu Browser (those generated by passing a valid targetElement in OpenVidu.initPublisher - // and Session.subscribe or those created by StreamManager.createVideoElement). All this videos triggered a videoElementCreated event - streamManagerVideo.video.parentNode.removeChild(streamManagerVideo.video); - _this.ee.emitEvent('videoElementDestroyed', [new VideoElementEvent_1.VideoElementEvent(streamManagerVideo.video, _this, 'videoElementDestroyed')]); - } - // Remove srcObject from the video - streamManagerVideo.video.srcObject = null; - // Remove from collection of videos every video managed by OpenVidu Browser - _this.videos.filter(function (v) { return !v.targetElement; }); - }); - }; - /** - * @hidden - */ - StreamManager.prototype.disassociateVideo = function (video) { - var disassociated = false; - for (var i = 0; i < this.videos.length; i++) { - if (this.videos[i].video === video) { - this.videos.splice(i, 1); - disassociated = true; - console.info('Video element disassociated from ', this); - break; - } - } - return disassociated; - }; - /** - * @hidden - */ - StreamManager.prototype.addPlayEventToFirstVideo = function () { - if ((!!this.videos[0]) && (!!this.videos[0].video) && (this.videos[0].video.oncanplay === null)) { - this.videos[0].video.addEventListener('canplay', this.canPlayListener); - } - }; - /** - * @hidden - */ - StreamManager.prototype.updateMediaStream = function (mediaStream) { - this.videos.forEach(function (streamManagerVideo) { - streamManagerVideo.video.srcObject = mediaStream; - if (platform['isIonicIos']) { - // iOS Ionic. LIMITATION: must reinsert the video in the DOM for - // the media stream to be updated - var vParent = streamManagerVideo.video.parentElement; - var newVideo = streamManagerVideo.video; - vParent.replaceChild(newVideo, streamManagerVideo.video); - streamManagerVideo.video = newVideo; - } - }); - }; - /** - * @hidden - */ - StreamManager.prototype.emitEvent = function (type, eventArray) { - this.ee.emitEvent(type, eventArray); - }; - StreamManager.prototype.pushNewStreamManagerVideo = function (streamManagerVideo) { - this.videos.push(streamManagerVideo); - this.addPlayEventToFirstVideo(); - if (this.stream.session.streamManagers.indexOf(this) === -1) { - this.stream.session.streamManagers.push(this); - } - }; - StreamManager.prototype.mirrorVideo = function (video) { - if (!platform['isIonicIos']) { - video.style.transform = 'rotateY(180deg)'; - video.style.webkitTransform = 'rotateY(180deg)'; - } - }; - StreamManager.prototype.removeMirrorVideo = function (video) { - video.style.transform = 'unset'; - video.style.webkitTransform = 'unset'; - }; - return StreamManager; -}()); -exports.StreamManager = StreamManager; -//# sourceMappingURL=StreamManager.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/StreamManager.js.map b/openvidu-browser/lib/OpenVidu/StreamManager.js.map deleted file mode 100644 index e9b2cf70..00000000 --- a/openvidu-browser/lib/OpenVidu/StreamManager.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StreamManager.js","sourceRoot":"","sources":["../../src/OpenVidu/StreamManager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAMH,oFAAmF;AACnF,kFAAiF;AACjF,6EAA4E;AAE5E,mDAAsD;AACtD,mCAAsC;AACtC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,EAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAElI;;;;;;;;GAQG;AACH;IAuDI;;OAEG;IACH,uBAAY,MAAc,EAAE,aAAoC;QAAhE,iBAyCC;QA5FD;;WAEG;QACH,WAAM,GAAyB,EAAE,CAAC;QA2BlC;;WAEG;QACH,uCAAkC,GAAG,KAAK,CAAC;QAK3C;;WAEG;QACO,OAAE,GAAG,IAAI,YAAY,EAAE,CAAC;QAW9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAErC,IAAI,CAAC,CAAC,aAAa,EAAE;YACjB,IAAI,MAAM,SAAA,CAAC;YACX,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;gBACnC,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;aACnD;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ode 100644 index a64cf3fb..00000000 --- a/openvidu-browser/lib/OpenVidu/Subscriber.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Stream } from './Stream'; -import { StreamManager } from './StreamManager'; -import { SubscriberProperties } from '../OpenViduInternal/Interfaces/Public/SubscriberProperties'; -/** - * Packs remote media streams. Participants automatically receive them when others publish their streams. Initialized with [[Session.subscribe]] method - */ -export declare class Subscriber extends StreamManager { - private properties; - /** - * @hidden - */ - constructor(stream: Stream, targEl: string | HTMLElement, properties: SubscriberProperties); - /** - * Subscribe or unsubscribe from the audio stream (if available). Calling this method twice in a row passing same value will have no effect - * @param value `true` to subscribe to the audio stream, `false` to unsubscribe from it - */ - subscribeToAudio(value: boolean): Subscriber; - /** - * Subscribe or unsubscribe from the video stream (if available). Calling this method twice in a row passing same value will have no effect - * @param value `true` to subscribe to the video stream, `false` to unsubscribe from it - */ - subscribeToVideo(value: boolean): Subscriber; -} diff --git a/openvidu-browser/lib/OpenVidu/Subscriber.js b/openvidu-browser/lib/OpenVidu/Subscriber.js deleted file mode 100644 index 5cc67693..00000000 --- a/openvidu-browser/lib/OpenVidu/Subscriber.js +++ /dev/null @@ -1,73 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var StreamManager_1 = require("./StreamManager"); -/** - * Packs remote media streams. Participants automatically receive them when others publish their streams. Initialized with [[Session.subscribe]] method - */ -var Subscriber = /** @class */ (function (_super) { - __extends(Subscriber, _super); - /** - * @hidden - */ - function Subscriber(stream, targEl, properties) { - var _this = _super.call(this, stream, targEl) || this; - _this.element = _this.targetElement; - _this.stream = stream; - _this.properties = properties; - return _this; - } - /** - * Subscribe or unsubscribe from the audio stream (if available). Calling this method twice in a row passing same value will have no effect - * @param value `true` to subscribe to the audio stream, `false` to unsubscribe from it - */ - Subscriber.prototype.subscribeToAudio = function (value) { - this.stream.getMediaStream().getAudioTracks().forEach(function (track) { - track.enabled = value; - }); - console.info("'Subscriber' has " + (value ? 'subscribed to' : 'unsubscribed from') + ' its audio stream'); - return this; - }; - /** - * Subscribe or unsubscribe from the video stream (if available). Calling this method twice in a row passing same value will have no effect - * @param value `true` to subscribe to the video stream, `false` to unsubscribe from it - */ - Subscriber.prototype.subscribeToVideo = function (value) { - this.stream.getMediaStream().getVideoTracks().forEach(function (track) { - track.enabled = value; - }); - console.info("'Subscriber' has " + (value ? 'subscribed to' : 'unsubscribed from') + ' its video stream'); - return this; - }; - return Subscriber; -}(StreamManager_1.StreamManager)); -exports.Subscriber = Subscriber; -//# sourceMappingURL=Subscriber.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenVidu/Subscriber.js.map b/openvidu-browser/lib/OpenVidu/Subscriber.js.map deleted file mode 100644 index b12c4a28..00000000 --- a/openvidu-browser/lib/OpenVidu/Subscriber.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subscriber.js","sourceRoot":"","sources":["../../src/OpenVidu/Subscriber.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;AAGH,iDAAgD;AAIhD;;GAEG;AACH;IAAgC,8BAAa;IAIzC;;OAEG;IACH,oBAAY,MAAc,EAAE,MAA4B,EAAE,UAAgC;QAA1F,YACI,kBAAM,MAAM,EAAE,MAAM,CAAC,SAIxB;QAHG,KAAI,CAAC,OAAO,GAAG,KAAI,CAAC,aAAa,CAAC;QAClC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;;IACjC,CAAC;IAED;;;OAGG;IACH,qCAAgB,GAAhB,UAAiB,KAAc;QAC3B,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,UAAC,KAAK;YACxD,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;QAC1B,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,mBAAmB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC,CAAC;QAC1G,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACH,qCAAgB,GAAhB,UAAiB,KAAc;QAC3B,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,UAAC,KAAK;YACxD,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;QAC1B,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,mBAAmB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC,CAAC;QAC1G,OAAO,IAAI,CAAC;IAChB,CAAC;IAEL,iBAAC;AAAD,CAAC,AAtCD,CAAgC,6BAAa,GAsC5C;AAtCY,gCAAU"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.d.ts b/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.d.ts deleted file mode 100644 index 093c6c1f..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare enum LocalRecorderState { - READY = "READY", - RECORDING = "RECORDING", - PAUSED = "PAUSED", - FINISHED = "FINISHED" -} diff --git a/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js b/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js deleted file mode 100644 index a88aa0bf..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js +++ /dev/null @@ -1,26 +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. - * - */ -exports.__esModule = true; -var LocalRecorderState; -(function (LocalRecorderState) { - LocalRecorderState["READY"] = "READY"; - LocalRecorderState["RECORDING"] = "RECORDING"; - LocalRecorderState["PAUSED"] = "PAUSED"; - LocalRecorderState["FINISHED"] = "FINISHED"; -})(LocalRecorderState = exports.LocalRecorderState || (exports.LocalRecorderState = {})); -//# sourceMappingURL=LocalRecorderState.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js.map b/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js.map deleted file mode 100644 index d9d07773..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LocalRecorderState.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Enums/LocalRecorderState.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,qCAAe,CAAA;IACf,6CAAuB,CAAA;IACvB,uCAAiB,CAAA;IACjB,2CAAqB,CAAA;AACzB,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.d.ts b/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.d.ts deleted file mode 100644 index ba3326fd..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Defines property [[OpenViduError.name]] - */ -export declare enum OpenViduErrorName { - /** - * Browser is not supported by OpenVidu. - * 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 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 upon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]] - */ - SCREEN_CAPTURE_DENIED = "SCREEN_CAPTURE_DENIED", - /** - * Browser does not support screen sharing. - * Returned upon unsuccessful [[OpenVidu.initPublisher]] - */ - SCREEN_SHARING_NOT_SUPPORTED = "SCREEN_SHARING_NOT_SUPPORTED", - /** - * Only for Chrome, there's no screen sharing extension installed - * 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 upon unsuccessful [[OpenVidu.initPublisher]] - */ - SCREEN_EXTENSION_DISABLED = "SCREEN_EXTENSION_DISABLED", - /** - * No video input device found with the provided deviceId (property [[PublisherProperties.videoSource]]) - * 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 upon unsuccessful [[OpenVidu.initPublisher]] - */ - INPUT_AUDIO_DEVICE_NOT_FOUND = "INPUT_AUDIO_DEVICE_NOT_FOUND", - /** - * Method [[OpenVidu.initPublisher]] has been called with properties `videoSource` and `audioSource` of - * [[PublisherProperties]] parameter both set to *false* or *null* - */ - NO_INPUT_SOURCE_SET = "NO_INPUT_SOURCE_SET", - /** - * 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 upon unsuccessful [[OpenVidu.initPublisher]] - */ - PUBLISHER_PROPERTIES_ERROR = "PUBLISHER_PROPERTIES_ERROR", - /** - * The client tried to call a method without the required permissions. This can occur for methods [[Session.publish]], - * [[Session.forceUnpublish]], [[Session.forceDisconnect]], [[Stream.applyFilter]], [[Stream.removeFilter]] - */ - OPENVIDU_PERMISSION_DENIED = "OPENVIDU_PERMISSION_DENIED", - /** - * _Not in use yet_ - */ - OPENVIDU_NOT_CONNECTED = "OPENVIDU_NOT_CONNECTED", - /** - * _Not in use yet_ - */ - GENERIC_ERROR = "GENERIC_ERROR" -} -/** - * Simple object to identify runtime errors on the client side - */ -export declare class OpenViduError { - name: OpenViduErrorName; - message: string; - /** - * @hidden - */ - constructor(name: OpenViduErrorName, message: string); -} diff --git a/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js b/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js deleted file mode 100644 index 50808cf5..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js +++ /dev/null @@ -1,103 +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. - * - */ -exports.__esModule = true; -/** - * Defines property [[OpenViduError.name]] - */ -var OpenViduErrorName; -(function (OpenViduErrorName) { - /** - * Browser is not supported by OpenVidu. - * 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 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 upon unsuccessful [[OpenVidu.initPublisher]] or [[OpenVidu.getUserMedia]] - */ - OpenViduErrorName["SCREEN_CAPTURE_DENIED"] = "SCREEN_CAPTURE_DENIED"; - /** - * Browser does not support screen sharing. - * 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 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 upon unsuccessful [[OpenVidu.initPublisher]] - */ - OpenViduErrorName["SCREEN_EXTENSION_DISABLED"] = "SCREEN_EXTENSION_DISABLED"; - /** - * No video input device found with the provided deviceId (property [[PublisherProperties.videoSource]]) - * 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 upon unsuccessful [[OpenVidu.initPublisher]] - */ - OpenViduErrorName["INPUT_AUDIO_DEVICE_NOT_FOUND"] = "INPUT_AUDIO_DEVICE_NOT_FOUND"; - /** - * Method [[OpenVidu.initPublisher]] has been called with properties `videoSource` and `audioSource` of - * [[PublisherProperties]] parameter both set to *false* or *null* - */ - OpenViduErrorName["NO_INPUT_SOURCE_SET"] = "NO_INPUT_SOURCE_SET"; - /** - * 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 upon unsuccessful [[OpenVidu.initPublisher]] - */ - OpenViduErrorName["PUBLISHER_PROPERTIES_ERROR"] = "PUBLISHER_PROPERTIES_ERROR"; - /** - * The client tried to call a method without the required permissions. This can occur for methods [[Session.publish]], - * [[Session.forceUnpublish]], [[Session.forceDisconnect]], [[Stream.applyFilter]], [[Stream.removeFilter]] - */ - OpenViduErrorName["OPENVIDU_PERMISSION_DENIED"] = "OPENVIDU_PERMISSION_DENIED"; - /** - * _Not in use yet_ - */ - OpenViduErrorName["OPENVIDU_NOT_CONNECTED"] = "OPENVIDU_NOT_CONNECTED"; - /** - * _Not in use yet_ - */ - OpenViduErrorName["GENERIC_ERROR"] = "GENERIC_ERROR"; -})(OpenViduErrorName = exports.OpenViduErrorName || (exports.OpenViduErrorName = {})); -/** - * Simple object to identify runtime errors on the client side - */ -var OpenViduError = /** @class */ (function () { - /** - * @hidden - */ - function OpenViduError(name, message) { - this.name = name; - this.message = message; - } - return OpenViduError; -}()); -exports.OpenViduError = OpenViduError; -//# sourceMappingURL=OpenViduError.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js.map b/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js.map deleted file mode 100644 index 5e194c61..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.d.ts b/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.d.ts deleted file mode 100644 index 69aa0ad5..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * How the video will be inserted in the DOM for Publishers and Subscribers. See [[PublisherProperties.insertMode]] and [[SubscriberProperties.insertMode]] - */ -export declare enum VideoInsertMode { - /** - * Video inserted after the target element (as next sibling) - */ - AFTER = "AFTER", - /** - * Video inserted as last child of the target element - */ - APPEND = "APPEND", - /** - * Video inserted before the target element (as previous sibling) - */ - BEFORE = "BEFORE", - /** - * Video inserted as first child of the target element - */ - PREPEND = "PREPEND", - /** - * Video replaces target element - */ - REPLACE = "REPLACE" -} diff --git a/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js b/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js deleted file mode 100644 index 88ca8f2c..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js +++ /dev/null @@ -1,45 +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. - * - */ -exports.__esModule = true; -/** - * How the video will be inserted in the DOM for Publishers and Subscribers. See [[PublisherProperties.insertMode]] and [[SubscriberProperties.insertMode]] - */ -var VideoInsertMode; -(function (VideoInsertMode) { - /** - * Video inserted after the target element (as next sibling) - */ - VideoInsertMode["AFTER"] = "AFTER"; - /** - * Video inserted as last child of the target element - */ - VideoInsertMode["APPEND"] = "APPEND"; - /** - * Video inserted before the target element (as previous sibling) - */ - VideoInsertMode["BEFORE"] = "BEFORE"; - /** - * Video inserted as first child of the target element - */ - VideoInsertMode["PREPEND"] = "PREPEND"; - /** - * Video replaces target element - */ - VideoInsertMode["REPLACE"] = "REPLACE"; -})(VideoInsertMode = exports.VideoInsertMode || (exports.VideoInsertMode = {})); -//# sourceMappingURL=VideoInsertMode.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js.map b/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js.map deleted file mode 100644 index e57e0781..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VideoInsertMode.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Enums/VideoInsertMode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH;;GAEG;AACH,IAAY,eAuBX;AAvBD,WAAY,eAAe;IAEvB;;OAEG;IACH,kCAAe,CAAA;IACf;;OAEG;IACH,oCAAiB,CAAA;IACjB;;OAEG;IACH,oCAAiB,CAAA;IACjB;;OAEG;IACH,sCAAmB,CAAA;IACnB;;OAEG;IACH,sCAAmB,CAAA;AAEvB,CAAC,EAvBW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAuB1B"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.d.ts deleted file mode 100644 index 89198b08..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Event } from './Event'; -import { Connection } from '../../OpenVidu/Connection'; -import { Session } from '../../OpenVidu/Session'; -/** - * Defines the following events: - * - `connectionCreated`: dispatched by [[Session]] - * - `connectionDestroyed`: dispatched by [[Session]] - */ -export declare class ConnectionEvent extends Event { - /** - * Connection object that was created or destroyed - */ - connection: Connection; - /** - * 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` event an empty string - */ - reason: string; - /** - * @hidden - */ - constructor(cancelable: boolean, target: Session, type: string, connection: Connection, reason: string); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js deleted file mode 100644 index 2f03dd08..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js +++ /dev/null @@ -1,57 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -/** - * Defines the following events: - * - `connectionCreated`: dispatched by [[Session]] - * - `connectionDestroyed`: dispatched by [[Session]] - */ -var ConnectionEvent = /** @class */ (function (_super) { - __extends(ConnectionEvent, _super); - /** - * @hidden - */ - function ConnectionEvent(cancelable, target, type, connection, reason) { - var _this = _super.call(this, cancelable, target, type) || this; - _this.connection = connection; - _this.reason = reason; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - ConnectionEvent.prototype.callDefaultBehavior = function () { }; - return ConnectionEvent; -}(Event_1.Event)); -exports.ConnectionEvent = ConnectionEvent; -//# sourceMappingURL=ConnectionEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js.map deleted file mode 100644 index c0cca7b6..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/Event.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/Event.d.ts deleted file mode 100644 index 7e04e086..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/Event.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Filter } from '../../OpenVidu/Filter'; -import { StreamManager } from '../../OpenVidu/StreamManager'; -import { Session } from '../../OpenVidu/Session'; -export declare abstract class Event { - /** - * Whether the event has a default behavior that may be prevented by calling [[Event.preventDefault]] - */ - cancelable: boolean; - /** - * The object that dispatched the event - */ - target: Session | StreamManager | Filter; - /** - * The type of event. This is the same string you pass as first parameter when calling method `on()` of any object implementing [[EventDispatcher]] interface - */ - type: string; - private hasBeenPrevented; - /** - * @hidden - */ - constructor(cancelable: boolean, target: Session | StreamManager | Filter, type: string); - /** - * Whether the default beahivour of the event has been prevented or not. Call [[Event.preventDefault]] to prevent it - */ - isDefaultPrevented(): boolean; - /** - * 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 - * by calling [[Subscriber.createVideoElement]]). For every video removed, each Subscriber object will also dispatch a `videoElementDestroyed` event. - * - * - `streamDestroyed`: - * - If dispatched by a [[Publisher]] (*you* have unpublished): automatically stops all media tracks and deletes any HTML video element associated to it (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement` - * in method [[OpenVidu.initPublisher]] or by calling [[Publisher.createVideoElement]]). For every video removed, the Publisher object will also dispatch a `videoElementDestroyed` event. - * - If dispatched by [[Session]] (*other user* has unpublished): automatically unsubscribes the proper 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, either by passing a valid parameter as `targetElement` in method [[Session.subscribe]] or - * by calling [[Subscriber.createVideoElement]]). For every video removed, the Subscriber object will also dispatch a `videoElementDestroyed` event. - */ - preventDefault(): void; - protected abstract callDefaultBehavior(): any; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/Event.js b/openvidu-browser/lib/OpenViduInternal/Events/Event.js deleted file mode 100644 index e6f28faa..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/Event.js +++ /dev/null @@ -1,57 +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. - * - */ -exports.__esModule = true; -var Event = /** @class */ (function () { - /** - * @hidden - */ - function Event(cancelable, target, type) { - this.hasBeenPrevented = false; - this.cancelable = cancelable; - this.target = target; - this.type = type; - } - /** - * Whether the default beahivour of the event has been prevented or not. Call [[Event.preventDefault]] to prevent it - */ - Event.prototype.isDefaultPrevented = function () { - return this.hasBeenPrevented; - }; - /** - * 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 - * by calling [[Subscriber.createVideoElement]]). For every video removed, each Subscriber object will also dispatch a `videoElementDestroyed` event. - * - * - `streamDestroyed`: - * - If dispatched by a [[Publisher]] (*you* have unpublished): automatically stops all media tracks and deletes any HTML video element associated to it (only those created by OpenVidu Browser, either by passing a valid parameter as `targetElement` - * in method [[OpenVidu.initPublisher]] or by calling [[Publisher.createVideoElement]]). For every video removed, the Publisher object will also dispatch a `videoElementDestroyed` event. - * - If dispatched by [[Session]] (*other user* has unpublished): automatically unsubscribes the proper 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, either by passing a valid parameter as `targetElement` in method [[Session.subscribe]] or - * by calling [[Subscriber.createVideoElement]]). For every video removed, the Subscriber object will also dispatch a `videoElementDestroyed` event. - */ - Event.prototype.preventDefault = function () { - // tslint:disable-next-line:no-empty - this.callDefaultBehavior = function () { }; - this.hasBeenPrevented = true; - }; - return Event; -}()); -exports.Event = Event; -//# sourceMappingURL=Event.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/Event.js.map b/openvidu-browser/lib/OpenViduInternal/Events/Event.js.map deleted file mode 100644 index 3597b11a..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/Event.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/Event.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAOH;IAmBI;;OAEG;IACH,eAAY,UAAmB,EAAE,MAAwC,EAAE,IAAY;QAL/E,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"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.d.ts deleted file mode 100644 index 7cacbcd2..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Event } from './Event'; -import { Filter } from '../../OpenVidu/Filter'; -/** - * Defines every event dispatched by audio/video stream filters. You can subscribe to filter events by calling [[Filter.addEventListener]] - */ -export declare class FilterEvent extends Event { - /** - * Data of the event - */ - data: Object; - /** - * @hidden - */ - constructor(target: Filter, eventType: string, data: Object); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.js deleted file mode 100644 index c3c36400..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.js +++ /dev/null @@ -1,54 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -/** - * Defines every event dispatched by audio/video stream filters. You can subscribe to filter events by calling [[Filter.addEventListener]] - */ -var FilterEvent = /** @class */ (function (_super) { - __extends(FilterEvent, _super); - /** - * @hidden - */ - function FilterEvent(target, eventType, data) { - var _this = _super.call(this, false, target, eventType) || this; - _this.data = data; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - FilterEvent.prototype.callDefaultBehavior = function () { }; - return FilterEvent; -}(Event_1.Event)); -exports.FilterEvent = FilterEvent; -//# sourceMappingURL=FilterEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.js.map deleted file mode 100644 index 41e883d7..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/FilterEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FilterEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/FilterEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;AAEH,iCAAgC;AAKhC;;GAEG;AACH;IAAiC,+BAAK;IAOlC;;OAEG;IACH,qBAAY,MAAc,EAAE,SAAiB,EAAE,IAAY;QAA3D,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,SAElC;QADG,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,yCAAmB,GAAnB,cAAwB,CAAC;IAE7B,kBAAC;AAAD,CAAC,AArBD,CAAiC,aAAK,GAqBrC;AArBY,kCAAW"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.d.ts deleted file mode 100644 index ccbfedf8..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Event } from './Event'; -import { Connection } from '../../OpenVidu/Connection'; -import { Session } from '../..'; -/** - * Defines the following events: - * - `publisherStartSpeaking`: dispatched by [[Session]] - * - `publisherStopSpeaking`: dispatched by [[Session]] - * - * More information: - * - This events will only be triggered for **remote streams that have audio tracks** ([[Stream.hasAudio]] must be true) - * - Both events share the same lifecycle. That means that you can subscribe to only one of them if you want, but if you call `Session.off('publisherStopSpeaking')`, - * keep in mind that this will also internally remove any 'publisherStartSpeaking' event - * - You can further configure how the events are dispatched by setting property `publisherSpeakingEventsOptions` in the call of [[OpenVidu.setAdvancedConfiguration]] - */ -export declare class PublisherSpeakingEvent extends Event { - /** - * The client that started or stopped speaking - */ - connection: Connection; - /** - * The streamId of the Stream affected by the speaking event - */ - streamId: string; - /** - * @hidden - */ - constructor(target: Session, type: string, connection: Connection, streamId: string); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js deleted file mode 100644 index c29df226..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js +++ /dev/null @@ -1,64 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -/** - * Defines the following events: - * - `publisherStartSpeaking`: dispatched by [[Session]] - * - `publisherStopSpeaking`: dispatched by [[Session]] - * - * More information: - * - This events will only be triggered for **remote streams that have audio tracks** ([[Stream.hasAudio]] must be true) - * - Both events share the same lifecycle. That means that you can subscribe to only one of them if you want, but if you call `Session.off('publisherStopSpeaking')`, - * keep in mind that this will also internally remove any 'publisherStartSpeaking' event - * - You can further configure how the events are dispatched by setting property `publisherSpeakingEventsOptions` in the call of [[OpenVidu.setAdvancedConfiguration]] - */ -var PublisherSpeakingEvent = /** @class */ (function (_super) { - __extends(PublisherSpeakingEvent, _super); - /** - * @hidden - */ - function PublisherSpeakingEvent(target, type, connection, streamId) { - var _this = _super.call(this, false, target, type) || this; - _this.type = type; - _this.connection = connection; - _this.streamId = streamId; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - PublisherSpeakingEvent.prototype.callDefaultBehavior = function () { }; - return PublisherSpeakingEvent; -}(Event_1.Event)); -exports.PublisherSpeakingEvent = PublisherSpeakingEvent; -//# sourceMappingURL=PublisherSpeakingEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js.map deleted file mode 100644 index b6fefe44..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.d.ts deleted file mode 100644 index 8e5920bb..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Event } from './Event'; -import { Session } from '../../OpenVidu/Session'; -/** - * Defines the following events: - * - `recordingStarted`: dispatched by [[Session]] - * - `recordingStopped`: dispatched by [[Session]] - */ -export declare class RecordingEvent extends Event { - /** - * The recording ID generated in openvidu-server - */ - id: string; - /** - * 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, {name: "MY_RECORDING"})` - * - * If no name is supplied, this property will be undefined and the recorded file will be named after property [[id]] - */ - name?: string; - /** - * @hidden - */ - constructor(target: Session, type: string, id: string, name: string); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js deleted file mode 100644 index 21d2d22b..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js +++ /dev/null @@ -1,59 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -/** - * Defines the following events: - * - `recordingStarted`: dispatched by [[Session]] - * - `recordingStopped`: dispatched by [[Session]] - */ -var RecordingEvent = /** @class */ (function (_super) { - __extends(RecordingEvent, _super); - /** - * @hidden - */ - function RecordingEvent(target, type, id, name) { - var _this = _super.call(this, false, target, type) || this; - _this.id = id; - if (name !== id) { - _this.name = name; - } - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - RecordingEvent.prototype.callDefaultBehavior = function () { }; - return RecordingEvent; -}(Event_1.Event)); -exports.RecordingEvent = RecordingEvent; -//# sourceMappingURL=RecordingEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js.map deleted file mode 100644 index 22e98257..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.d.ts deleted file mode 100644 index 8ee64ba2..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Event } from './Event'; -import { Session } from '../../OpenVidu/Session'; -/** - * Defines event `sessionDisconnected` dispatched by [[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; - /** - * @hidden - */ - constructor(target: Session, reason: string); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js deleted file mode 100644 index b074c4de..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js +++ /dev/null @@ -1,69 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -/** - * Defines event `sessionDisconnected` dispatched by [[Session]] - */ -var SessionDisconnectedEvent = /** @class */ (function (_super) { - __extends(SessionDisconnectedEvent, _super); - /** - * @hidden - */ - function SessionDisconnectedEvent(target, reason) { - var _this = _super.call(this, true, target, 'sessionDisconnected') || this; - _this.reason = reason; - return _this; - } - /** - * @hidden - */ - 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) { - if (!!session.remoteConnections[connectionId].stream) { - session.remoteConnections[connectionId].stream.disposeWebRtcPeer(); - session.remoteConnections[connectionId].stream.disposeMediaStream(); - if (session.remoteConnections[connectionId].stream.streamManager) { - session.remoteConnections[connectionId].stream.streamManager.removeAllVideos(); - } - delete session.remoteStreamsCreated[session.remoteConnections[connectionId].stream.streamId]; - session.remoteConnections[connectionId].dispose(); - } - delete session.remoteConnections[connectionId]; - } - }; - return SessionDisconnectedEvent; -}(Event_1.Event)); -exports.SessionDisconnectedEvent = SessionDisconnectedEvent; -//# sourceMappingURL=SessionDisconnectedEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js.map deleted file mode 100644 index 0f003698..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.d.ts deleted file mode 100644 index aa78ee97..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Event } from './Event'; -import { Connection } from '../../OpenVidu/Connection'; -import { Session } from '../../OpenVidu/Session'; -/** - * Defines the following events: - * - `signal`: dispatched by [[Session]] - * - `signal:TYPE`: dispatched by [[Session]] - */ -export declare class SignalEvent extends Event { - /** - * The type of signal (can be empty). - * - * The client must be subscribed to `Session.on('signal:type', function(signalEvent) {...})` to receive this object in the callback. - * - * Subscribing to `Session.on('signal', function(signalEvent) {...})` will trigger all types of signals. - */ - type: string; - /** - * The message of the signal (can be emtpy) - */ - data: string; - /** - * The client that sent the signal - */ - from: Connection; - /** - * @hidden - */ - constructor(target: Session, type: string, data: string, from: Connection); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js deleted file mode 100644 index 3acaedd2..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js +++ /dev/null @@ -1,58 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -/** - * Defines the following events: - * - `signal`: dispatched by [[Session]] - * - `signal:TYPE`: dispatched by [[Session]] - */ -var SignalEvent = /** @class */ (function (_super) { - __extends(SignalEvent, _super); - /** - * @hidden - */ - function SignalEvent(target, type, data, from) { - var _this = _super.call(this, false, target, type) || this; - _this.type = type; - _this.data = data; - _this.from = from; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - SignalEvent.prototype.callDefaultBehavior = function () { }; - return SignalEvent; -}(Event_1.Event)); -exports.SignalEvent = SignalEvent; -//# sourceMappingURL=SignalEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js.map deleted file mode 100644 index 5229bb9d..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.d.ts deleted file mode 100644 index a6f7725a..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Event } from './Event'; -import { Publisher } from '../../OpenVidu/Publisher'; -import { Session } from '../../OpenVidu/Session'; -import { Stream } from '../../OpenVidu/Stream'; -/** - * Defines the following events: - * - `streamCreated`: dispatched by [[Session]] and [[Publisher]] - * - `streamDestroyed`: dispatched by [[Session]] and [[Publisher]] - */ -export declare class StreamEvent extends Event { - /** - * Stream object that was created or destroyed - */ - stream: Stream; - /** - * 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 - */ - reason: string; - /** - * @hidden - */ - constructor(cancelable: boolean, target: Session | Publisher, type: string, stream: Stream, reason: string); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js deleted file mode 100644 index 1d87ed1d..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js +++ /dev/null @@ -1,98 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -var Publisher_1 = require("../../OpenVidu/Publisher"); -var Session_1 = require("../../OpenVidu/Session"); -/** - * Defines the following events: - * - `streamCreated`: dispatched by [[Session]] and [[Publisher]] - * - `streamDestroyed`: dispatched by [[Session]] and [[Publisher]] - */ -var StreamEvent = /** @class */ (function (_super) { - __extends(StreamEvent, _super); - /** - * @hidden - */ - function StreamEvent(cancelable, target, type, stream, reason) { - var _this = _super.call(this, cancelable, target, type) || this; - _this.stream = stream; - _this.reason = reason; - return _this; - } - /** - * @hidden - */ - StreamEvent.prototype.callDefaultBehavior = function () { - if (this.type === 'streamDestroyed') { - if (this.target instanceof Session_1.Session) { - // Remote Stream - 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 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(); - // Remove from DOM all video elements associated to this Stream, if there's a StreamManager defined - // (method Session.subscribe must have been called) - if (this.stream.streamManager) - this.stream.streamManager.removeAllVideos(); - // Delete stream from Session.remoteStreamsCreated map - delete this.stream.session.remoteStreamsCreated[this.stream.streamId]; - // Delete StreamOptionsServer from remote Connection - var remoteConnection = this.stream.session.remoteConnections[this.stream.connection.connectionId]; - if (!!remoteConnection && !!remoteConnection.options) { - var streamOptionsServer = remoteConnection.options.streams; - for (var i = streamOptionsServer.length - 1; i >= 0; --i) { - if (streamOptionsServer[i].id === this.stream.streamId) { - streamOptionsServer.splice(i, 1); - } - } - } - } - }; - return StreamEvent; -}(Event_1.Event)); -exports.StreamEvent = StreamEvent; -//# sourceMappingURL=StreamEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js.map deleted file mode 100644 index 22b57960..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StreamEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/StreamEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;AAEH,iCAAgC;AAChC,sDAAqD;AACrD,kDAAiD;AAIjD;;;;GAI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M,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"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.d.ts deleted file mode 100644 index d7241d42..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Event } from './Event'; -import { StreamManager } from '../../OpenVidu/StreamManager'; -/** - * Defines the following events: - * - `streamPlaying`: dispatched by [[StreamManager]] ([[Publisher]] and [[Subscriber]]) whenever its media stream starts playing (one of its videos has media - * and has begun to play) - * - `streamAudioVolumeChange`: dispatched by [[StreamManager]] ([[Publisher]] and [[Subscriber]]) when the volume of its Stream's audio track - * changes. Only applies if [[Stream.hasAudio]] is `true`. The frequency this event is fired with is defined by property `interval` of - * [[OpenViduAdvancedConfiguration.publisherSpeakingEventsOptions]] (default 50ms) - */ -export declare class StreamManagerEvent extends Event { - /** - * For `streamAudioVolumeChange` event: - * - `{newValue: number, oldValue: number}`: new and old audio volume values. These values are between -100 (silence) and 0 (loudest possible volume). - * They are not exact and depend on how the browser is managing the audio track, but -100 and 0 can be taken as limit values. - * - * For `streamPlaying` event undefined - */ - value: Object | undefined; - /** - * @hidden - */ - constructor(target: StreamManager, type: string, value: Object | undefined); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js deleted file mode 100644 index c55dca9c..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js +++ /dev/null @@ -1,59 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -/** - * Defines the following events: - * - `streamPlaying`: dispatched by [[StreamManager]] ([[Publisher]] and [[Subscriber]]) whenever its media stream starts playing (one of its videos has media - * and has begun to play) - * - `streamAudioVolumeChange`: dispatched by [[StreamManager]] ([[Publisher]] and [[Subscriber]]) when the volume of its Stream's audio track - * changes. Only applies if [[Stream.hasAudio]] is `true`. The frequency this event is fired with is defined by property `interval` of - * [[OpenViduAdvancedConfiguration.publisherSpeakingEventsOptions]] (default 50ms) - */ -var StreamManagerEvent = /** @class */ (function (_super) { - __extends(StreamManagerEvent, _super); - /** - * @hidden - */ - function StreamManagerEvent(target, type, value) { - var _this = _super.call(this, false, target, type) || this; - _this.value = value; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - StreamManagerEvent.prototype.callDefaultBehavior = function () { }; - return StreamManagerEvent; -}(Event_1.Event)); -exports.StreamManagerEvent = StreamManagerEvent; -//# sourceMappingURL=StreamManagerEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js.map deleted file mode 100644 index 862c6628..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/StreamManagerEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StreamManagerEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/StreamManagerEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;AAEH,iCAAgC;AAGhC;;;;;;;GAOG;AACH;IAAwC,sCAAK;IAWzC;;OAEG;IACH,4BAAY,MAAqB,EAAE,IAAY,EAAE,KAAyB;QAA1E,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,SAE7B;QADG,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,gDAAmB,GAAnB,cAAwB,CAAC;IAE7B,yBAAC;AAAD,CAAC,AAzBD,CAAwC,aAAK,GAyB5C;AAzBY,gDAAkB"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.d.ts deleted file mode 100644 index 30ad5f7a..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Event } from './Event'; -import { Session } from '../../OpenVidu/Session'; -import { Stream } from '../../OpenVidu/Stream'; -import { StreamManager } from '../../OpenVidu/StreamManager'; -/** - * Defines event `streamPropertyChanged` dispatched by [[Session]] as well as by [[StreamManager]] ([[Publisher]] and [[Subscriber]]). - * This event is fired when any remote stream (owned by a Subscriber) or local stream (owned by a Publisher) undergoes - * any change in any of its mutable properties (see [[changedProperty]]). - */ -export declare class StreamPropertyChangedEvent extends Event { - /** - * The Stream whose property has changed. You can always identify the user publishing the changed stream by consulting property [[Stream.connection]] - */ - stream: Stream; - /** - * The property of the stream that changed. This value is either `"videoActive"`, `"audioActive"`, `"videoDimensions"` or `"filter"` - */ - changedProperty: string; - /** - * Cause of the change on the stream's property: - * - For `videoActive`: `"publishVideo"` - * - For `audioActive`: `"publishAudio"` - * - For `videoDimensions`: `"deviceRotated"` or `"screenResized"` - */ - reason: string; - /** - * New value of the property (after change, current value) - */ - newValue: Object; - /** - * Previous value of the property (before change) - */ - oldValue: Object; - /** - * @hidden - */ - constructor(target: Session | StreamManager, stream: Stream, changedProperty: string, newValue: Object, oldValue: Object, reason: string); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.js deleted file mode 100644 index aa46532c..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.js +++ /dev/null @@ -1,60 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -/** - * Defines event `streamPropertyChanged` dispatched by [[Session]] as well as by [[StreamManager]] ([[Publisher]] and [[Subscriber]]). - * This event is fired when any remote stream (owned by a Subscriber) or local stream (owned by a Publisher) undergoes - * any change in any of its mutable properties (see [[changedProperty]]). - */ -var StreamPropertyChangedEvent = /** @class */ (function (_super) { - __extends(StreamPropertyChangedEvent, _super); - /** - * @hidden - */ - function StreamPropertyChangedEvent(target, stream, changedProperty, newValue, oldValue, reason) { - var _this = _super.call(this, false, target, 'streamPropertyChanged') || this; - _this.stream = stream; - _this.changedProperty = changedProperty; - _this.newValue = newValue; - _this.oldValue = oldValue; - _this.reason = reason; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - StreamPropertyChangedEvent.prototype.callDefaultBehavior = function () { }; - return StreamPropertyChangedEvent; -}(Event_1.Event)); -exports.StreamPropertyChangedEvent = StreamPropertyChangedEvent; -//# sourceMappingURL=StreamPropertyChangedEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.js.map deleted file mode 100644 index 10c61ae3..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StreamPropertyChangedEvent.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Events/StreamPropertyChangedEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;AAEH,iCAAgC;AAKhC;;;;GAIG;AACH;IAAgD,8CAAK;IA8BjD;;OAEG;IACH,oCAAY,MAA+B,EAAE,MAAc,EAAE,eAAuB,EAAE,QAAgB,EAAE,QAAgB,EAAE,MAAc;QAAxI,YACI,kBAAM,KAAK,EAAE,MAAM,EAAE,uBAAuB,CAAC,SAMhD;QALG,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,KAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IAED;;OAEG;IACH,oCAAoC;IACpC,wDAAmB,GAAnB,cAAwB,CAAC;IAE7B,iCAAC;AAAD,CAAC,AAhDD,CAAgD,aAAK,GAgDpD;AAhDY,gEAA0B"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.d.ts b/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.d.ts deleted file mode 100644 index 6f632973..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Event } from './Event'; -import { StreamManager } from '../../OpenVidu/StreamManager'; -/** - * Defines the following events: - * - `videoElementCreated`: dispatched by [[Publisher]] and [[Subscriber]] whenever a new HTML video element has been inserted into DOM by OpenVidu Browser library. See - * [Manage video players](/docs/how-do-i/manage-videos) section. - * - `videoElementDestroyed`: dispatched by [[Publisher]] and [[Subscriber]] whenever an HTML video element has been removed from DOM by OpenVidu Browser library. - */ -export declare class VideoElementEvent extends Event { - /** - * Video element that was created or destroyed - */ - element: HTMLVideoElement; - /** - * @hidden - */ - constructor(element: HTMLVideoElement, target: StreamManager, type: string); - /** - * @hidden - */ - callDefaultBehavior(): void; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js b/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js deleted file mode 100644 index 6aa9606f..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js +++ /dev/null @@ -1,57 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Event_1 = require("./Event"); -/** - * Defines the following events: - * - `videoElementCreated`: dispatched by [[Publisher]] and [[Subscriber]] whenever a new HTML video element has been inserted into DOM by OpenVidu Browser library. See - * [Manage video players](/docs/how-do-i/manage-videos) section. - * - `videoElementDestroyed`: dispatched by [[Publisher]] and [[Subscriber]] whenever an HTML video element has been removed from DOM by OpenVidu Browser library. - */ -var VideoElementEvent = /** @class */ (function (_super) { - __extends(VideoElementEvent, _super); - /** - * @hidden - */ - function VideoElementEvent(element, target, type) { - var _this = _super.call(this, false, target, type) || this; - _this.element = element; - return _this; - } - /** - * @hidden - */ - // tslint:disable-next-line:no-empty - VideoElementEvent.prototype.callDefaultBehavior = function () { }; - return VideoElementEvent; -}(Event_1.Event)); -exports.VideoElementEvent = VideoElementEvent; -//# sourceMappingURL=VideoElementEvent.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js.map b/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js.map deleted file mode 100644 index 7ff7b3f0..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.d.ts deleted file mode 100644 index 047887ad..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { StreamOptionsServer } from './StreamOptionsServer'; -export interface ConnectionOptions { - id: string; - metadata: string; - streams: StreamOptionsServer[]; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.js deleted file mode 100644 index 98837206..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=ConnectionOptions.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.js.map deleted file mode 100644 index a85722bf..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ConnectionOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConnectionOptions.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Private/ConnectionOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.d.ts deleted file mode 100644 index d3b935b7..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Connection } from '../../../OpenVidu/Connection'; -import { Filter } from '../../../OpenVidu/Filter'; -export interface InboundStreamOptions { - id: string; - connection: Connection; - hasAudio: boolean; - hasVideo: boolean; - audioActive: boolean; - videoActive: boolean; - typeOfVideo: string; - frameRate: number; - videoDimensions: { - width: number; - height: number; - }; - filter?: Filter; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.js deleted file mode 100644 index 5fbb2fee..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=InboundStreamOptions.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.js.map deleted file mode 100644 index a41489a5..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/InboundStreamOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InboundStreamOptions.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Private/InboundStreamOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.d.ts deleted file mode 100644 index a443eabf..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ObjMap { - [s: string]: T; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.js deleted file mode 100644 index 67e5019d..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=ObjMap.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.js.map deleted file mode 100644 index 6b82b130..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/ObjMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ObjMap.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Private/ObjMap.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.d.ts deleted file mode 100644 index d35b411a..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { PublisherProperties } from '../Public/PublisherProperties'; -export interface OutboundStreamOptions { - publisherProperties: PublisherProperties; - mediaConstraints: MediaStreamConstraints; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.js deleted file mode 100644 index 066245c6..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=OutboundStreamOptions.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.js.map deleted file mode 100644 index 4b30dd97..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OutboundStreamOptions.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Private/OutboundStreamOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.d.ts deleted file mode 100644 index 1fdf4b63..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface SessionOptions { - sessionId: string; - participantId: string; - metadata: string; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.js deleted file mode 100644 index a3e8a10a..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=SessionOptions.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.js.map deleted file mode 100644 index a313f57f..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/SessionOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SessionOptions.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Private/SessionOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.d.ts deleted file mode 100644 index cda5ed7c..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Filter } from '../../../OpenVidu/Filter'; -export interface StreamOptionsServer { - id: string; - hasAudio: boolean; - hasVideo: boolean; - audioActive: boolean; - videoActive: boolean; - typeOfVideo: string; - frameRate: number; - videoDimensions: string; - filter: Filter; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.js deleted file mode 100644 index 5ef991aa..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=StreamOptionsServer.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.js.map deleted file mode 100644 index 16b41ccf..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Private/StreamOptionsServer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StreamOptionsServer.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Private/StreamOptionsServer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.d.ts deleted file mode 100644 index dbf68c43..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * See [[Session.capabilities]] - */ -export interface Capabilities { - /** - * `true` if the client can call [[Session.forceDisconnect]], `false` if not - */ - forceDisconnect: boolean; - /** - * `true` if the client can call [[Session.forceUnpublish]], `false` if not - */ - forceUnpublish: boolean; - /** - * `true` if the client can call [[Session.publish]], `false` if not - */ - publish: boolean; - /** - * `true` if the client can call [[Session.subscribe]], `false` if not (true for every user for now) - */ - subscribe: boolean; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.js deleted file mode 100644 index 9a1e1e17..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=Capabilities.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.js.map deleted file mode 100644 index babbf09d..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Capabilities.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Capabilities.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Public/Capabilities.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.d.ts deleted file mode 100644 index 114c9a81..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * See [[OpenVidu.getDevices]] - */ -export interface Device { - /** - * `"videoinput"`, `"audioinput"` - */ - kind: string; - /** - * Unique ID for the device. Use it on `audioSource` or `videoSource` properties of [[PublisherProperties]] - */ - deviceId: string; - /** - * Description of the device. An empty string if the user hasn't granted permissions to the site to access the device - */ - label: string; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.js deleted file mode 100644 index 48ca0442..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=Device.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.js.map deleted file mode 100644 index b1922f39..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/Device.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Device.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Public/Device.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.d.ts deleted file mode 100644 index c31d4f61..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Event as Event } from '../../Events/Event'; -export interface EventDispatcher { - /** - * Adds function `handler` to handle event `type` - * - * @returns The EventDispatcher object - */ - on(type: string, handler: (event: Event) => void): EventDispatcher; - /** - * Adds function `handler` to handle event `type` just once. The handler will be automatically removed after first execution - * - * @returns The object that dispatched the event - */ - once(type: string, handler: (event: Event) => void): Object; - /** - * Removes a `handler` from event `type`. If no handler is provided, all handlers will be removed from the event - * - * @returns The object that dispatched the event - */ - off(type: string, handler?: (event: Event) => void): Object; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.js deleted file mode 100644 index c3ac2488..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=EventDispatcher.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.js.map deleted file mode 100644 index 9cbe40c3..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/EventDispatcher.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EventDispatcher.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Public/EventDispatcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.d.ts deleted file mode 100644 index 931ad990..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * See [[OpenVidu.setAdvancedConfiguration]] - */ -export interface OpenViduAdvancedConfiguration { - /** - * Array of [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer) to be used by OpenVidu Browser. By default OpenVidu will generate the required credentials to use the COTURN server hosted along OpenVidu Server - * You can also set this property to string 'freeice' to force the use of free STUN servers instead (got thanks to [freeice](https://github.com/DamonOehlman/freeice) library). - */ - iceServers?: RTCIceServer[] | string; - /** - * URL to a custom screen share extension for Chrome (always based on ours: [openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension)) to be used instead of the default one. - * Must be something like this: `https://chrome.google.com/webstore/detail/YOUR_WEBSTORE_EXTENSION_NAME/YOUR_EXTENSION_ID` - */ - screenShareChromeExtension?: string; - /** - * Custom configuration for the [[PublisherSpeakingEvent]] feature. It is an object which includes the following optional properties: - * - `interval`: (number) how frequently the analyser polls the audio stream to check if speaking has started or stopped. Default **50** (ms) - * - `threshold`: (number) the volume at which _publisherStartSpeaking_ and _publisherStopSpeaking_ events will be fired. Default **-50** (dB) - */ - publisherSpeakingEventsOptions?: any; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.js deleted file mode 100644 index 40a21599..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=OpenViduAdvancedConfiguration.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.js.map deleted file mode 100644 index 63fa62b3..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OpenViduAdvancedConfiguration.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.d.ts deleted file mode 100644 index a1db9fdc..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Filter } from '../../../OpenVidu/Filter'; -import { VideoInsertMode } from '../../Enums/VideoInsertMode'; -/** - * See [[OpenVidu.initPublisher]] - */ -export interface PublisherProperties { - /** - * Which device should provide the audio source. Can be: - * - Property `deviceId` of a [[Device]] - * - A MediaStreamTrack obtained from a MediaStream object with [[OpenVidu.getUserMedia]] - * - `false` or null to have a video-only publisher - * @default _Default microphone_ - */ - audioSource?: string | MediaStreamTrack | boolean; - /** - * 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; - /** - * How the video element of the publisher should be inserted in the DOM - * @default VideoInsertMode.APPEND - */ - insertMode?: VideoInsertMode | string; - /** - * Whether the publisher's video will be mirrored in the page or not. Only affects the local view of the publisher in the browser (remote streams will not be mirrored). If `videoSource` is set to "screen" this property is fixed to `false` - * @default true - */ - mirror?: boolean; - /** - * Whether to initially publish to the session with the audio unmuted or muted. Only makes sense if property `audioSource` is NOT set to *false* or *null*. You can change the audio state later during the session with [[Publisher.publishAudio]] - * @default true - */ - publishAudio?: boolean; - /** - * Whether to initially publish to the session with the video enabled or disabled. Only makes sense if property `videoSource` is NOT set to *false* or *null*. You can change the video state later during the session with [[Publisher.publishVideo]] - * @default true - */ - publishVideo?: boolean; - /** - * Resolution of the video: `"320x240"`, `"640x480"`, `"1280x720"` (low, medium and high quality respectively) - * @default "640x480" - */ - resolution?: string; - /** - * Which device should provide the video source. Can be: - * - Property `deviceId` of a [[Device]] - * - `"screen"` to screen-share. We provide a default screen-shraring extension for Chrome that can run in any domain, but you can customize it so it has your own icon, your own name, etc. Visit this - * [GitHub repository](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension/) to learn how. Once you have uploaded your own extension to Chrome Web Store, - * simply call `OpenVidu.setAdvancedConfiguration({screenShareChromeExtension : "https://chrome.google.com/webstore/detail/YOUR_EXTENSION_NAME/YOUR_EXTENSION_ID"})` before calling `OpenVidu.initPublisher(targetElement, {videoSource: "screen"})`. - * For Firefox `"screen"` string will ask for permissions to share the entire screen. To ask for a specific window or application, use `"window"` string instead (this only applies to Firefox). - * - A MediaStreamTrack obtained from a MediaStream object with [[OpenVidu.getUserMedia]] - * - `false` or null to have an audio-only publisher - * @default _Default camera_ - */ - videoSource?: string | MediaStreamTrack | boolean; - /** - * **WARNING**: experimental option. This property may change in the near future - * - * Define a filter to apply in the Publisher's stream - */ - filter?: Filter; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.js deleted file mode 100644 index 5bcedbdc..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=PublisherProperties.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.js.map deleted file mode 100644 index 36e3af67..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PublisherProperties.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Public/PublisherProperties.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.d.ts deleted file mode 100644 index deec6f00..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Connection } from '../../../OpenVidu/Connection'; -/** - * See [[Session.signal]] - */ -export interface SignalOptions { - /** - * The actual message of the signal. - */ - data?: string; - /** - * The participants to whom to send the signal. They will only receive it if they are subscribed to - * event `Session.on('signal')`. If empty or undefined, the signal will be send to all participants. - */ - to?: Connection[]; - /** - * The type of the signal. Participants subscribed to event `Session.on('signal:type')` will - * receive it. Participants subscribed to `Session.on('signal')` will receive all signals. - */ - type?: string; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.js deleted file mode 100644 index 3335268d..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=SignalOptions.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.js.map deleted file mode 100644 index 91e47aaf..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SignalOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SignalOptions.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Public/SignalOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.d.ts deleted file mode 100644 index 7d8c4e59..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { VideoInsertMode } from '../../Enums/VideoInsertMode'; -export interface StreamManagerVideo { - /** - * DOM video element displaying the StreamManager's stream - */ - video: HTMLVideoElement; - /** - * `id` attribute of the DOM video element displaying the StreamManager's stream - */ - id: string; - /** - * 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. - * - [[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. - * - [[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. - * - [[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. - * - [[StreamManager.addVideoElement]] has been called. - */ - insertMode?: VideoInsertMode; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.js deleted file mode 100644 index 1dc84706..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=StreamManagerVideo.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.js.map deleted file mode 100644 index 1fe8fe96..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StreamManagerVideo.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Public/StreamManagerVideo.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.d.ts b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.d.ts deleted file mode 100644 index 426c56c9..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { VideoInsertMode } from '../../Enums/VideoInsertMode'; -/** - * See [[Session.subscribe]] - */ -export interface SubscriberProperties { - /** - * How the video element of the subscriber should be inserted in the DOM - * @default VideoInsertMode.APPEND - */ - insertMode?: VideoInsertMode | string; - /** - * Whether to initially subscribe to the audio track of the stream or not. You can change the audio state later with [[Subscriber.subscribeToAudio]] - * @default true - */ - subscribeToAudio?: boolean; - /** - * Whether to initially subscribe to the video track of the stream or not. You can change the video state later with [[Subscriber.subscribeToVideo]] - * @default true - */ - subscribeToVideo?: boolean; -} diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.js b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.js deleted file mode 100644 index 5e7862d9..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.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. - * - */ -exports.__esModule = true; -//# sourceMappingURL=SubscriberProperties.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.js.map b/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.js.map deleted file mode 100644 index 6d240f4b..00000000 --- a/openvidu-browser/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubscriberProperties.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/Interfaces/Public/SubscriberProperties.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js deleted file mode 100644 index eb9736e7..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js +++ /dev/null @@ -1,45 +0,0 @@ -function Mapper() { - var sources = {}; - this.forEach = function (callback) { - for (var key in sources) { - var source = sources[key]; - for (var key2 in source) - callback(source[key2]); - } - ; - }; - this.get = function (id, source) { - var ids = sources[source]; - if (ids == undefined) - return undefined; - return ids[id]; - }; - this.remove = function (id, source) { - var ids = sources[source]; - if (ids == undefined) - return; - delete ids[id]; - for (var i in ids) { - return false; - } - delete sources[source]; - }; - this.set = function (value, id, source) { - if (value == undefined) - return this.remove(id, source); - var ids = sources[source]; - if (ids == undefined) - sources[source] = ids = {}; - ids[id] = value; - }; -} -; -Mapper.prototype.pop = function (id, source) { - var value = this.get(id, source); - if (value == undefined) - return undefined; - this.remove(id, source); - return value; -}; -module.exports = Mapper; -//# sourceMappingURL=Mapper.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js.map b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js.map deleted file mode 100644 index 03ae5a19..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Mapper.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js"],"names":[],"mappings":"AAAA,SAAS,MAAM;IAEb,IAAI,OAAO,GAAG,EAAE,CAAC;IAGjB,IAAI,CAAC,OAAO,GAAG,UAAS,QAAQ;QAE9B,KAAI,IAAI,GAAG,IAAI,OAAO,EACtB;YACE,IAAI,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YAE1B,KAAI,IAAI,IAAI,IAAI,MAAM;gBACpB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;SAC1B;QAAA,CAAC;IACJ,CAAC,CAAC;IAEF,IAAI,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,MAAM;QAE5B,IAAI,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC1B,IAAG,GAAG,IAAI,SAAS;YACjB,OAAO,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ib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js deleted file mode 100644 index 25761b27..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var JsonRpcClient = require('./jsonrpcclient'); -exports.JsonRpcClient = JsonRpcClient; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js.map b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js.map deleted file mode 100644 index 92359ee6..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js"],"names":[],"mappings":"AAiBA,IAAI,aAAa,GAAI,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAGhD,OAAO,CAAC,aAAa,GAAI,aAAa,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js deleted file mode 100644 index d68b2047..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js +++ /dev/null @@ -1,193 +0,0 @@ -var RpcBuilder = require('../'); -var WebSocketWithReconnection = require('./transports/webSocketWithReconnection'); -Date.now = Date.now || function () { - return +new Date; -}; -var PING_INTERVAL = 5000; -var RECONNECTING = 'RECONNECTING'; -var CONNECTED = 'CONNECTED'; -var DISCONNECTED = 'DISCONNECTED'; -var Logger = console; -function JsonRpcClient(configuration) { - var self = this; - var wsConfig = configuration.ws; - var notReconnectIfNumLessThan = -1; - var pingNextNum = 0; - var enabledPings = true; - var pingPongStarted = false; - var pingInterval; - var status = DISCONNECTED; - var onreconnecting = wsConfig.onreconnecting; - var onreconnected = wsConfig.onreconnected; - var onconnected = wsConfig.onconnected; - var onerror = wsConfig.onerror; - configuration.rpc.pull = function (params, request) { - request.reply(null, "push"); - }; - wsConfig.onreconnecting = function () { - Logger.debug("--------- ONRECONNECTING -----------"); - if (status === RECONNECTING) { - Logger.error("Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it"); - return; - } - status = RECONNECTING; - if (onreconnecting) { - onreconnecting(); - } - }; - wsConfig.onreconnected = function () { - Logger.debug("--------- ONRECONNECTED -----------"); - if (status === CONNECTED) { - Logger.error("Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it"); - return; - } - status = CONNECTED; - enabledPings = true; - updateNotReconnectIfLessThan(); - usePing(); - if (onreconnected) { - onreconnected(); - } - }; - wsConfig.onconnected = function () { - Logger.debug("--------- ONCONNECTED -----------"); - if (status === CONNECTED) { - Logger.error("Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it"); - return; - } - status = CONNECTED; - enabledPings = true; - usePing(); - if (onconnected) { - onconnected(); - } - }; - wsConfig.onerror = function (error) { - Logger.debug("--------- ONERROR -----------"); - status = DISCONNECTED; - if (onerror) { - onerror(error); - } - }; - var ws = new WebSocketWithReconnection(wsConfig); - Logger.debug('Connecting websocket to URI: ' + wsConfig.uri); - var rpcBuilderOptions = { - request_timeout: configuration.rpc.requestTimeout, - ping_request_timeout: configuration.rpc.heartbeatRequestTimeout - }; - var rpc = new RpcBuilder(RpcBuilder.packers.JsonRPC, rpcBuilderOptions, ws, function (request) { - Logger.debug('Received request: ' + JSON.stringify(request)); - try { - var func = configuration.rpc[request.method]; - if (func === undefined) { - Logger.error("Method " + request.method + " not registered in client"); - } - else { - func(request.params, request); - } - } - catch (err) { - Logger.error('Exception processing request: ' + JSON.stringify(request)); - Logger.error(err); - } - }); - this.send = function (method, params, callback) { - if (method !== 'ping') { - Logger.debug('Request: method:' + method + " params:" + JSON.stringify(params)); - } - var requestTime = Date.now(); - rpc.encode(method, params, function (error, result) { - if (error) { - try { - Logger.error("ERROR:" + error.message + " in Request: method:" + - method + " params:" + JSON.stringify(params) + " request:" + - error.request); - if (error.data) { - Logger.error("ERROR DATA:" + JSON.stringify(error.data)); - } - } - catch (e) { } - error.requestTime = requestTime; - } - if (callback) { - if (result != undefined && result.value !== 'pong') { - Logger.debug('Response: ' + JSON.stringify(result)); - } - callback(error, result); - } - }); - }; - function updateNotReconnectIfLessThan() { - Logger.debug("notReconnectIfNumLessThan = " + pingNextNum + ' (old=' + - notReconnectIfNumLessThan + ')'); - notReconnectIfNumLessThan = pingNextNum; - } - function sendPing() { - if (enabledPings) { - var params = null; - if (pingNextNum == 0 || pingNextNum == notReconnectIfNumLessThan) { - params = { - interval: configuration.heartbeat || PING_INTERVAL - }; - } - pingNextNum++; - self.send('ping', params, (function (pingNum) { - return function (error, result) { - if (error) { - Logger.debug("Error in ping request #" + pingNum + " (" + - error.message + ")"); - if (pingNum > notReconnectIfNumLessThan) { - enabledPings = false; - updateNotReconnectIfLessThan(); - Logger.debug("Server did not respond to ping message #" + - pingNum + ". Reconnecting... "); - ws.reconnectWs(); - } - } - }; - })(pingNextNum)); - } - else { - Logger.debug("Trying to send ping, but ping is not enabled"); - } - } - function usePing() { - if (!pingPongStarted) { - Logger.debug("Starting ping (if configured)"); - pingPongStarted = true; - if (configuration.heartbeat != undefined) { - pingInterval = setInterval(sendPing, configuration.heartbeat); - sendPing(); - } - } - } - this.close = function () { - Logger.debug("Closing jsonRpcClient explicitly by client"); - if (pingInterval != undefined) { - Logger.debug("Clearing ping interval"); - clearInterval(pingInterval); - } - pingPongStarted = false; - enabledPings = false; - if (configuration.sendCloseMessage) { - Logger.debug("Sending close message"); - this.send('closeSession', null, function (error, result) { - if (error) { - Logger.error("Error sending close message: " + JSON.stringify(error)); - } - ws.close(); - }); - } - else { - ws.close(); - } - }; - this.forceClose = function (millis) { - ws.forceClose(millis); - }; - this.reconnect = function () { - ws.reconnectWs(); - }; -} -module.exports = JsonRpcClient; -//# sourceMappingURL=jsonrpcclient.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js.map b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js.map deleted file mode 100644 index 77862d6f..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jsonrpcclient.js","sourceRoot":"","sources":["../../../../../src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js"],"names":[],"mappings":"AAiBA,IAAI,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAChC,IAAI,yBAAyB,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAElF,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI;IACnB,OAAO,CAAC,IAAI,IAAI,CAAC;AACrB,CAAC,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,CAAC;AAEzB,IAAI,YAAY,GAAG,cAAc,CAAC;AAClC,IAAI,SAAS,GAAG,WAAW,CAAC;AAC5B,IAAI,YAAY,GAAG,cAAc,CAAC;AAElC,IAAI,MAAM,GAAG,OAAO,CAAC;AAuBrB,SAAS,aAAa,CAAC,aAAa;IAEhC,IAAI,IAAI,GAAG,IAAI,CAAC;IAEhB,IAAI,QAAQ,GAAG,aAAa,CAAC,EAAE,CAAC;IAEhC,IAAI,yBAAyB,GAAG,CAAC,CAAC,CAAC;IAEnC,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,YAAY,GAAG,IAAI,CAAC;IACxB,IAAI,eAAe,GAAG,KAAK,CAAC;IAC5B,IAAI,YAAY,CAAC;IAEjB,IAAI,MAAM,GAAG,YAAY,CAAC;IAE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C,CAAC;gBAC9D,QAAQ,EAAE,CAAC;aACd;SACJ;IACL,CAAC;IAED,IAAI,CAAC,KAAK,GAAG;QACT,MAAM,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAE3D,IAAI,YAAY,IAAI,SAAS,EAAE;YAC3B,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;YACvC,aAAa,CAAC,YAAY,CAAC,CAAC;SAC/B;QACD,eAAe,GAAG,KAAK,CAAC;QACxB,YAAY,GAAG,KAAK,CAAC;QAErB,IAAI,aAAa,CAAC,gBAAgB,EAAE;YAChC,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;YACrC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,UAAS,KAAK,EAAE,MAAM;gBAClD,IAAI,KAAK,EAAE;oBACP,MAAM,CAAC,KAAK,CAAC,+BAA+B,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;iBACzE;gBACD,EAAE,CAAC,KAAK,EAAE,CAAC;YACf,CAAC,CAAC,CAAC;SACN;aAAM;YACZ,EAAE,CAAC,KAAK,EAAE,CAAC;SACL;IACL,CAAC,CAAA;IAGD,IAAI,CAAC,UAAU,GAAG,UAAS,MAAM;QAC7B,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC,CAAA;IAED,IAAI,CAAC,SAAS,GAAG;QACb,EAAE,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC,CAAA;AACL,CAAC;AAGD,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js deleted file mode 100644 index 8b802cbb..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var WebSocketWithReconnection = require('./webSocketWithReconnection'); -exports.WebSocketWithReconnection = WebSocketWithReconnection; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js.map b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js.map deleted file mode 100644 index 496a2b96..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js"],"names":[],"mappings":"AAiBA,IAAI,yBAAyB,GAAI,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAGxE,OAAO,CAAC,yBAAyB,GAAI,yBAAyB,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js deleted file mode 100644 index 4f4b6d2d..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js +++ /dev/null @@ -1,166 +0,0 @@ -"use strict"; -var BrowserWebSocket = global.WebSocket || global.MozWebSocket; -var Logger = console; -var MAX_RETRIES = 2000; -var RETRY_TIME_MS = 3000; -var CONNECTING = 0; -var OPEN = 1; -var CLOSING = 2; -var CLOSED = 3; -function WebSocketWithReconnection(config) { - var closing = false; - var registerMessageHandler; - var wsUri = config.uri; - var useSockJS = config.useSockJS; - var reconnecting = false; - var forcingDisconnection = false; - var ws; - if (useSockJS) { - ws = new SockJS(wsUri); - } - else { - ws = new WebSocket(wsUri); - } - ws.onopen = function () { - logConnected(ws, wsUri); - if (config.onconnected) { - config.onconnected(); - } - }; - ws.onerror = function (error) { - Logger.error("Could not connect to " + wsUri + " (invoking onerror if defined)", error); - if (config.onerror) { - config.onerror(error); - } - }; - function logConnected(ws, wsUri) { - try { - Logger.debug("WebSocket connected to " + wsUri); - } - catch (e) { - Logger.error(e); - } - } - var reconnectionOnClose = function () { - if (ws.readyState === CLOSED) { - if (closing) { - Logger.debug("Connection closed by user"); - } - else { - Logger.debug("Connection closed unexpectecly. Reconnecting..."); - reconnectToSameUri(MAX_RETRIES, 1); - } - } - else { - Logger.debug("Close callback from previous websocket. Ignoring it"); - } - }; - ws.onclose = reconnectionOnClose; - function reconnectToSameUri(maxRetries, numRetries) { - Logger.debug("reconnectToSameUri (attempt #" + numRetries + ", max=" + maxRetries + ")"); - if (numRetries === 1) { - if (reconnecting) { - Logger.warn("Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection."); - return; - } - else { - reconnecting = true; - } - if (config.onreconnecting) { - config.onreconnecting(); - } - } - if (forcingDisconnection) { - reconnectToNewUri(maxRetries, numRetries, wsUri); - } - else { - if (config.newWsUriOnReconnection) { - config.newWsUriOnReconnection(function (error, newWsUri) { - if (error) { - Logger.debug(error); - setTimeout(function () { - reconnectToSameUri(maxRetries, numRetries + 1); - }, RETRY_TIME_MS); - } - else { - reconnectToNewUri(maxRetries, numRetries, newWsUri); - } - }); - } - else { - reconnectToNewUri(maxRetries, numRetries, wsUri); - } - } - } - function reconnectToNewUri(maxRetries, numRetries, reconnectWsUri) { - Logger.debug("Reconnection attempt #" + numRetries); - ws.close(); - wsUri = reconnectWsUri || wsUri; - var newWs; - if (useSockJS) { - newWs = new SockJS(wsUri); - } - else { - newWs = new WebSocket(wsUri); - } - newWs.onopen = function () { - Logger.debug("Reconnected after " + numRetries + " attempts..."); - logConnected(newWs, wsUri); - reconnecting = false; - registerMessageHandler(); - if (config.onreconnected()) { - config.onreconnected(); - } - newWs.onclose = reconnectionOnClose; - }; - var onErrorOrClose = function (error) { - Logger.warn("Reconnection error: ", error); - if (numRetries === maxRetries) { - if (config.ondisconnect) { - config.ondisconnect(); - } - } - else { - setTimeout(function () { - reconnectToSameUri(maxRetries, numRetries + 1); - }, RETRY_TIME_MS); - } - }; - newWs.onerror = onErrorOrClose; - ws = newWs; - } - this.close = function () { - closing = true; - ws.close(); - }; - this.forceClose = function (millis) { - Logger.debug("Testing: Force WebSocket close"); - if (millis) { - Logger.debug("Testing: Change wsUri for " + millis + " millis to simulate net failure"); - var goodWsUri = wsUri; - wsUri = "wss://21.234.12.34.4:443/"; - forcingDisconnection = true; - setTimeout(function () { - Logger.debug("Testing: Recover good wsUri " + goodWsUri); - wsUri = goodWsUri; - forcingDisconnection = false; - }, millis); - } - ws.close(); - }; - this.reconnectWs = function () { - Logger.debug("reconnectWs"); - reconnectToSameUri(MAX_RETRIES, 1); - }; - this.send = function (message) { - ws.send(message); - }; - this.addEventListener = function (type, callback) { - registerMessageHandler = function () { - ws.addEventListener(type, callback); - }; - registerMessageHandler(); - }; -} -module.exports = WebSocketWithReconnection; -//# sourceMappingURL=webSocketWithReconnection.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js.map b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js.map deleted file mode 100644 index 094369c8..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webSocketWithReconnection.js","sourceRoot":"","sources":["../../../../../../src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js"],"names":[],"mappings":"AAgBA,YAAY,CAAC;AAEb,IAAI,gBAAgB,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC;AAE/D,IAAI,MAAM,GAAG,OAAO,CAAC;AAiBrB,IAAI,WAAW,GAAG,I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AE,CAAC;IAC7B,CAAC,CAAC;AACN,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,yBAAyB,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js deleted file mode 100644 index 38ae6e97..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js +++ /dev/null @@ -1,483 +0,0 @@ -var defineProperty_IE8 = false; -if (Object.defineProperty) { - try { - Object.defineProperty({}, "x", {}); - } - catch (e) { - defineProperty_IE8 = true; - } -} -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== 'function') { - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () { }, fBound = function () { - return fToBind.apply(this instanceof fNOP && oThis - ? this - : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); - }; - fNOP.prototype = this.prototype; - fBound.prototype = new fNOP(); - return fBound; - }; -} -var EventEmitter = require('events').EventEmitter; -var inherits = require('inherits'); -var packers = require('./packers'); -var Mapper = require('./Mapper'); -var BASE_TIMEOUT = 5000; -function unifyResponseMethods(responseMethods) { - if (!responseMethods) - return {}; - for (var key in responseMethods) { - var value = responseMethods[key]; - if (typeof value == 'string') - responseMethods[key] = - { - response: value - }; - } - ; - return responseMethods; -} -; -function unifyTransport(transport) { - if (!transport) - return; - if (transport instanceof Function) - return { send: transport }; - if (transport.send instanceof Function) - return transport; - if (transport.postMessage instanceof Function) { - transport.send = transport.postMessage; - return transport; - } - if (transport.write instanceof Function) { - transport.send = transport.write; - return transport; - } - if (transport.onmessage !== undefined) - return; - if (transport.pause instanceof Function) - return; - throw new SyntaxError("Transport is not a function nor a valid object"); -} -; -function RpcNotification(method, params) { - if (defineProperty_IE8) { - this.method = method; - this.params = params; - } - else { - Object.defineProperty(this, 'method', { value: method, enumerable: true }); - Object.defineProperty(this, 'params', { value: params, enumerable: true }); - } -} -; -function RpcBuilder(packer, options, transport, onRequest) { - var self = this; - if (!packer) - throw new SyntaxError('Packer is not defined'); - if (!packer.pack || !packer.unpack) - throw new SyntaxError('Packer is invalid'); - var responseMethods = unifyResponseMethods(packer.responseMethods); - if (options instanceof Function) { - if (transport != undefined) - throw new SyntaxError("There can't be parameters after onRequest"); - onRequest = options; - transport = undefined; - options = undefined; - } - ; - if (options && options.send instanceof Function) { - if (transport && !(transport instanceof Function)) - throw new SyntaxError("Only a function can be after transport"); - onRequest = transport; - transport = options; - options = undefined; - } - ; - if (transport instanceof Function) { - if (onRequest != undefined) - throw new SyntaxError("There can't be parameters after onRequest"); - onRequest = transport; - transport = undefined; - } - ; - if (transport && transport.send instanceof Function) - if (onRequest && !(onRequest instanceof Function)) - throw new SyntaxError("Only a function can be after transport"); - options = options || {}; - EventEmitter.call(this); - if (onRequest) - this.on('request', onRequest); - if (defineProperty_IE8) - this.peerID = options.peerID; - else - Object.defineProperty(this, 'peerID', { value: options.peerID }); - var max_retries = options.max_retries || 0; - function transportMessage(event) { - self.decode(event.data || event); - } - ; - this.getTransport = function () { - return transport; - }; - this.setTransport = function (value) { - if (transport) { - if (transport.removeEventListener) - transport.removeEventListener('message', transportMessage); - else if (transport.removeListener) - transport.removeListener('data', transportMessage); - } - ; - if (value) { - if (value.addEventListener) - value.addEventListener('message', transportMessage); - else if (value.addListener) - value.addListener('data', transportMessage); - } - ; - transport = unifyTransport(value); - }; - if (!defineProperty_IE8) - Object.defineProperty(this, 'transport', { - get: this.getTransport.bind(this), - set: this.setTransport.bind(this) - }); - this.setTransport(transport); - var request_timeout = options.request_timeout || BASE_TIMEOUT; - var ping_request_timeout = options.ping_request_timeout || request_timeout; - var response_timeout = options.response_timeout || BASE_TIMEOUT; - var duplicates_timeout = options.duplicates_timeout || BASE_TIMEOUT; - var requestID = 0; - var requests = new Mapper(); - var responses = new Mapper(); - var processedResponses = new Mapper(); - var message2Key = {}; - function storeResponse(message, id, dest) { - var response = { - message: message, - timeout: setTimeout(function () { - responses.remove(id, dest); - }, response_timeout) - }; - responses.set(response, id, dest); - } - ; - function storeProcessedResponse(ack, from) { - var timeout = setTimeout(function () { - processedResponses.remove(ack, from); - }, duplicates_timeout); - processedResponses.set(timeout, ack, from); - } - ; - function RpcRequest(method, params, id, from, transport) { - RpcNotification.call(this, method, params); - this.getTransport = function () { - return transport; - }; - this.setTransport = function (value) { - transport = unifyTransport(value); - }; - if (!defineProperty_IE8) - Object.defineProperty(this, 'transport', { - get: this.getTransport.bind(this), - set: this.setTransport.bind(this) - }); - var response = responses.get(id, from); - if (!(transport || self.getTransport())) { - if (defineProperty_IE8) - this.duplicated = Boolean(response); - else - Object.defineProperty(this, 'duplicated', { - value: Boolean(response) - }); - } - var responseMethod = responseMethods[method]; - this.pack = packer.pack.bind(packer, this, id); - this.reply = function (error, result, transport) { - if (error instanceof Function || error && error.send instanceof Function) { - if (result != undefined) - throw new SyntaxError("There can't be parameters after callback"); - transport = error; - result = null; - error = undefined; - } - else if (result instanceof Function - || result && result.send instanceof Function) { - if (transport != undefined) - throw new SyntaxError("There can't be parameters after callback"); - transport = result; - result = null; - } - ; - transport = unifyTransport(transport); - if (response) - clearTimeout(response.timeout); - if (from != undefined) { - if (error) - error.dest = from; - if (result) - result.dest = from; - } - ; - var message; - if (error || result != undefined) { - if (self.peerID != undefined) { - if (error) - error.from = self.peerID; - else - result.from = self.peerID; - } - if (responseMethod) { - if (responseMethod.error == undefined && error) - message = - { - error: error - }; - else { - var method = error - ? responseMethod.error - : responseMethod.response; - message = - { - method: method, - params: error || result - }; - } - } - else - message = - { - error: error, - result: result - }; - message = packer.pack(message, id); - } - else if (response) - message = response.message; - else - message = packer.pack({ result: null }, id); - storeResponse(message, id, from); - transport = transport || this.getTransport() || self.getTransport(); - if (transport) - return transport.send(message); - return message; - }; - } - ; - inherits(RpcRequest, RpcNotification); - function cancel(message) { - var key = message2Key[message]; - if (!key) - return; - delete message2Key[message]; - var request = requests.pop(key.id, key.dest); - if (!request) - return; - clearTimeout(request.timeout); - storeProcessedResponse(key.id, key.dest); - } - ; - this.cancel = function (message) { - if (message) - return cancel(message); - for (var message in message2Key) - cancel(message); - }; - this.close = function () { - var transport = this.getTransport(); - if (transport && transport.close) - transport.close(); - this.cancel(); - processedResponses.forEach(clearTimeout); - responses.forEach(function (response) { - clearTimeout(response.timeout); - }); - }; - this.encode = function (method, params, dest, transport, callback) { - if (params instanceof Function) { - if (dest != undefined) - throw new SyntaxError("There can't be parameters after callback"); - callback = params; - transport = undefined; - dest = undefined; - params = undefined; - } - else if (dest instanceof Function) { - if (transport != undefined) - throw new SyntaxError("There can't be parameters after callback"); - callback = dest; - transport = undefined; - dest = undefined; - } - else if (transport instanceof Function) { - if (callback != undefined) - throw new SyntaxError("There can't be parameters after callback"); - callback = transport; - transport = undefined; - } - ; - if (self.peerID != undefined) { - params = params || {}; - params.from = self.peerID; - } - ; - if (dest != undefined) { - params = params || {}; - params.dest = dest; - } - ; - var message = { - method: method, - params: params - }; - if (callback) { - var id = requestID++; - var retried = 0; - message = packer.pack(message, id); - function dispatchCallback(error, result) { - self.cancel(message); - callback(error, result); - } - ; - var request = { - message: message, - callback: dispatchCallback, - responseMethods: responseMethods[method] || {} - }; - var encode_transport = unifyTransport(transport); - function sendRequest(transport) { - var rt = (method === 'ping' ? ping_request_timeout : request_timeout); - request.timeout = setTimeout(timeout, rt * Math.pow(2, retried++)); - message2Key[message] = { id: id, dest: dest }; - requests.set(request, id, dest); - transport = transport || encode_transport || self.getTransport(); - if (transport) - return transport.send(message); - return message; - } - ; - function retry(transport) { - transport = unifyTransport(transport); - console.warn(retried + ' retry for request message:', message); - var timeout = processedResponses.pop(id, dest); - clearTimeout(timeout); - return sendRequest(transport); - } - ; - function timeout() { - if (retried < max_retries) - return retry(transport); - var error = new Error('Request has timed out'); - error.request = message; - error.retry = retry; - dispatchCallback(error); - } - ; - return sendRequest(transport); - } - ; - message = packer.pack(message); - transport = transport || this.getTransport(); - if (transport) - return transport.send(message); - return message; - }; - this.decode = function (message, transport) { - if (!message) - throw new TypeError("Message is not defined"); - try { - message = packer.unpack(message); - } - catch (e) { - return console.debug(e, message); - } - ; - var id = message.id; - var ack = message.ack; - var method = message.method; - var params = message.params || {}; - var from = params.from; - var dest = params.dest; - if (self.peerID != undefined && from == self.peerID) - return; - if (id == undefined && ack == undefined) { - var notification = new RpcNotification(method, params); - if (self.emit('request', notification)) - return; - return notification; - } - ; - function processRequest() { - transport = unifyTransport(transport) || self.getTransport(); - if (transport) { - var response = responses.get(id, from); - if (response) - return transport.send(response.message); - } - ; - var idAck = (id != undefined) ? id : ack; - var request = new RpcRequest(method, params, idAck, from, transport); - if (self.emit('request', request)) - return; - return request; - } - ; - function processResponse(request, error, result) { - request.callback(error, result); - } - ; - function duplicatedResponse(timeout) { - console.warn("Response already processed", message); - clearTimeout(timeout); - storeProcessedResponse(ack, from); - } - ; - if (method) { - if (dest == undefined || dest == self.peerID) { - var request = requests.get(ack, from); - if (request) { - var responseMethods = request.responseMethods; - if (method == responseMethods.error) - return processResponse(request, params); - if (method == responseMethods.response) - return processResponse(request, null, params); - return processRequest(); - } - var processed = processedResponses.get(ack, from); - if (processed) - return duplicatedResponse(processed); - } - return processRequest(); - } - ; - var error = message.error; - var result = message.result; - if (error && error.dest && error.dest != self.peerID) - return; - if (result && result.dest && result.dest != self.peerID) - return; - var request = requests.get(ack, from); - if (!request) { - var processed = processedResponses.get(ack, from); - if (processed) - return duplicatedResponse(processed); - return console.warn("No callback was defined for this message", message); - } - ; - processResponse(request, error, result); - }; -} -; -inherits(RpcBuilder, EventEmitter); -RpcBuilder.RpcNotification = RpcNotification; -module.exports = RpcBuilder; -var clients = require('./clients'); -var transports = require('./clients/transports'); -RpcBuilder.clients = clients; -RpcBuilder.clients.transports = transports; -RpcBuilder.packers = packers; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js.map b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js.map deleted file mode 100644 index ef75045e..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js"],"names":[],"mappings":"AAkBA,IAAI,kBAAkB,GAAG,KAAK,CAAA;AAC9B,IAAG,MAAM,CAAC,cAAc,EACxB;IACE,IACA;QACE,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;KACpC;IACD,OAAM,CAAC,EACP;QACE,kBAAkB,GAAG,IAAI,CAAA;KAC1B;CACF;AAGD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE;IAC5B,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,UAAS,KAAK;QACtC,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;YAG9B,MAAM,IAAI,SAAS,CAAC,sEAAsE,CAAC,CAAC;SAC7F;QAED,IAAI,KAAK,GAAK,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAClD,OAAO,GAAG,IAAI,EACd,IAAI,GAAM,cAAY,CAAC,EACvB,MAAM,GAAI;YACR,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,YAAY,IAAI,IAAI,KAAK;gBAC3C,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,KAAK,EACP,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC9D,CAAC,CAAC;QAEN,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,MAAM,CAAC,SAAS,GAAG,IA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KAAK,CAAC,IAAI,IAAK,KAAK,CAAC,IAAI,IAAK,IAAI,CAAC,MAAM;YAAE,OAAO;QAC/D,IAAG,MAAM,IAAI,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO;QAG/D,IAAI,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACtC,IAAG,CAAC,OAAO,EACX;YACE,IAAI,SAAS,GAAG,kBAAkB,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAClD,IAAG,SAAS;gBACV,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC;YAEvC,OAAO,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,OAAO,CAAC,CAAC;SAC1E;QAAA,CAAC;QAGF,eAAe,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC,CAAC;AACJ,CAAC;AAAA,CAAC;AACF,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AAGnC,UAAU,CAAC,eAAe,GAAG,eAAe,CAAC;AAG7C,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC;AAE5B,IAAI,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACnC,IAAI,UAAU,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAEjD,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;AAC7B,UAAU,CAAC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;AAC3C,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js deleted file mode 100644 index 6b4f7568..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js +++ /dev/null @@ -1,53 +0,0 @@ -function pack(message, id) { - var result = { - jsonrpc: "2.0" - }; - if (message.method) { - result.method = message.method; - if (message.params) - result.params = message.params; - if (id != undefined) - result.id = id; - } - else if (id != undefined) { - if (message.error) { - if (message.result !== undefined) - throw new TypeError("Both result and error are defined"); - result.error = message.error; - } - else if (message.result !== undefined) - result.result = message.result; - else - throw new TypeError("No result or error is defined"); - result.id = id; - } - ; - return JSON.stringify(result); -} -; -function unpack(message) { - var result = message; - if (typeof message === 'string' || message instanceof String) { - result = JSON.parse(message); - } - var version = result.jsonrpc; - if (version !== '2.0') - throw new TypeError("Invalid JsonRPC version '" + version + "': " + message); - if (result.method == undefined) { - if (result.id == undefined) - throw new TypeError("Invalid message: " + message); - var result_defined = result.result !== undefined; - var error_defined = result.error !== undefined; - if (result_defined && error_defined) - throw new TypeError("Both result and error are defined: " + message); - if (!result_defined && !error_defined) - throw new TypeError("No result or error is defined: " + message); - result.ack = result.id; - delete result.id; - } - return result; -} -; -exports.pack = pack; -exports.unpack = unpack; -//# sourceMappingURL=JsonRPC.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js.map b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js.map deleted file mode 100644 index 64fe59a7..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JsonRPC.js","sourceRoot":"","sources":["../../../../../src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js"],"names":[],"mappings":"AAYA,SAAS,IAAI,CAAC,OAAO,EAAE,EAAE;IAEvB,IAAI,MAAM,GACV;QACE,OAAO,EAAE,KAAK;KACf,CAAC;IAGF,IAAG,OAAO,CAAC,MAAM,EACjB;QACE,MAAM,CAAC,MAAM,GAAG,O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AI,cAAc,GAAG,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC;QACjD,IAAI,aAAa,GAAI,MAAM,CAAC,KAAK,KAAM,SAAS,CAAC;QAGjD,IAAG,cAAc,IAAI,aAAa;YAChC,MAAM,IAAI,SAAS,CAAC,qCAAqC,GAAC,OAAO,CAAC,CAAC;QAErE,IAAG,CAAC,cAAc,IAAI,CAAC,aAAa;YAClC,MAAM,IAAI,SAAS,CAAC,iCAAiC,GAAC,OAAO,CAAC,CAAC;QAEjE,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC;QACvB,OAAO,MAAM,CAAC,EAAE,CAAC;KAClB;IAGD,OAAO,MAAM,CAAC;AAChB,CAAC;AAAA,CAAC;AAGF,OAAO,CAAC,IAAI,GAAK,IAAI,CAAC;AACtB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js deleted file mode 100644 index e6b940f3..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js +++ /dev/null @@ -1,11 +0,0 @@ -function pack(message) { - throw new TypeError("Not yet implemented"); -} -; -function unpack(message) { - throw new TypeError("Not yet implemented"); -} -; -exports.pack = pack; -exports.unpack = unpack; -//# sourceMappingURL=XmlRPC.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js.map b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js.map deleted file mode 100644 index 0b3d331b..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"XmlRPC.js","sourceRoot":"","sources":["../../../../../src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js"],"names":[],"mappings":"AAAA,SAAS,IAAI,CAAC,OAAO;IAEnB,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAC;AAC7C,CAAC;AAAA,CAAC;AAEF,SAAS,MAAM,CAAC,OAAO;IAErB,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAC;AAC7C,CAAC;AAAA,CAAC;AAGF,OAAO,CAAC,IAAI,GAAK,IAAI,CAAC;AACtB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js deleted file mode 100644 index 5b7b3b84..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var JsonRPC = require('./JsonRPC'); -var XmlRPC = require('./XmlRPC'); -exports.JsonRPC = JsonRPC; -exports.XmlRPC = XmlRPC; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js.map b/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js.map deleted file mode 100644 index 23c76624..00000000 --- a/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js"],"names":[],"mappings":"AAAA,IAAI,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACnC,IAAI,MAAM,GAAI,OAAO,CAAC,UAAU,CAAC,CAAC;AAGlC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,MAAM,GAAI,MAAM,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js b/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js deleted file mode 100644 index b67e16bb..00000000 --- a/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js +++ /dev/null @@ -1,158 +0,0 @@ -window.getScreenId = function (firefoxString, callback, custom_parameter) { - if (navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveOrOpenBlob || !!navigator.msSaveBlob)) { - callback({ - video: true - }); - return; - } - if (!!navigator.mozGetUserMedia) { - callback(null, 'firefox', { - video: { - mozMediaSource: firefoxString, - mediaSource: firefoxString - } - }); - return; - } - window.addEventListener('message', onIFrameCallback); - function onIFrameCallback(event) { - if (!event.data) - return; - if (event.data.chromeMediaSourceId) { - if (event.data.chromeMediaSourceId === 'PermissionDeniedError') { - callback('permission-denied'); - } - else { - callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId, event.data.canRequestAudioTrack)); - } - window.removeEventListener('message', onIFrameCallback); - } - if (event.data.chromeExtensionStatus) { - callback(event.data.chromeExtensionStatus, null, getScreenConstraints(event.data.chromeExtensionStatus)); - window.removeEventListener('message', onIFrameCallback); - } - } - if (!custom_parameter) { - setTimeout(postGetSourceIdMessage, 100); - } - else { - setTimeout(function () { - postGetSourceIdMessage(custom_parameter); - }, 100); - } -}; -function getScreenConstraints(error, sourceId, canRequestAudioTrack) { - var screen_constraints = { - audio: false, - video: { - mandatory: { - chromeMediaSource: error ? 'screen' : 'desktop', - maxWidth: window.screen.width > 1920 ? window.screen.width : 1920, - maxHeight: window.screen.height > 1080 ? window.screen.height : 1080 - }, - optional: [] - } - }; - if (!!canRequestAudioTrack) { - screen_constraints.audio = { - mandatory: { - chromeMediaSource: error ? 'screen' : 'desktop', - }, - optional: [] - }; - } - if (sourceId) { - screen_constraints.video.mandatory.chromeMediaSourceId = sourceId; - if (screen_constraints.audio && screen_constraints.audio.mandatory) { - screen_constraints.audio.mandatory.chromeMediaSourceId = sourceId; - } - } - return screen_constraints; -} -function postGetSourceIdMessage(custom_parameter) { - if (!iframe) { - loadIFrame(function () { - postGetSourceIdMessage(custom_parameter); - }); - return; - } - if (!iframe.isLoaded) { - setTimeout(function () { - postGetSourceIdMessage(custom_parameter); - }, 100); - return; - } - if (!custom_parameter) { - iframe.contentWindow.postMessage({ - captureSourceId: true - }, '*'); - } - else if (!!custom_parameter.forEach) { - iframe.contentWindow.postMessage({ - captureCustomSourceId: custom_parameter - }, '*'); - } - else { - iframe.contentWindow.postMessage({ - captureSourceIdWithAudio: true - }, '*'); - } -} -var iframe; -window.getScreenConstraints = function (callback) { - loadIFrame(function () { - getScreenId(function (error, sourceId, screen_constraints) { - if (!screen_constraints) { - screen_constraints = { - video: true - }; - } - callback(error, screen_constraints.video); - }); - }); -}; -function loadIFrame(loadCallback) { - if (iframe) { - loadCallback(); - return; - } - iframe = document.createElement('iframe'); - iframe.onload = function () { - iframe.isLoaded = true; - loadCallback(); - }; - iframe.src = 'https://openvidu.github.io/openvidu-screen-sharing-chrome-extension/'; - iframe.style.display = 'none'; - (document.body || document.documentElement).appendChild(iframe); -} -window.getChromeExtensionStatus = function (callback) { - if (!!navigator.mozGetUserMedia) { - callback('installed-enabled'); - return; - } - window.addEventListener('message', onIFrameCallback); - function onIFrameCallback(event) { - if (!event.data) - return; - if (event.data.chromeExtensionStatus) { - callback(event.data.chromeExtensionStatus); - window.removeEventListener('message', onIFrameCallback); - } - } - setTimeout(postGetChromeExtensionStatusMessage, 100); -}; -function postGetChromeExtensionStatusMessage() { - if (!iframe) { - loadIFrame(postGetChromeExtensionStatusMessage); - return; - } - if (!iframe.isLoaded) { - setTimeout(postGetChromeExtensionStatusMessage, 100); - return; - } - iframe.contentWindow.postMessage({ - getChromeExtensionStatus: true - }, '*'); -} -exports.getScreenId = getScreenId; -//# sourceMappingURL=Screen-Capturing-Auto.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js.map b/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js.map deleted file mode 100644 index a2de05bf..00000000 --- a/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Screen-Capturing-Auto.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js"],"names":[],"mappings":"AAyBA,MAAM,CAAC,WAAW,GAAG,UAAU,aAAa,EAAE,QAAQ,EAAE,gBAAgB;IACpE,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE;QAExG,QAAQ,CAAC;YACL,KAAK,EAAE,IAAI;SACd,CAAC,CAAC;QACH,OAAO;KACV;IAKD,IAAI,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE;QAC7B,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE;YACtB,KAAK,EAAE;gBACH,cAAc,EAAE,aAAa;gBAC7B,WAAW,EAAE,aAAa;aAC7B;SACJ,CAAC,CAAC;QACH,OAAO;KACV;IAED,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IAErD,SAAS,gBAAgB,CAAC,KAAK;QAC3B,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,OAAO;QAExB,IAAI,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAChC,IAAI,KAAK,CAAC,IAAI,CAAC,mBAAmB,KAAK,uBAAuB,EAAE;gBAC5D,QAAQ,CAAC,mBAAmB,CAAC,CAAC;aACjC;iBAAM;gBACH,QAAQ,CAAC,IAAI,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,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YAG3C,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;SAC3D;IACL,CAAC;IAED,UAAU,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAC;AACzD,CAAC,CAAC;AAEF,SAAS,mCAAmC;IACxC,IAAI,CAAC,MAAM,EAAE;QACT,UAAU,CAAC,mCAAmC,CAAC,CAAC;QAChD,OAAO;KACV;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QAClB,UAAU,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAC;QACrD,OAAO;KACV;IAED,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC;QAC7B,wBAAwB,EAAE,IAAI;KACjC,EAAE,GAAG,CAAC,CAAC;AACZ,CAAC;AAED,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js b/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js deleted file mode 100644 index c565aaff..00000000 --- a/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js +++ /dev/null @@ -1,140 +0,0 @@ -var chromeMediaSource = 'screen'; -var sourceId; -var screenCallback; -var isFirefox = typeof window.InstallTrigger !== 'undefined'; -var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; -var isChrome = !!window.chrome && !isOpera; -window.addEventListener('message', function (event) { - if (event.origin != window.location.origin) { - return; - } - onMessageCallback(event.data); -}); -function onMessageCallback(data) { - if (data == 'PermissionDeniedError') { - if (screenCallback) - return screenCallback('PermissionDeniedError'); - else - throw new Error('PermissionDeniedError'); - } - if (data == 'rtcmulticonnection-extension-loaded') { - chromeMediaSource = 'desktop'; - } - if (data.sourceId && screenCallback) { - screenCallback(sourceId = data.sourceId, data.canRequestAudioTrack === true); - } -} -function isChromeExtensionAvailable(callback) { - if (!callback) - return; - if (chromeMediaSource == 'desktop') - return callback(true); - window.postMessage('are-you-there', '*'); - setTimeout(function () { - if (chromeMediaSource == 'screen') { - callback(false); - } - else - callback(true); - }, 2000); -} -function getSourceId(callback) { - if (!callback) - throw '"callback" parameter is mandatory.'; - if (sourceId) - return callback(sourceId); - screenCallback = callback; - window.postMessage('get-sourceId', '*'); -} -function getCustomSourceId(arr, callback) { - if (!arr || !arr.forEach) - throw '"arr" parameter is mandatory and it must be an array.'; - if (!callback) - throw '"callback" parameter is mandatory.'; - if (sourceId) - return callback(sourceId); - screenCallback = callback; - window.postMessage({ - 'get-custom-sourceId': arr - }, '*'); -} -function getSourceIdWithAudio(callback) { - if (!callback) - throw '"callback" parameter is mandatory.'; - if (sourceId) - return callback(sourceId); - screenCallback = callback; - window.postMessage('audio-plus-tab', '*'); -} -function getChromeExtensionStatus(extensionid, callback) { - if (isFirefox) - return callback('not-chrome'); - if (arguments.length != 2) { - callback = extensionid; - extensionid = 'lfcgfepafnobdloecchnfaclibenjold'; - } - var image = document.createElement('img'); - image.src = 'chrome-extension://' + extensionid + '/icon.png'; - image.onload = function () { - chromeMediaSource = 'screen'; - window.postMessage('are-you-there', '*'); - setTimeout(function () { - if (chromeMediaSource == 'screen') { - callback('installed-disabled'); - } - else - callback('installed-enabled'); - }, 2000); - }; - image.onerror = function () { - callback('not-installed'); - }; -} -function getScreenConstraintsWithAudio(callback) { - getScreenConstraints(callback, true); -} -function getScreenConstraints(callback, captureSourceIdWithAudio) { - sourceId = ''; - var firefoxScreenConstraints = { - mozMediaSource: 'window', - mediaSource: 'window' - }; - if (isFirefox) - return callback(null, firefoxScreenConstraints); - var screen_constraints = { - mandatory: { - chromeMediaSource: chromeMediaSource, - maxWidth: screen.width > 1920 ? screen.width : 1920, - maxHeight: screen.height > 1080 ? screen.height : 1080 - }, - optional: [] - }; - if (chromeMediaSource == 'desktop' && !sourceId) { - if (captureSourceIdWithAudio) { - getSourceIdWithAudio(function (sourceId, canRequestAudioTrack) { - screen_constraints.mandatory.chromeMediaSourceId = sourceId; - if (canRequestAudioTrack) { - screen_constraints.canRequestAudioTrack = true; - } - callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints); - }); - } - else { - getSourceId(function (sourceId) { - screen_constraints.mandatory.chromeMediaSourceId = sourceId; - callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints); - }); - } - return; - } - if (chromeMediaSource == 'desktop') { - screen_constraints.mandatory.chromeMediaSourceId = sourceId; - } - callback(null, screen_constraints); -} -exports.getScreenConstraints = getScreenConstraints; -exports.getScreenConstraintsWithAudio = getScreenConstraintsWithAudio; -exports.isChromeExtensionAvailable = isChromeExtensionAvailable; -exports.getChromeExtensionStatus = getChromeExtensionStatus; -exports.getSourceId = getSourceId; -//# sourceMappingURL=Screen-Capturing.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js.map b/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js.map deleted file mode 100644 index 3814d9b0..00000000 --- a/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Screen-Capturing.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/ScreenSharing/Screen-Capturing.js"],"names":[],"mappings":"AACA,IAAI,iBAAiB,GAAG,QAAQ,CAAC;AACjC,IAAI,QAAQ,CAAC;AACb,IAAI,cAAc,CAAC;AACnB,IAAI,SAAS,GAAG,OAAO,MAAM,CAAC,cAAc,KAAK,WAAW,CAAC;AAC7D,IAAI,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC1E,IAAI,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC;AAE3C,MAAM,CAAC,gBAAgB,CAA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C,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;YACxF,CAAC,CAAC,CAAC;SACN;aACI;YACD,WAAW,CAAC,UAAU,QAAQ;gBAC1B,kBAAkB,CAAC,SAAS,CAAC,mBAAmB,GAAG,QAAQ,CAAC;gBAC5D,QAAQ,CAAC,QAAQ,IAAI,uBAAuB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;YACxF,CAAC,CAAC,CAAC;SACN;QACD,OAAO;KACV;IAGD,IAAI,iBAAiB,IAAI,SAAS,EAAE;QAChC,kBAAkB,CAAC,SAAS,CAAC,mBAAmB,GAAG,QAAQ,CAAC;KAC/D;IAGD,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;AACvC,CAAC;AAED,OAAO,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;AACpD,OAAO,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;AACtE,OAAO,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;AAChE,OAAO,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;AAC5D,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.d.ts b/openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.d.ts deleted file mode 100644 index 40830cbb..00000000 --- a/openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -export interface WebRtcPeerConfiguration { - mediaConstraints: { - audio: boolean; - video: boolean; - }; - simulcast: boolean; - onicecandidate: (event: any) => void; - iceServers: RTCIceServer[] | undefined; - mediaStream?: MediaStream; - mode?: 'sendonly' | 'recvonly' | 'sendrecv'; - id?: string; -} -export declare class WebRtcPeer { - private configuration; - pc: RTCPeerConnection; - id: string; - remoteCandidatesQueue: RTCIceCandidate[]; - localCandidatesQueue: RTCIceCandidate[]; - iceCandidateList: RTCIceCandidate[]; - private candidategatheringdone; - constructor(configuration: WebRtcPeerConfiguration); - /** - * This function creates the RTCPeerConnection object taking into account the - * properties received in the constructor. It starts the SDP negotiation - * process: generates the SDP offer and invokes the onsdpoffer callback. This - * callback is expected to send the SDP offer, in order to obtain an SDP - * answer from another peer. - */ - start(): Promise; - /** - * This method frees the resources used by WebRtcPeer - */ - dispose(videoSourceIsMediaStreamTrack: boolean): void; - /** - * 1) Function that creates an offer, sets it as local description and returns the offer param - * to send to OpenVidu Server (will be the remote description of other peer) - */ - generateOffer(): Promise; - /** - * 2) Function to invoke when a SDP offer is received. Sets it as remote description, - * generates and answer and returns it to send it to OpenVidu Server - */ - processOffer(sdpOffer: string): Promise; - /** - * 3) Function invoked when a SDP answer is received. Final step in SDP negotiation, the peer - * just needs to set the answer as its remote description - */ - processAnswer(sdpAnswer: string, needsTimeoutOnProcessAswer: boolean): Promise; - /** - * Callback function invoked when an ICE candidate is received - */ - addIceCandidate(iceCandidate: RTCIceCandidate): Promise; -} -export declare class WebRtcPeerRecvonly extends WebRtcPeer { - constructor(configuration: WebRtcPeerConfiguration); -} -export declare class WebRtcPeerSendonly extends WebRtcPeer { - constructor(configuration: WebRtcPeerConfiguration); -} -export declare class WebRtcPeerSendrecv extends WebRtcPeer { - constructor(configuration: WebRtcPeerConfiguration); -} diff --git a/openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js b/openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js deleted file mode 100644 index 647db602..00000000 --- a/openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js +++ /dev/null @@ -1,339 +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. - * - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __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; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var freeice = require("freeice"); -var uuid = require("uuid"); -var platform = require("platform"); -platform['isIonicIos'] = (platform.product === 'iPhone' || platform.product === 'iPad') && platform.ua.indexOf('Safari') === -1; -var WebRtcPeer = /** @class */ (function () { - function WebRtcPeer(configuration) { - var _this = this; - this.configuration = configuration; - this.remoteCandidatesQueue = []; - this.localCandidatesQueue = []; - this.iceCandidateList = []; - this.candidategatheringdone = false; - this.configuration.iceServers = (!!this.configuration.iceServers && this.configuration.iceServers.length > 0) ? this.configuration.iceServers : freeice(); - this.pc = new RTCPeerConnection({ iceServers: this.configuration.iceServers }); - this.id = !!configuration.id ? configuration.id : uuid.v4(); - this.pc.onicecandidate = function (event) { - if (!!event.candidate) { - var candidate = event.candidate; - if (candidate) { - _this.localCandidatesQueue.push({ candidate: candidate.candidate }); - _this.candidategatheringdone = false; - _this.configuration.onicecandidate(event.candidate); - } - else if (!_this.candidategatheringdone) { - _this.candidategatheringdone = true; - } - } - }; - this.pc.onsignalingstatechange = function () { - if (_this.pc.signalingState === 'stable') { - while (_this.iceCandidateList.length > 0) { - _this.pc.addIceCandidate(_this.iceCandidateList.shift()); - } - } - }; - this.start(); - } - /** - * This function creates the RTCPeerConnection object taking into account the - * properties received in the constructor. It starts the SDP negotiation - * process: generates the SDP offer and invokes the onsdpoffer callback. This - * callback is expected to send the SDP offer, in order to obtain an SDP - * answer from another peer. - */ - WebRtcPeer.prototype.start = function () { - var _this = this; - return new Promise(function (resolve, reject) { - if (_this.pc.signalingState === 'closed') { - reject('The peer connection object is in "closed" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue'); - } - if (!!_this.configuration.mediaStream) { - if (platform['isIonicIos']) { - // iOS Ionic. LIMITATION: must use deprecated WebRTC API - var pc2 = _this.pc; - pc2.addStream(_this.configuration.mediaStream); - } - else { - for (var _i = 0, _a = _this.configuration.mediaStream.getTracks(); _i < _a.length; _i++) { - var track = _a[_i]; - _this.pc.addTrack(track, _this.configuration.mediaStream); - } - } - resolve(); - } - }); - }; - /** - * This method frees the resources used by WebRtcPeer - */ - WebRtcPeer.prototype.dispose = function (videoSourceIsMediaStreamTrack) { - console.debug('Disposing WebRtcPeer'); - try { - if (this.pc) { - if (this.pc.signalingState === 'closed') { - return; - } - this.remoteCandidatesQueue = []; - this.localCandidatesQueue = []; - if (platform['isIonicIos']) { - // iOS Ionic. LIMITATION: must use deprecated WebRTC API - // Stop senders deprecated - var pc1 = this.pc; - for (var _i = 0, _a = pc1.getLocalStreams(); _i < _a.length; _i++) { - var sender = _a[_i]; - if (!videoSourceIsMediaStreamTrack) { - sender.stop(); - } - pc1.removeStream(sender); - } - // Stop receivers deprecated - for (var _b = 0, _c = pc1.getRemoteStreams(); _b < _c.length; _b++) { - var receiver = _c[_b]; - if (!!receiver.track) { - receiver.stop(); - } - } - } - else { - // Stop senders - for (var _d = 0, _e = this.pc.getSenders(); _d < _e.length; _d++) { - var sender = _e[_d]; - if (!videoSourceIsMediaStreamTrack) { - if (!!sender.track) { - sender.track.stop(); - } - } - this.pc.removeTrack(sender); - } - // Stop receivers - for (var _f = 0, _g = this.pc.getReceivers(); _f < _g.length; _f++) { - var receiver = _g[_f]; - if (!!receiver.track) { - receiver.track.stop(); - } - } - } - this.pc.close(); - } - } - catch (err) { - console.warn('Exception disposing webrtc peer ' + err); - } - }; - /** - * 1) Function that creates an offer, sets it as local description and returns the offer param - * to send to OpenVidu Server (will be the remote description of other peer) - */ - WebRtcPeer.prototype.generateOffer = function () { - var _this = this; - return new Promise(function (resolve, reject) { - var offerAudio, offerVideo = true; - // Constraints must have both blocks - if (!!_this.configuration.mediaConstraints) { - offerAudio = (typeof _this.configuration.mediaConstraints.audio === 'boolean') ? - _this.configuration.mediaConstraints.audio : true; - offerVideo = (typeof _this.configuration.mediaConstraints.video === 'boolean') ? - _this.configuration.mediaConstraints.video : true; - } - var constraints = { - offerToReceiveAudio: (_this.configuration.mode !== 'sendonly' && offerAudio), - offerToReceiveVideo: (_this.configuration.mode !== 'sendonly' && offerVideo) - }; - console.debug('RTCPeerConnection constraints: ' + JSON.stringify(constraints)); - if (platform.name === 'Safari' && platform.ua.indexOf('Safari') !== -1) { - // Safari (excluding Ionic), at least on iOS just seems to support unified plan, whereas in other browsers is not yet ready and considered experimental - if (offerAudio) { - _this.pc.addTransceiver('audio', { - direction: _this.configuration.mode - }); - } - if (offerVideo) { - _this.pc.addTransceiver('video', { - direction: _this.configuration.mode - }); - } - _this.pc - .createOffer() - .then(function (offer) { - console.debug('Created SDP offer'); - return _this.pc.setLocalDescription(offer); - }) - .then(function () { - var localDescription = _this.pc.localDescription; - if (!!localDescription) { - console.debug('Local description set', localDescription.sdp); - resolve(localDescription.sdp); - } - else { - reject('Local description is not defined'); - } - })["catch"](function (error) { return reject(error); }); - } - else { - _this.pc.createOffer(constraints).then(function (offer) { - console.debug('Created SDP offer'); - return _this.pc.setLocalDescription(offer); - }).then(function () { - var localDescription = _this.pc.localDescription; - if (!!localDescription) { - console.debug('Local description set', localDescription.sdp); - resolve(localDescription.sdp); - } - else { - reject('Local description is not defined'); - } - })["catch"](function (error) { return reject(error); }); - } - }); - }; - /** - * 2) Function to invoke when a SDP offer is received. Sets it as remote description, - * generates and answer and returns it to send it to OpenVidu Server - */ - WebRtcPeer.prototype.processOffer = function (sdpOffer) { - var _this = this; - return new Promise(function (resolve, reject) { - var offer = { - type: 'offer', - sdp: sdpOffer - }; - console.debug('SDP offer received, setting remote description'); - if (_this.pc.signalingState === 'closed') { - reject('PeerConnection is closed'); - } - _this.pc.setRemoteDescription(offer) - .then(function () { - return _this.pc.createAnswer(); - }).then(function (answer) { - console.debug('Created SDP answer'); - return _this.pc.setLocalDescription(answer); - }).then(function () { - var localDescription = _this.pc.localDescription; - if (!!localDescription) { - console.debug('Local description set', localDescription.sdp); - resolve(localDescription.sdp); - } - else { - reject('Local description is not defined'); - } - })["catch"](function (error) { return reject(error); }); - }); - }; - /** - * 3) Function invoked when a SDP answer is received. Final step in SDP negotiation, the peer - * just needs to set the answer as its remote description - */ - WebRtcPeer.prototype.processAnswer = function (sdpAnswer, needsTimeoutOnProcessAswer) { - var _this = this; - return new Promise(function (resolve, reject) { - var answer = { - type: 'answer', - sdp: sdpAnswer - }; - console.debug('SDP answer received, setting remote description'); - if (_this.pc.signalingState === 'closed') { - reject('RTCPeerConnection is closed'); - } - if (needsTimeoutOnProcessAswer && platform['isIonicIos']) { - setTimeout(function () { - console.info('setRemoteDescription run after timout for iOS device'); - _this.pc.setRemoteDescription(answer).then(function () { return resolve(); })["catch"](function (error) { return reject(error); }); - }, 250); - } - else { - _this.pc.setRemoteDescription(answer).then(function () { return resolve(); })["catch"](function (error) { return reject(error); }); - } - }); - }; - /** - * Callback function invoked when an ICE candidate is received - */ - WebRtcPeer.prototype.addIceCandidate = function (iceCandidate) { - var _this = this; - return new Promise(function (resolve, reject) { - console.debug('Remote ICE candidate received', iceCandidate); - _this.remoteCandidatesQueue.push(iceCandidate); - switch (_this.pc.signalingState) { - case 'closed': - reject(new Error('PeerConnection object is closed')); - break; - case 'stable': - if (!!_this.pc.remoteDescription) { - _this.pc.addIceCandidate(iceCandidate).then(function () { return resolve(); })["catch"](function (error) { return reject(error); }); - } - break; - default: - _this.iceCandidateList.push(iceCandidate); - resolve(); - } - }); - }; - return WebRtcPeer; -}()); -exports.WebRtcPeer = WebRtcPeer; -var WebRtcPeerRecvonly = /** @class */ (function (_super) { - __extends(WebRtcPeerRecvonly, _super); - function WebRtcPeerRecvonly(configuration) { - var _this = this; - configuration.mode = 'recvonly'; - _this = _super.call(this, configuration) || this; - return _this; - } - return WebRtcPeerRecvonly; -}(WebRtcPeer)); -exports.WebRtcPeerRecvonly = WebRtcPeerRecvonly; -var WebRtcPeerSendonly = /** @class */ (function (_super) { - __extends(WebRtcPeerSendonly, _super); - function WebRtcPeerSendonly(configuration) { - var _this = this; - configuration.mode = 'sendonly'; - _this = _super.call(this, configuration) || this; - return _this; - } - return WebRtcPeerSendonly; -}(WebRtcPeer)); -exports.WebRtcPeerSendonly = WebRtcPeerSendonly; -var WebRtcPeerSendrecv = /** @class */ (function (_super) { - __extends(WebRtcPeerSendrecv, _super); - function WebRtcPeerSendrecv(configuration) { - var _this = this; - configuration.mode = 'sendrecv'; - _this = _super.call(this, configuration) || this; - return _this; - } - return WebRtcPeerSendrecv; -}(WebRtcPeer)); -exports.WebRtcPeerSendrecv = WebRtcPeerSendrecv; -//# sourceMappingURL=WebRtcPeer.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js.map b/openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js.map deleted file mode 100644 index e4711c95..00000000 --- a/openvidu-browser/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebRtcPeer.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/WebRtcPeer/WebRtcPeer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;AAEH,iCAAoC;AACpC,2BAA8B;AAC9B,mCAAsC;AACtC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,EAAI,C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,EAAE,CAAC;aACjB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAEL,iBAAC;AAAD,CAAC,AAxRD,IAwRC;AAxRY,gCAAU;AA2RvB;IAAwC,sCAAU;IAC9C,4BAAY,aAAsC;QAAlD,iBAGC;QAFG,aAAa,CAAC,IAAI,GAAG,UAAU,CAAC;QAChC,QAAA,kBAAM,aAAa,CAAC,SAAC;;IACzB,CAAC;IACL,yBAAC;AAAD,CAAC,AALD,CAAwC,UAAU,GAKjD;AALY,gDAAkB;AAO/B;IAAwC,sCAAU;IAC9C,4BAAY,aAAsC;QAAlD,iBAGC;QAFG,aAAa,CAAC,IAAI,GAAG,UAAU,CAAC;QAChC,QAAA,kBAAM,aAAa,CAAC,SAAC;;IACzB,CAAC;IACL,yBAAC;AAAD,CAAC,AALD,CAAwC,UAAU,GAKjD;AALY,gDAAkB;AAO/B;IAAwC,sCAAU;IAC9C,4BAAY,aAAsC;QAAlD,iBAGC;QAFG,aAAa,CAAC,IAAI,GAAG,UAAU,CAAC;QAChC,QAAA,kBAAM,aAAa,CAAC,SAAC;;IACzB,CAAC;IACL,yBAAC;AAAD,CAAC,AALD,CAAwC,UAAU,GAKjD;AALY,gDAAkB"} \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.d.ts b/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.d.ts deleted file mode 100644 index cc61f2f4..00000000 --- a/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Stream } from '../../OpenVidu/Stream'; -export declare class WebRtcStats { - private stream; - private webRtcStatsEnabled; - private webRtcStatsIntervalId; - private statsInterval; - private stats; - constructor(stream: Stream); - isEnabled(): boolean; - initWebRtcStats(): void; - stopWebRtcStats(): void; - getSelectedIceCandidateInfo(): Promise; - private sendStatsToHttpEndpoint; - private standardizeReport; - private getStatsAgnostic; -} diff --git a/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js b/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js deleted file mode 100644 index 86523a19..00000000 --- a/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js +++ /dev/null @@ -1,364 +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. - * - */ -exports.__esModule = true; -var platform = require("platform"); -var WebRtcStats = /** @class */ (function () { - function WebRtcStats(stream) { - this.stream = stream; - this.webRtcStatsEnabled = false; - this.statsInterval = 1; - this.stats = { - inbound: { - audio: { - bytesReceived: 0, - packetsReceived: 0, - packetsLost: 0 - }, - video: { - bytesReceived: 0, - packetsReceived: 0, - packetsLost: 0, - framesDecoded: 0, - nackCount: 0 - } - }, - outbound: { - audio: { - bytesSent: 0, - packetsSent: 0 - }, - video: { - bytesSent: 0, - packetsSent: 0, - framesEncoded: 0, - nackCount: 0 - } - } - }; - } - WebRtcStats.prototype.isEnabled = function () { - return this.webRtcStatsEnabled; - }; - WebRtcStats.prototype.initWebRtcStats = function () { - var _this = this; - var elastestInstrumentation = localStorage.getItem('elastest-instrumentation'); - if (!!elastestInstrumentation) { - // ElasTest instrumentation object found in local storage - console.warn('WebRtc stats enabled for stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId); - this.webRtcStatsEnabled = true; - var instrumentation_1 = JSON.parse(elastestInstrumentation); - this.statsInterval = instrumentation_1.webrtc.interval; // Interval in seconds - console.warn('localStorage item: ' + JSON.stringify(instrumentation_1)); - this.webRtcStatsIntervalId = setInterval(function () { - _this.sendStatsToHttpEndpoint(instrumentation_1); - }, this.statsInterval * 1000); - return; - } - console.debug('WebRtc stats not enabled'); - }; - WebRtcStats.prototype.stopWebRtcStats = function () { - if (this.webRtcStatsEnabled) { - clearInterval(this.webRtcStatsIntervalId); - console.warn('WebRtc stats stopped for disposed stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId); - } - }; - WebRtcStats.prototype.getSelectedIceCandidateInfo = function () { - var _this = this; - return new Promise(function (resolve, reject) { - _this.getStatsAgnostic(_this.stream.getRTCPeerConnection(), function (stats) { - if ((platform.name.indexOf('Chrome') !== -1) || (platform.name.indexOf('Opera') !== -1)) { - var localCandidateId = void 0, remoteCandidateId = void 0, googCandidatePair = void 0; - var localCandidates = {}; - var remoteCandidates = {}; - for (var key in stats) { - var stat = stats[key]; - if (stat.type === 'localcandidate') { - localCandidates[stat.id] = stat; - } - else if (stat.type === 'remotecandidate') { - remoteCandidates[stat.id] = stat; - } - else if (stat.type === 'googCandidatePair' && (stat.googActiveConnection === 'true')) { - googCandidatePair = stat; - localCandidateId = stat.localCandidateId; - remoteCandidateId = stat.remoteCandidateId; - } - } - var finalLocalCandidate_1 = localCandidates[localCandidateId]; - if (!!finalLocalCandidate_1) { - var candList = _this.stream.getLocalIceCandidateList(); - var cand = candList.filter(function (c) { - return (!!c.candidate && - c.candidate.indexOf(finalLocalCandidate_1.ipAddress) >= 0 && - c.candidate.indexOf(finalLocalCandidate_1.portNumber) >= 0 && - c.candidate.indexOf(finalLocalCandidate_1.priority) >= 0); - }); - finalLocalCandidate_1.raw = !!cand[0] ? cand[0].candidate : 'ERROR: Cannot find local candidate in list of sent ICE candidates'; - } - else { - finalLocalCandidate_1 = 'ERROR: No active local ICE candidate. Probably ICE-TCP is being used'; - } - var finalRemoteCandidate_1 = remoteCandidates[remoteCandidateId]; - if (!!finalRemoteCandidate_1) { - var candList = _this.stream.getRemoteIceCandidateList(); - var cand = candList.filter(function (c) { - return (!!c.candidate && - c.candidate.indexOf(finalRemoteCandidate_1.ipAddress) >= 0 && - c.candidate.indexOf(finalRemoteCandidate_1.portNumber) >= 0 && - c.candidate.indexOf(finalRemoteCandidate_1.priority) >= 0); - }); - finalRemoteCandidate_1.raw = !!cand[0] ? cand[0].candidate : 'ERROR: Cannot find remote candidate in list of received ICE candidates'; - } - else { - finalRemoteCandidate_1 = 'ERROR: No active remote ICE candidate. Probably ICE-TCP is being used'; - } - resolve({ - googCandidatePair: googCandidatePair, - localCandidate: finalLocalCandidate_1, - remoteCandidate: finalRemoteCandidate_1 - }); - } - else { - reject('Selected ICE candidate info only available for Chrome'); - } - }, function (error) { - reject(error); - }); - }); - }; - WebRtcStats.prototype.sendStatsToHttpEndpoint = function (instrumentation) { - var _this = this; - var sendPost = function (json) { - var http = new XMLHttpRequest(); - var url = instrumentation.webrtc.httpEndpoint; - http.open('POST', url, true); - http.setRequestHeader('Content-type', 'application/json'); - http.onreadystatechange = function () { - if (http.readyState === 4 && http.status === 200) { - console.log('WebRtc stats successfully sent to ' + url + ' for stream ' + _this.stream.streamId + ' of connection ' + _this.stream.connection.connectionId); - } - }; - http.send(json); - }; - var f = function (stats) { - if (platform.name.indexOf('Firefox') !== -1) { - stats.forEach(function (stat) { - var json = {}; - if ((stat.type === 'inbound-rtp') && - ( - // Avoid firefox empty outbound-rtp statistics - stat.nackCount !== null && - stat.isRemote === false && - stat.id.startsWith('inbound') && - stat.remoteId.startsWith('inbound'))) { - var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc; - var jit = stat.jitter * 1000; - var metrics = { - bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval, - jitter: jit, - packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval, - packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval - }; - var units = { - bytesReceived: 'bytes', - jitter: 'ms', - packetsReceived: 'packets', - packetsLost: 'packets' - }; - if (stat.mediaType === 'video') { - metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval; - metrics['nackCount'] = (stat.nackCount - _this.stats.inbound.video.nackCount) / _this.statsInterval; - units['framesDecoded'] = 'frames'; - units['nackCount'] = 'packets'; - _this.stats.inbound.video.framesDecoded = stat.framesDecoded; - _this.stats.inbound.video.nackCount = stat.nackCount; - } - _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived; - _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived; - _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost; - json = { - '@timestamp': new Date(stat.timestamp).toISOString(), - 'exec': instrumentation.exec, - 'component': instrumentation.component, - 'stream': 'webRtc', - 'type': metricId, - 'stream_type': 'composed_metrics', - 'units': units - }; - json[metricId] = metrics; - sendPost(JSON.stringify(json)); - } - else if ((stat.type === 'outbound-rtp') && - ( - // Avoid firefox empty inbound-rtp statistics - stat.isRemote === false && - stat.id.toLowerCase().includes('outbound'))) { - var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc; - var metrics = { - bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval, - packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval - }; - var units = { - bytesSent: 'bytes', - packetsSent: 'packets' - }; - if (stat.mediaType === 'video') { - metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval; - units['framesEncoded'] = 'frames'; - _this.stats.outbound.video.framesEncoded = stat.framesEncoded; - } - _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent; - _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent; - json = { - '@timestamp': new Date(stat.timestamp).toISOString(), - 'exec': instrumentation.exec, - 'component': instrumentation.component, - 'stream': 'webRtc', - 'type': metricId, - 'stream_type': 'composed_metrics', - 'units': units - }; - json[metricId] = metrics; - sendPost(JSON.stringify(json)); - } - }); - } - else if ((platform.name.indexOf('Chrome') !== -1) || (platform.name.indexOf('Opera') !== -1)) { - for (var _i = 0, _a = Object.keys(stats); _i < _a.length; _i++) { - var key = _a[_i]; - var stat = stats[key]; - if (stat.type === 'ssrc') { - var json = {}; - if ('bytesReceived' in stat && ((stat.mediaType === 'audio' && 'audioOutputLevel' in stat) || - (stat.mediaType === 'video' && 'qpSum' in stat))) { - // inbound-rtp - var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc; - var metrics = { - bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval, - jitter: stat.googJitterBufferMs, - packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval, - packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval - }; - var units = { - bytesReceived: 'bytes', - jitter: 'ms', - packetsReceived: 'packets', - packetsLost: 'packets' - }; - if (stat.mediaType === 'video') { - metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval; - metrics['nackCount'] = (stat.googNacksSent - _this.stats.inbound.video.nackCount) / _this.statsInterval; - units['framesDecoded'] = 'frames'; - units['nackCount'] = 'packets'; - _this.stats.inbound.video.framesDecoded = stat.framesDecoded; - _this.stats.inbound.video.nackCount = stat.googNacksSent; - } - _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived; - _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived; - _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost; - json = { - '@timestamp': new Date(stat.timestamp).toISOString(), - 'exec': instrumentation.exec, - 'component': instrumentation.component, - 'stream': 'webRtc', - 'type': metricId, - 'stream_type': 'composed_metrics', - 'units': units - }; - json[metricId] = metrics; - sendPost(JSON.stringify(json)); - } - else if ('bytesSent' in stat) { - // outbound-rtp - var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc; - var metrics = { - bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval, - packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval - }; - var units = { - bytesSent: 'bytes', - packetsSent: 'packets' - }; - if (stat.mediaType === 'video') { - metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval; - units['framesEncoded'] = 'frames'; - _this.stats.outbound.video.framesEncoded = stat.framesEncoded; - } - _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent; - _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent; - json = { - '@timestamp': new Date(stat.timestamp).toISOString(), - 'exec': instrumentation.exec, - 'component': instrumentation.component, - 'stream': 'webRtc', - 'type': metricId, - 'stream_type': 'composed_metrics', - 'units': units - }; - json[metricId] = metrics; - sendPost(JSON.stringify(json)); - } - } - } - } - }; - this.getStatsAgnostic(this.stream.getRTCPeerConnection(), f, function (error) { console.log(error); }); - }; - WebRtcStats.prototype.standardizeReport = function (response) { - console.log(response); - var standardReport = {}; - if (platform.name.indexOf('Firefox') !== -1) { - Object.keys(response).forEach(function (key) { - console.log(response[key]); - }); - return response; - } - response.result().forEach(function (report) { - var standardStats = { - id: report.id, - timestamp: report.timestamp, - type: report.type - }; - report.names().forEach(function (name) { - standardStats[name] = report.stat(name); - }); - standardReport[standardStats.id] = standardStats; - }); - return standardReport; - }; - WebRtcStats.prototype.getStatsAgnostic = function (pc, successCb, failureCb) { - var _this = this; - if (platform.name.indexOf('Firefox') !== -1) { - // getStats takes args in different order in Chrome and Firefox - return pc.getStats(null).then(function (response) { - var report = _this.standardizeReport(response); - successCb(report); - })["catch"](failureCb); - } - else if ((platform.name.indexOf('Chrome') !== -1) || (platform.name.indexOf('Opera') !== -1)) { - // In Chrome, the first two arguments are reversed - return pc.getStats(function (response) { - var report = _this.standardizeReport(response); - successCb(report); - }, null, failureCb); - } - }; - return WebRtcStats; -}()); -exports.WebRtcStats = WebRtcStats; -//# sourceMappingURL=WebRtcStats.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js.map b/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js.map deleted file mode 100644 index b68ccb0b..00000000 --- a/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebRtcStats.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/WebRtcStats/WebRtcStats.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAKH,mCAAsC;AAEtC;IAkCI,qBAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAhC1B,uBAAkB,GAAG,KAAK,CAAC;QAE3B,kBAAa,GAAG,CAAC,CAAC;QAClB,UAAK,GAAQ;YACjB,OAAO,EAAE;gBACL,KAAK,EAAE;oBACH,aAAa,EAAE,CAAC;oBAChB,eAAe,EAAE,CAAC;oBAClB,WAAW,EAAE,CAAC;iBACjB;gBACD,KAAK,EAAE;oBACH,aAAa,EAAE,CAAC;oBAChB,eAAe,EAAE,CAAC;oBAClB,WAAW,EAAE,CAAC;oBACd,aAAa,EAAE,CAAC;oBAChB,SAAS,EAAE,CAAC;iBACf;aACJ;YACD,QAAQ,EAAE;gBACN,KAAK,EAAE;oBACH,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,CAAC;iBACjB;gBACD,KAAK,EAAE;oBACH,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,CAAC;oBACd,aAAa,EAAE,CAAC;oBAChB,SAAS,EAAE,CAAC;iBACf;aACJ;SACJ,CAAC;IAEoC,CAAC;IAEhC,+BAAS,GAAhB;QACI,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAEM,qCAAe,GAAtB;QAAA,iBAwBC;QAtBG,IAAM,uBAAuB,GAAG,YAAY,CAAC,OAAO,C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IAEO,sCAAgB,GAAxB,UAAyB,EAAE,EAAE,SAAS,EAAE,SAAS;QAAjD,iBAcC;QAbG,IAAI,QAAQ,CAAC,IAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE;YAC1C,+DAA+D;YAC/D,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAA,QAAQ;gBAClC,IAAM,MAAM,GAAG,KAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBAChD,SAAS,CAAC,MAAM,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC,OAAK,CAAA,CAAC,SAAS,CAAC,CAAC;SACvB;aAAM,IAAI,CAAC,QAAQ,CAAC,IAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAC9F,kDAAkD;YAClD,OAAO,EAAE,CAAC,QAAQ,CAAC,UAAC,QAAQ;gBACxB,IAAM,MAAM,GAAG,KAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBAChD,SAAS,CAAC,MAAM,CAAC,CAAC;YACtB,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;SACvB;IACL,CAAC;IAEL,kBAAC;AAAD,CAAC,AArYD,IAqYC;AArYY,kCAAW"} \ No newline at end of file diff --git a/openvidu-browser/lib/index.d.ts b/openvidu-browser/lib/index.d.ts deleted file mode 100644 index 2b332646..00000000 --- a/openvidu-browser/lib/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export { OpenVidu } from './OpenVidu/OpenVidu'; -export { Session } from './OpenVidu/Session'; -export { Publisher } from './OpenVidu/Publisher'; -export { Subscriber } from './OpenVidu/Subscriber'; -export { StreamManager } from './OpenVidu/StreamManager'; -export { Stream } from './OpenVidu/Stream'; -export { Connection } from './OpenVidu/Connection'; -export { LocalRecorder } from './OpenVidu/LocalRecorder'; -export { Filter } from './OpenVidu/Filter'; -export { LocalRecorderState } from './OpenViduInternal/Enums/LocalRecorderState'; -export { OpenViduError } from './OpenViduInternal/Enums/OpenViduError'; -export { VideoInsertMode } from './OpenViduInternal/Enums/VideoInsertMode'; -export { Event } from './OpenViduInternal/Events/Event'; -export { ConnectionEvent } from './OpenViduInternal/Events/ConnectionEvent'; -export { PublisherSpeakingEvent } from './OpenViduInternal/Events/PublisherSpeakingEvent'; -export { RecordingEvent } from './OpenViduInternal/Events/RecordingEvent'; -export { SessionDisconnectedEvent } from './OpenViduInternal/Events/SessionDisconnectedEvent'; -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 { FilterEvent } from './OpenViduInternal/Events/FilterEvent'; -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'; -export { PublisherProperties } from './OpenViduInternal/Interfaces/Public/PublisherProperties'; -export { SignalOptions } from './OpenViduInternal/Interfaces/Public/SignalOptions'; -export { StreamManagerVideo } from './OpenViduInternal/Interfaces/Public/StreamManagerVideo'; -export { SubscriberProperties } from './OpenViduInternal/Interfaces/Public/SubscriberProperties'; diff --git a/openvidu-browser/lib/index.js b/openvidu-browser/lib/index.js deleted file mode 100644 index 853a8a00..00000000 --- a/openvidu-browser/lib/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -exports.__esModule = true; -var OpenVidu_1 = require("./OpenVidu/OpenVidu"); -exports.OpenVidu = OpenVidu_1.OpenVidu; -var Session_1 = require("./OpenVidu/Session"); -exports.Session = Session_1.Session; -var Publisher_1 = require("./OpenVidu/Publisher"); -exports.Publisher = Publisher_1.Publisher; -var Subscriber_1 = require("./OpenVidu/Subscriber"); -exports.Subscriber = Subscriber_1.Subscriber; -var StreamManager_1 = require("./OpenVidu/StreamManager"); -exports.StreamManager = StreamManager_1.StreamManager; -var Stream_1 = require("./OpenVidu/Stream"); -exports.Stream = Stream_1.Stream; -var Connection_1 = require("./OpenVidu/Connection"); -exports.Connection = Connection_1.Connection; -var LocalRecorder_1 = require("./OpenVidu/LocalRecorder"); -exports.LocalRecorder = LocalRecorder_1.LocalRecorder; -var Filter_1 = require("./OpenVidu/Filter"); -exports.Filter = Filter_1.Filter; -var LocalRecorderState_1 = require("./OpenViduInternal/Enums/LocalRecorderState"); -exports.LocalRecorderState = LocalRecorderState_1.LocalRecorderState; -var OpenViduError_1 = require("./OpenViduInternal/Enums/OpenViduError"); -exports.OpenViduError = OpenViduError_1.OpenViduError; -var VideoInsertMode_1 = require("./OpenViduInternal/Enums/VideoInsertMode"); -exports.VideoInsertMode = VideoInsertMode_1.VideoInsertMode; -var Event_1 = require("./OpenViduInternal/Events/Event"); -exports.Event = Event_1.Event; -var ConnectionEvent_1 = require("./OpenViduInternal/Events/ConnectionEvent"); -exports.ConnectionEvent = ConnectionEvent_1.ConnectionEvent; -var PublisherSpeakingEvent_1 = require("./OpenViduInternal/Events/PublisherSpeakingEvent"); -exports.PublisherSpeakingEvent = PublisherSpeakingEvent_1.PublisherSpeakingEvent; -var RecordingEvent_1 = require("./OpenViduInternal/Events/RecordingEvent"); -exports.RecordingEvent = RecordingEvent_1.RecordingEvent; -var SessionDisconnectedEvent_1 = require("./OpenViduInternal/Events/SessionDisconnectedEvent"); -exports.SessionDisconnectedEvent = SessionDisconnectedEvent_1.SessionDisconnectedEvent; -var SignalEvent_1 = require("./OpenViduInternal/Events/SignalEvent"); -exports.SignalEvent = SignalEvent_1.SignalEvent; -var StreamEvent_1 = require("./OpenViduInternal/Events/StreamEvent"); -exports.StreamEvent = StreamEvent_1.StreamEvent; -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; -var FilterEvent_1 = require("./OpenViduInternal/Events/FilterEvent"); -exports.FilterEvent = FilterEvent_1.FilterEvent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/openvidu-browser/lib/index.js.map b/openvidu-browser/lib/index.js.map deleted file mode 100644 index fad0ff83..00000000 --- a/openvidu-browser/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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;AACtB,4CAA2C;AAAlC,0BAAA,MAAM,CAAA;AAEf,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;AACnC,qEAAoE;AAA3D,oCAAA,WAAW,CAAA"} \ No newline at end of file