openvidu-browser 2.23.0 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/OpenVidu/Connection.d.ts +5 -5
- package/lib/OpenVidu/Connection.js +22 -19
- package/lib/OpenVidu/Connection.js.map +1 -1
- package/lib/OpenVidu/EventDispatcher.d.ts +1 -1
- package/lib/OpenVidu/EventDispatcher.js +5 -5
- package/lib/OpenVidu/EventDispatcher.js.map +1 -1
- package/lib/OpenVidu/Filter.d.ts +3 -3
- package/lib/OpenVidu/Filter.js +2 -2
- package/lib/OpenVidu/LocalRecorder.d.ts +11 -11
- package/lib/OpenVidu/LocalRecorder.js +11 -11
- package/lib/OpenVidu/OpenVidu.d.ts +19 -10
- package/lib/OpenVidu/OpenVidu.js +29 -16
- package/lib/OpenVidu/OpenVidu.js.map +1 -1
- package/lib/OpenVidu/Publisher.d.ts +19 -19
- package/lib/OpenVidu/Publisher.js +21 -21
- package/lib/OpenVidu/Publisher.js.map +1 -1
- package/lib/OpenVidu/Session.d.ts +84 -44
- package/lib/OpenVidu/Session.js +141 -51
- package/lib/OpenVidu/Session.js.map +1 -1
- package/lib/OpenVidu/Stream.d.ts +19 -19
- package/lib/OpenVidu/Stream.js +37 -41
- package/lib/OpenVidu/Stream.js.map +1 -1
- package/lib/OpenVidu/StreamManager.d.ts +18 -18
- package/lib/OpenVidu/StreamManager.js +12 -12
- package/lib/OpenVidu/Subscriber.d.ts +2 -2
- package/lib/OpenVidu/Subscriber.js +2 -2
- package/lib/OpenViduInternal/Enums/OpenViduError.d.ts +20 -20
- package/lib/OpenViduInternal/Enums/OpenViduError.js +20 -20
- package/lib/OpenViduInternal/Enums/VideoInsertMode.d.ts +1 -1
- package/lib/OpenViduInternal/Enums/VideoInsertMode.js +1 -1
- package/lib/OpenViduInternal/Events/ConnectionEvent.d.ts +5 -4
- package/lib/OpenViduInternal/Events/ConnectionEvent.js +2 -2
- package/lib/OpenViduInternal/Events/ConnectionEvent.js.map +1 -1
- package/lib/OpenViduInternal/Events/ConnectionPropertyChangedEvent.d.ts +6 -2
- package/lib/OpenViduInternal/Events/ConnectionPropertyChangedEvent.js +6 -2
- package/lib/OpenViduInternal/Events/ConnectionPropertyChangedEvent.js.map +1 -1
- package/lib/OpenViduInternal/Events/Event.d.ts +11 -11
- package/lib/OpenViduInternal/Events/Event.js +9 -9
- package/lib/OpenViduInternal/Events/EventMap/PublisherEventMap.d.ts +7 -7
- package/lib/OpenViduInternal/Events/EventMap/SessionEventMap.d.ts +37 -18
- package/lib/OpenViduInternal/Events/EventMap/StreamManagerEventMap.d.ts +9 -9
- package/lib/OpenViduInternal/Events/ExceptionEvent.d.ts +23 -15
- package/lib/OpenViduInternal/Events/ExceptionEvent.js +18 -10
- package/lib/OpenViduInternal/Events/ExceptionEvent.js.map +1 -1
- package/lib/OpenViduInternal/Events/FilterEvent.d.ts +1 -1
- package/lib/OpenViduInternal/Events/FilterEvent.js +1 -1
- package/lib/OpenViduInternal/Events/NetworkQualityLevelChangedEvent.d.ts +1 -1
- package/lib/OpenViduInternal/Events/NetworkQualityLevelChangedEvent.js +1 -1
- package/lib/OpenViduInternal/Events/RecordingEvent.d.ts +6 -5
- package/lib/OpenViduInternal/Events/RecordingEvent.js +2 -2
- package/lib/OpenViduInternal/Events/RecordingEvent.js.map +1 -1
- package/lib/OpenViduInternal/Events/SessionDisconnectedEvent.d.ts +4 -3
- package/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js +1 -1
- package/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js.map +1 -1
- package/lib/OpenViduInternal/Events/SignalEvent.d.ts +3 -3
- package/lib/OpenViduInternal/Events/SignalEvent.js +1 -1
- package/lib/OpenViduInternal/Events/SpeechToTextEvent.d.ts +39 -0
- package/lib/OpenViduInternal/Events/SpeechToTextEvent.js +61 -0
- package/lib/OpenViduInternal/Events/SpeechToTextEvent.js.map +1 -0
- package/lib/OpenViduInternal/Events/StreamEvent.d.ts +3 -2
- package/lib/OpenViduInternal/Events/StreamEvent.js.map +1 -1
- package/lib/OpenViduInternal/Events/StreamManagerEvent.d.ts +2 -2
- package/lib/OpenViduInternal/Events/StreamManagerEvent.js +2 -2
- package/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.d.ts +8 -5
- package/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.js.map +1 -1
- package/lib/OpenViduInternal/Events/Types/Types.d.ts +6 -0
- package/lib/OpenViduInternal/Events/Types/Types.js +3 -0
- package/lib/OpenViduInternal/Events/Types/Types.js.map +1 -0
- package/lib/OpenViduInternal/Events/VideoElementEvent.d.ts +2 -2
- package/lib/OpenViduInternal/Events/VideoElementEvent.js +2 -2
- package/lib/OpenViduInternal/Interfaces/Public/Capabilities.d.ts +5 -5
- package/lib/OpenViduInternal/Interfaces/Public/Device.d.ts +4 -4
- package/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.d.ts +5 -5
- package/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.d.ts +7 -7
- package/lib/OpenViduInternal/Interfaces/Public/SignalOptions.d.ts +1 -1
- package/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.d.ts +8 -8
- package/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.d.ts +3 -3
- package/lib/OpenViduInternal/Logger/ConsoleLogger.d.ts +1 -1
- package/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.d.ts +0 -1
- package/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js +36 -26
- package/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js.map +1 -1
- package/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +18 -1
- package/lib/index.js.map +1 -1
- package/package.json +7 -7
- package/src/OpenVidu/Connection.ts +35 -32
- package/src/OpenVidu/EventDispatcher.ts +6 -6
- package/src/OpenVidu/Filter.ts +3 -3
- package/src/OpenVidu/LocalRecorder.ts +11 -11
- package/src/OpenVidu/OpenVidu.ts +43 -28
- package/src/OpenVidu/Publisher.ts +23 -22
- package/src/OpenVidu/Session.ts +188 -97
- package/src/OpenVidu/Stream.ts +65 -81
- package/src/OpenVidu/StreamManager.ts +18 -18
- package/src/OpenVidu/Subscriber.ts +2 -2
- package/src/OpenViduInternal/Enums/OpenViduError.ts +20 -20
- package/src/OpenViduInternal/Enums/VideoInsertMode.ts +1 -1
- package/src/OpenViduInternal/Events/ConnectionEvent.ts +6 -5
- package/src/OpenViduInternal/Events/ConnectionPropertyChangedEvent.ts +6 -2
- package/src/OpenViduInternal/Events/Event.ts +11 -11
- package/src/OpenViduInternal/Events/EventMap/PublisherEventMap.ts +7 -7
- package/src/OpenViduInternal/Events/EventMap/SessionEventMap.ts +39 -19
- package/src/OpenViduInternal/Events/EventMap/StreamManagerEventMap.ts +9 -9
- package/src/OpenViduInternal/Events/ExceptionEvent.ts +25 -16
- package/src/OpenViduInternal/Events/FilterEvent.ts +1 -1
- package/src/OpenViduInternal/Events/NetworkQualityLevelChangedEvent.ts +1 -1
- package/src/OpenViduInternal/Events/RecordingEvent.ts +7 -6
- package/src/OpenViduInternal/Events/SessionDisconnectedEvent.ts +4 -3
- package/src/OpenViduInternal/Events/SignalEvent.ts +3 -3
- package/src/OpenViduInternal/Events/SpeechToTextEvent.ts +72 -0
- package/src/OpenViduInternal/Events/StreamEvent.ts +3 -2
- package/src/OpenViduInternal/Events/StreamManagerEvent.ts +2 -2
- package/src/OpenViduInternal/Events/StreamPropertyChangedEvent.ts +10 -7
- package/src/OpenViduInternal/Events/Types/Types.ts +42 -0
- package/src/OpenViduInternal/Events/VideoElementEvent.ts +2 -2
- package/src/OpenViduInternal/Interfaces/Public/Capabilities.ts +5 -5
- package/src/OpenViduInternal/Interfaces/Public/Device.ts +4 -4
- package/src/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.ts +5 -5
- package/src/OpenViduInternal/Interfaces/Public/PublisherProperties.ts +7 -7
- package/src/OpenViduInternal/Interfaces/Public/SignalOptions.ts +1 -1
- package/src/OpenViduInternal/Interfaces/Public/StreamManagerVideo.ts +8 -8
- package/src/OpenViduInternal/Interfaces/Public/SubscriberProperties.ts +3 -3
- package/src/OpenViduInternal/WebRtcPeer/WebRtcPeer.ts +7 -4
- package/src/index.ts +3 -0
- package/static/js/openvidu-browser-2.25.0.js +14119 -0
- package/static/js/openvidu-browser-2.25.0.min.js +1 -0
- package/static/js/openvidu-browser-2.25.0.min.js.map +1 -0
- package/ts4.4/lib/OpenVidu/Connection.d.ts +5 -5
- package/ts4.4/lib/OpenVidu/EventDispatcher.d.ts +1 -1
- package/ts4.4/lib/OpenVidu/Filter.d.ts +3 -3
- package/ts4.4/lib/OpenVidu/LocalRecorder.d.ts +11 -11
- package/ts4.4/lib/OpenVidu/OpenVidu.d.ts +19 -10
- package/ts4.4/lib/OpenVidu/Publisher.d.ts +19 -19
- package/ts4.4/lib/OpenVidu/Session.d.ts +84 -44
- package/ts4.4/lib/OpenVidu/Stream.d.ts +19 -19
- package/ts4.4/lib/OpenVidu/StreamManager.d.ts +18 -18
- package/ts4.4/lib/OpenVidu/Subscriber.d.ts +2 -2
- package/ts4.4/lib/OpenViduInternal/Enums/OpenViduError.d.ts +20 -20
- package/ts4.4/lib/OpenViduInternal/Enums/VideoInsertMode.d.ts +1 -1
- package/ts4.4/lib/OpenViduInternal/Events/ConnectionEvent.d.ts +5 -4
- package/ts4.4/lib/OpenViduInternal/Events/ConnectionPropertyChangedEvent.d.ts +6 -2
- package/ts4.4/lib/OpenViduInternal/Events/Event.d.ts +11 -11
- package/ts4.4/lib/OpenViduInternal/Events/EventMap/PublisherEventMap.d.ts +7 -7
- package/ts4.4/lib/OpenViduInternal/Events/EventMap/SessionEventMap.d.ts +37 -18
- package/ts4.4/lib/OpenViduInternal/Events/EventMap/StreamManagerEventMap.d.ts +9 -9
- package/ts4.4/lib/OpenViduInternal/Events/ExceptionEvent.d.ts +23 -15
- package/ts4.4/lib/OpenViduInternal/Events/FilterEvent.d.ts +1 -1
- package/ts4.4/lib/OpenViduInternal/Events/NetworkQualityLevelChangedEvent.d.ts +1 -1
- package/ts4.4/lib/OpenViduInternal/Events/RecordingEvent.d.ts +6 -5
- package/ts4.4/lib/OpenViduInternal/Events/SessionDisconnectedEvent.d.ts +4 -3
- package/ts4.4/lib/OpenViduInternal/Events/SignalEvent.d.ts +3 -3
- package/ts4.4/lib/OpenViduInternal/Events/SpeechToTextEvent.d.ts +39 -0
- package/ts4.4/lib/OpenViduInternal/Events/StreamEvent.d.ts +3 -2
- package/ts4.4/lib/OpenViduInternal/Events/StreamManagerEvent.d.ts +2 -2
- package/ts4.4/lib/OpenViduInternal/Events/StreamPropertyChangedEvent.d.ts +8 -5
- package/ts4.4/lib/OpenViduInternal/Events/Types/Types.d.ts +6 -0
- package/ts4.4/lib/OpenViduInternal/Events/VideoElementEvent.d.ts +2 -2
- package/ts4.4/lib/OpenViduInternal/Interfaces/Public/Capabilities.d.ts +5 -5
- package/ts4.4/lib/OpenViduInternal/Interfaces/Public/Device.d.ts +4 -4
- package/ts4.4/lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.d.ts +5 -5
- package/ts4.4/lib/OpenViduInternal/Interfaces/Public/PublisherProperties.d.ts +7 -7
- package/ts4.4/lib/OpenViduInternal/Interfaces/Public/SignalOptions.d.ts +1 -1
- package/ts4.4/lib/OpenViduInternal/Interfaces/Public/StreamManagerVideo.d.ts +8 -8
- package/ts4.4/lib/OpenViduInternal/Interfaces/Public/SubscriberProperties.d.ts +3 -3
- package/ts4.4/lib/OpenViduInternal/Logger/ConsoleLogger.d.ts +1 -1
- package/ts4.4/lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.d.ts +0 -1
- package/ts4.4/lib/index.d.ts +2 -0
- package/static/js/openvidu-browser-2.23.0.js +0 -13971
- package/static/js/openvidu-browser-2.23.0.min.js +0 -1
- package/static/js/openvidu-browser-2.23.0.min.js.map +0 -1
|
@@ -5,7 +5,7 @@ import { RemoteConnectionOptions } from '../OpenViduInternal/Interfaces/Private/
|
|
|
5
5
|
import { StreamOptionsServer } from '../OpenViduInternal/Interfaces/Private/StreamOptionsServer';
|
|
6
6
|
/**
|
|
7
7
|
* Represents each one of the user's connection to the session (the local one and other user's connections).
|
|
8
|
-
* Therefore each
|
|
8
|
+
* Therefore each {@link Session} and {@link Stream} object has an attribute of type Connection
|
|
9
9
|
*/
|
|
10
10
|
export declare class Connection {
|
|
11
11
|
private session;
|
|
@@ -24,9 +24,9 @@ export declare class Connection {
|
|
|
24
24
|
data: string;
|
|
25
25
|
/**
|
|
26
26
|
* Role of the connection.
|
|
27
|
-
* - `SUBSCRIBER`: can subscribe to published Streams of other users by calling
|
|
28
|
-
* - `PUBLISHER`: SUBSCRIBER permissions + can publish their own Streams by calling
|
|
29
|
-
* - `MODERATOR`: SUBSCRIBER + PUBLISHER permissions + can force the unpublishing or disconnection over a third-party Stream or Connection by call
|
|
27
|
+
* - `SUBSCRIBER`: can subscribe to published Streams of other users by calling {@link Session.subscribe}
|
|
28
|
+
* - `PUBLISHER`: SUBSCRIBER permissions + can publish their own Streams by calling {@link Session.publish}
|
|
29
|
+
* - `MODERATOR`: SUBSCRIBER + PUBLISHER permissions + can force the unpublishing or disconnection over a third-party Stream or Connection by call {@link Session.forceUnpublish} and {@link Session.forceDisconnect}
|
|
30
30
|
*
|
|
31
31
|
* **Only defined for the local connection. In remote connections will be `undefined`**
|
|
32
32
|
*/
|
|
@@ -76,7 +76,7 @@ export declare class Connection {
|
|
|
76
76
|
/**
|
|
77
77
|
* @hidden
|
|
78
78
|
*/
|
|
79
|
-
removeStream(
|
|
79
|
+
removeStream(): void;
|
|
80
80
|
/**
|
|
81
81
|
* @hidden
|
|
82
82
|
*/
|
|
@@ -26,7 +26,7 @@ var ExceptionEvent_1 = require("../OpenViduInternal/Events/ExceptionEvent");
|
|
|
26
26
|
var logger = OpenViduLogger_1.OpenViduLogger.getInstance();
|
|
27
27
|
/**
|
|
28
28
|
* Represents each one of the user's connection to the session (the local one and other user's connections).
|
|
29
|
-
* Therefore each
|
|
29
|
+
* Therefore each {@link Session} and {@link Stream} object has an attribute of type Connection
|
|
30
30
|
*/
|
|
31
31
|
var Connection = /** @class */ (function () {
|
|
32
32
|
/**
|
|
@@ -71,20 +71,25 @@ var Connection = /** @class */ (function () {
|
|
|
71
71
|
*/
|
|
72
72
|
Connection.prototype.sendIceCandidate = function (candidate) {
|
|
73
73
|
var _this = this;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
74
|
+
if (!this.disposed) {
|
|
75
|
+
logger.debug((!!this.stream.outboundStreamOpts ? 'Local' : 'Remote') + 'candidate for' + this.connectionId, candidate);
|
|
76
|
+
this.session.openvidu.sendRequest('onIceCandidate', {
|
|
77
|
+
endpointName: this.connectionId,
|
|
78
|
+
candidate: candidate.candidate,
|
|
79
|
+
sdpMid: candidate.sdpMid,
|
|
80
|
+
sdpMLineIndex: candidate.sdpMLineIndex
|
|
81
|
+
}, function (error, response) {
|
|
82
|
+
if (error) {
|
|
83
|
+
logger.error('Error sending ICE candidate: ' + JSON.stringify(error));
|
|
84
|
+
_this.session.emitEvent('exception', [
|
|
85
|
+
new ExceptionEvent_1.ExceptionEvent(_this.session, ExceptionEvent_1.ExceptionEventName.ICE_CANDIDATE_ERROR, _this.session, 'There was an unexpected error on the server-side processing an ICE candidate generated and sent by the client-side', error)
|
|
86
|
+
]);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
logger.warn("Connection ".concat(this.connectionId, " disposed when trying to send an ICE candidate. ICE candidate not sent"));
|
|
92
|
+
}
|
|
88
93
|
};
|
|
89
94
|
/**
|
|
90
95
|
* @hidden
|
|
@@ -122,17 +127,15 @@ var Connection = /** @class */ (function () {
|
|
|
122
127
|
/**
|
|
123
128
|
* @hidden
|
|
124
129
|
*/
|
|
125
|
-
Connection.prototype.removeStream = function (
|
|
130
|
+
Connection.prototype.removeStream = function () {
|
|
126
131
|
delete this.stream;
|
|
127
132
|
};
|
|
128
133
|
/**
|
|
129
134
|
* @hidden
|
|
130
135
|
*/
|
|
131
136
|
Connection.prototype.dispose = function () {
|
|
132
|
-
if (!!this.stream) {
|
|
133
|
-
delete this.stream;
|
|
134
|
-
}
|
|
135
137
|
this.disposed = true;
|
|
138
|
+
this.removeStream();
|
|
136
139
|
};
|
|
137
140
|
return Connection;
|
|
138
141
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connection.js","sourceRoot":"","sources":["../../src/OpenVidu/Connection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAGH,mCAAkC;AAKlC,4EAA2E;AAC3E,4EAA+F;AAE/F;;GAEG;AACH,IAAM,MAAM,GAAmB,+BAAc,CAAC,WAAW,EAAE,CAAC;AAE5D;;;GAGG;AACH;IA2DI;;OAEG;IACH,oBAAoB,OAAgB,EAAE,iBAAmE;QAArF,YAAO,GAAP,OAAO,CAAS;QAbpC;;WAEG;QACH,aAAQ,GAAG,KAAK,CAAC;QAWb,IAAI,GAAG,GAAG,uBAAuB,CAAC;QAClC,IAAI,CAAC,CAA0B,iBAAkB,CAAC,IAAI,EAAE;YACpD,sBAAsB;YACtB,IAAI,CAAC,YAAY,GAA2B,iBAAiB,CAAC;YAC9D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YACzC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;YAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC;YACvC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,C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Event } from '../OpenViduInternal/Events/Event';
|
|
2
2
|
import { EventMap } from '../OpenViduInternal/Events/EventMap/EventMap';
|
|
3
3
|
import EventEmitter = require('wolfy87-eventemitter');
|
|
4
4
|
export declare abstract class EventDispatcher {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.EventDispatcher = void 0;
|
|
20
|
-
var EventEmitter = require("wolfy87-eventemitter");
|
|
21
20
|
var OpenViduLogger_1 = require("../OpenViduInternal/Logger/OpenViduLogger");
|
|
21
|
+
var EventEmitter = require("wolfy87-eventemitter");
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
24
24
|
*/
|
|
@@ -40,10 +40,10 @@ var EventDispatcher = /** @class */ (function () {
|
|
|
40
40
|
EventDispatcher.prototype.onAux = function (type, message, handler) {
|
|
41
41
|
var arrowHandler = function (event) {
|
|
42
42
|
if (event) {
|
|
43
|
-
logger.
|
|
43
|
+
logger.debug(message, event);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
|
-
logger.
|
|
46
|
+
logger.debug(message);
|
|
47
47
|
}
|
|
48
48
|
handler(event);
|
|
49
49
|
};
|
|
@@ -58,10 +58,10 @@ var EventDispatcher = /** @class */ (function () {
|
|
|
58
58
|
var _this = this;
|
|
59
59
|
var arrowHandler = function (event) {
|
|
60
60
|
if (event) {
|
|
61
|
-
logger.
|
|
61
|
+
logger.debug(message, event);
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
|
-
logger.
|
|
64
|
+
logger.debug(message);
|
|
65
65
|
}
|
|
66
66
|
handler(event);
|
|
67
67
|
// Remove handler from map after first and only execution
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventDispatcher.js","sourceRoot":"","sources":["../../src/OpenVidu/EventDispatcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;
|
|
1
|
+
{"version":3,"file":"EventDispatcher.js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AC,uBAAuB,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACxD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,gCAAM,GAAN,UAAO,IAAY,EAAE,OAAgC;QACjD,IAAI,CAAC,OAAO,EAAE;YACV,IAAI,CAAC,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;SACpC;aAAM;YACH,uEAAuE;YACvE,IAAM,YAAY,GAAG,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC/D,IAAI,CAAC,CAAC,YAAY,EAAE;gBAChB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;aACnC;YACD,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SAChD;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IACL,sBAAC;AAAD,CAAC,AAnFD,IAmFC;AAnFqB,0CAAe"}
|
package/lib/OpenVidu/Filter.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { FilterEvent } from '../OpenViduInternal/Events/FilterEvent';
|
|
|
3
3
|
/**
|
|
4
4
|
* **WARNING**: experimental option. This interface may change in the near future
|
|
5
5
|
*
|
|
6
|
-
* Video/audio filter applied to a Stream. See
|
|
6
|
+
* Video/audio filter applied to a Stream. See {@link Stream.applyFilter}
|
|
7
7
|
*/
|
|
8
8
|
export declare class Filter {
|
|
9
9
|
/**
|
|
@@ -25,7 +25,7 @@ export declare class Filter {
|
|
|
25
25
|
*/
|
|
26
26
|
options: Object;
|
|
27
27
|
/**
|
|
28
|
-
* Value passed the last time
|
|
28
|
+
* Value passed the last time {@link Filter.execMethod} was called. If `undefined` this method has not been called yet.
|
|
29
29
|
*
|
|
30
30
|
* You can use this value to know the current status of any applied filter
|
|
31
31
|
*/
|
|
@@ -57,7 +57,7 @@ export declare class Filter {
|
|
|
57
57
|
* Subscribe to certain filter event. Available events are specific for each filter
|
|
58
58
|
*
|
|
59
59
|
* @param eventType Event to which subscribe to.
|
|
60
|
-
* @param handler Function to execute upon event dispatched. It receives as parameter a
|
|
60
|
+
* @param handler Function to execute upon event dispatched. It receives as parameter a {@link FilterEvent} object
|
|
61
61
|
*
|
|
62
62
|
* @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
|
|
63
63
|
*/
|
package/lib/OpenVidu/Filter.js
CHANGED
|
@@ -27,7 +27,7 @@ var logger = OpenViduLogger_1.OpenViduLogger.getInstance();
|
|
|
27
27
|
/**
|
|
28
28
|
* **WARNING**: experimental option. This interface may change in the near future
|
|
29
29
|
*
|
|
30
|
-
* Video/audio filter applied to a Stream. See
|
|
30
|
+
* Video/audio filter applied to a Stream. See {@link Stream.applyFilter}
|
|
31
31
|
*/
|
|
32
32
|
var Filter = /** @class */ (function () {
|
|
33
33
|
/**
|
|
@@ -135,7 +135,7 @@ var Filter = /** @class */ (function () {
|
|
|
135
135
|
* Subscribe to certain filter event. Available events are specific for each filter
|
|
136
136
|
*
|
|
137
137
|
* @param eventType Event to which subscribe to.
|
|
138
|
-
* @param handler Function to execute upon event dispatched. It receives as parameter a
|
|
138
|
+
* @param handler Function to execute upon event dispatched. It receives as parameter a {@link FilterEvent} object
|
|
139
139
|
*
|
|
140
140
|
* @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
|
|
141
141
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Stream } from './Stream';
|
|
2
2
|
import { LocalRecorderState } from '../OpenViduInternal/Enums/LocalRecorderState';
|
|
3
3
|
/**
|
|
4
|
-
* Easy recording of
|
|
4
|
+
* Easy recording of {@link Stream} objects straightaway from the browser. Initialized with {@link OpenVidu.initLocalRecorder} method
|
|
5
5
|
*/
|
|
6
6
|
export declare class LocalRecorder {
|
|
7
7
|
private stream;
|
|
@@ -18,7 +18,7 @@ export declare class LocalRecorder {
|
|
|
18
18
|
*/
|
|
19
19
|
constructor(stream: Stream);
|
|
20
20
|
/**
|
|
21
|
-
* Starts the recording of the Stream.
|
|
21
|
+
* Starts the recording of the Stream. {@link state} property must be `READY`. After method succeeds is set to `RECORDING`
|
|
22
22
|
*
|
|
23
23
|
* @param options The [MediaRecorder.options](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorder#parameters) to be used to record this Stream.
|
|
24
24
|
* For example:
|
|
@@ -41,38 +41,38 @@ export declare class LocalRecorder {
|
|
|
41
41
|
*/
|
|
42
42
|
record(options?: any): Promise<void>;
|
|
43
43
|
/**
|
|
44
|
-
* Ends the recording of the Stream.
|
|
44
|
+
* Ends the recording of the Stream. {@link state} property must be `RECORDING` or `PAUSED`. After method succeeds is set to `FINISHED`
|
|
45
45
|
* @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
|
|
46
46
|
*/
|
|
47
47
|
stop(): Promise<void>;
|
|
48
48
|
/**
|
|
49
|
-
* Pauses the recording of the Stream.
|
|
49
|
+
* Pauses the recording of the Stream. {@link state} property must be `RECORDING`. After method succeeds is set to `PAUSED`
|
|
50
50
|
* @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
|
|
51
51
|
*/
|
|
52
52
|
pause(): Promise<void>;
|
|
53
53
|
/**
|
|
54
|
-
* Resumes the recording of the Stream.
|
|
54
|
+
* Resumes the recording of the Stream. {@link state} property must be `PAUSED`. After method succeeds is set to `RECORDING`
|
|
55
55
|
* @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
|
|
56
56
|
*/
|
|
57
57
|
resume(): Promise<void>;
|
|
58
58
|
/**
|
|
59
|
-
* Previews the recording, appending a new HTMLVideoElement to element with id `parentId`.
|
|
59
|
+
* Previews the recording, appending a new HTMLVideoElement to element with id `parentId`. {@link state} property must be `FINISHED`
|
|
60
60
|
*/
|
|
61
61
|
preview(parentElement: any): HTMLVideoElement;
|
|
62
62
|
/**
|
|
63
|
-
* Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets
|
|
63
|
+
* Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets {@link state} to `READY` so the recording can start again
|
|
64
64
|
*/
|
|
65
65
|
clean(): void;
|
|
66
66
|
/**
|
|
67
|
-
* Downloads the recorded video through the browser.
|
|
67
|
+
* Downloads the recorded video through the browser. {@link state} property must be `FINISHED`
|
|
68
68
|
*/
|
|
69
69
|
download(): void;
|
|
70
70
|
/**
|
|
71
|
-
* Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions.
|
|
71
|
+
* Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions. {@link state} property must be `FINISHED`
|
|
72
72
|
*/
|
|
73
73
|
getBlob(): Blob;
|
|
74
74
|
/**
|
|
75
|
-
* Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`.
|
|
75
|
+
* Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`. {@link state} property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:
|
|
76
76
|
* ```
|
|
77
77
|
* var headers = {
|
|
78
78
|
* "Cookie": "$Version=1; Skin=new;",
|
|
@@ -83,7 +83,7 @@ export declare class LocalRecorder {
|
|
|
83
83
|
*/
|
|
84
84
|
uploadAsBinary(endpoint: string, headers?: any): Promise<any>;
|
|
85
85
|
/**
|
|
86
|
-
* Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`.
|
|
86
|
+
* Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`. {@link state} property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:
|
|
87
87
|
* ```
|
|
88
88
|
* var headers = {
|
|
89
89
|
* "Cookie": "$Version=1; Skin=new;",
|
|
@@ -30,7 +30,7 @@ var logger = OpenViduLogger_1.OpenViduLogger.getInstance();
|
|
|
30
30
|
*/
|
|
31
31
|
var platform;
|
|
32
32
|
/**
|
|
33
|
-
* Easy recording of
|
|
33
|
+
* Easy recording of {@link Stream} objects straightaway from the browser. Initialized with {@link OpenVidu.initLocalRecorder} method
|
|
34
34
|
*/
|
|
35
35
|
var LocalRecorder = /** @class */ (function () {
|
|
36
36
|
/**
|
|
@@ -45,7 +45,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
45
45
|
this.state = LocalRecorderState_1.LocalRecorderState.READY;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Starts the recording of the Stream.
|
|
48
|
+
* Starts the recording of the Stream. {@link state} property must be `READY`. After method succeeds is set to `RECORDING`
|
|
49
49
|
*
|
|
50
50
|
* @param options The [MediaRecorder.options](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorder#parameters) to be used to record this Stream.
|
|
51
51
|
* For example:
|
|
@@ -120,7 +120,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
120
120
|
});
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
|
-
* Ends the recording of the Stream.
|
|
123
|
+
* Ends the recording of the Stream. {@link state} property must be `RECORDING` or `PAUSED`. After method succeeds is set to `FINISHED`
|
|
124
124
|
* @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
|
|
125
125
|
*/
|
|
126
126
|
LocalRecorder.prototype.stop = function () {
|
|
@@ -144,7 +144,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
146
|
/**
|
|
147
|
-
* Pauses the recording of the Stream.
|
|
147
|
+
* Pauses the recording of the Stream. {@link state} property must be `RECORDING`. After method succeeds is set to `PAUSED`
|
|
148
148
|
* @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
|
|
149
149
|
*/
|
|
150
150
|
LocalRecorder.prototype.pause = function () {
|
|
@@ -166,7 +166,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
168
|
/**
|
|
169
|
-
* Resumes the recording of the Stream.
|
|
169
|
+
* Resumes the recording of the Stream. {@link state} property must be `PAUSED`. After method succeeds is set to `RECORDING`
|
|
170
170
|
* @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
|
|
171
171
|
*/
|
|
172
172
|
LocalRecorder.prototype.resume = function () {
|
|
@@ -188,7 +188,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
190
|
/**
|
|
191
|
-
* Previews the recording, appending a new HTMLVideoElement to element with id `parentId`.
|
|
191
|
+
* Previews the recording, appending a new HTMLVideoElement to element with id `parentId`. {@link state} property must be `FINISHED`
|
|
192
192
|
*/
|
|
193
193
|
LocalRecorder.prototype.preview = function (parentElement) {
|
|
194
194
|
if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {
|
|
@@ -215,7 +215,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
215
215
|
return this.videoPreview;
|
|
216
216
|
};
|
|
217
217
|
/**
|
|
218
|
-
* Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets
|
|
218
|
+
* Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets {@link state} to `READY` so the recording can start again
|
|
219
219
|
*/
|
|
220
220
|
LocalRecorder.prototype.clean = function () {
|
|
221
221
|
var _this = this;
|
|
@@ -234,7 +234,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
236
|
/**
|
|
237
|
-
* Downloads the recorded video through the browser.
|
|
237
|
+
* Downloads the recorded video through the browser. {@link state} property must be `FINISHED`
|
|
238
238
|
*/
|
|
239
239
|
LocalRecorder.prototype.download = function () {
|
|
240
240
|
if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {
|
|
@@ -255,7 +255,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
257
|
/**
|
|
258
|
-
* Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions.
|
|
258
|
+
* Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions. {@link state} property must be `FINISHED`
|
|
259
259
|
*/
|
|
260
260
|
LocalRecorder.prototype.getBlob = function () {
|
|
261
261
|
if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {
|
|
@@ -266,7 +266,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
268
|
/**
|
|
269
|
-
* Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`.
|
|
269
|
+
* Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`. {@link state} property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:
|
|
270
270
|
* ```
|
|
271
271
|
* var headers = {
|
|
272
272
|
* "Cookie": "$Version=1; Skin=new;",
|
|
@@ -308,7 +308,7 @@ var LocalRecorder = /** @class */ (function () {
|
|
|
308
308
|
});
|
|
309
309
|
};
|
|
310
310
|
/**
|
|
311
|
-
* Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`.
|
|
311
|
+
* Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`. {@link state} property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:
|
|
312
312
|
* ```
|
|
313
313
|
* var headers = {
|
|
314
314
|
* "Cookie": "$Version=1; Skin=new;",
|
|
@@ -7,6 +7,7 @@ import { OpenViduAdvancedConfiguration } from '../OpenViduInternal/Interfaces/Pu
|
|
|
7
7
|
import { PublisherProperties } from '../OpenViduInternal/Interfaces/Public/PublisherProperties';
|
|
8
8
|
import { CustomMediaStreamConstraints } from '../OpenViduInternal/Interfaces/Private/CustomMediaStreamConstraints';
|
|
9
9
|
import { OpenViduError } from '../OpenViduInternal/Enums/OpenViduError';
|
|
10
|
+
import { StreamPropertyChangedEventReason, ChangedPropertyType } from '../OpenViduInternal/Events/Types/Types';
|
|
10
11
|
import { OpenViduLoggerConfiguration } from '../OpenViduInternal/Logger/OpenViduLoggerConfiguration';
|
|
11
12
|
/**
|
|
12
13
|
* @hidden
|
|
@@ -14,7 +15,7 @@ import { OpenViduLoggerConfiguration } from '../OpenViduInternal/Logger/OpenVidu
|
|
|
14
15
|
import EventEmitter = require('wolfy87-eventemitter');
|
|
15
16
|
/**
|
|
16
17
|
* Entrypoint of OpenVidu Browser library.
|
|
17
|
-
* Use it to initialize objects of type
|
|
18
|
+
* Use it to initialize objects of type {@link Session}, {@link Publisher} and {@link LocalRecorder}
|
|
18
19
|
*/
|
|
19
20
|
export declare class OpenVidu {
|
|
20
21
|
private jsonRpcClient;
|
|
@@ -43,6 +44,10 @@ export declare class OpenVidu {
|
|
|
43
44
|
* @hidden
|
|
44
45
|
*/
|
|
45
46
|
recorder: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* @hidden
|
|
49
|
+
*/
|
|
50
|
+
stt: boolean;
|
|
46
51
|
/**
|
|
47
52
|
* @hidden
|
|
48
53
|
*/
|
|
@@ -105,9 +110,9 @@ export declare class OpenVidu {
|
|
|
105
110
|
initPublisher(targetElement: string | HTMLElement | undefined, completionHandler: (error: Error | undefined) => void): Publisher;
|
|
106
111
|
initPublisher(targetElement: string | HTMLElement | undefined, properties: PublisherProperties, completionHandler: (error: Error | undefined) => void): Publisher;
|
|
107
112
|
/**
|
|
108
|
-
* Promisified version of
|
|
113
|
+
* Promisified version of {@link OpenVidu.initPublisher}
|
|
109
114
|
*
|
|
110
|
-
* > WARNING: events `accessDialogOpened` and `accessDialogClosed` will not be dispatched if using this method instead of
|
|
115
|
+
* > WARNING: events `accessDialogOpened` and `accessDialogClosed` will not be dispatched if using this method instead of {@link OpenVidu.initPublisher}
|
|
111
116
|
*/
|
|
112
117
|
initPublisherAsync(targetElement: string | HTMLElement | undefined): Promise<Publisher>;
|
|
113
118
|
initPublisherAsync(targetElement: string | HTMLElement | undefined, properties: PublisherProperties): Promise<Publisher>;
|
|
@@ -127,13 +132,13 @@ export declare class OpenVidu {
|
|
|
127
132
|
*/
|
|
128
133
|
checkScreenSharingCapabilities(): boolean;
|
|
129
134
|
/**
|
|
130
|
-
* Collects information about the media input devices available on the system. You can pass property `deviceId` of a
|
|
135
|
+
* Collects information about the media input devices available on the system. You can pass property `deviceId` of a {@link Device} object as value of `audioSource` or `videoSource` properties in {@link initPublisher} method
|
|
131
136
|
*/
|
|
132
137
|
getDevices(): Promise<Device[]>;
|
|
133
138
|
/**
|
|
134
|
-
* Get a MediaStream object that you can customize before calling
|
|
139
|
+
* Get a MediaStream object that you can customize before calling {@link initPublisher} (pass _MediaStreamTrack_ property of the _MediaStream_ value resolved by the Promise as `audioSource` or `videoSource` properties in {@link initPublisher})
|
|
135
140
|
*
|
|
136
|
-
* Parameter `options` is the same as in
|
|
141
|
+
* Parameter `options` is the same as in {@link initPublisher} second parameter (of type {@link PublisherProperties}), but only the following properties will be applied: `audioSource`, `videoSource`, `frameRate`, `resolution`
|
|
137
142
|
*
|
|
138
143
|
* 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:
|
|
139
144
|
* ```
|
|
@@ -183,7 +188,7 @@ export declare class OpenVidu {
|
|
|
183
188
|
*/
|
|
184
189
|
enableProdMode(): void;
|
|
185
190
|
/**
|
|
186
|
-
* Set OpenVidu advanced configuration options. `configuration` is an object of type
|
|
191
|
+
* Set OpenVidu advanced configuration options. `configuration` is an object of type {@link OpenViduAdvancedConfiguration}. Call this method to override previous values at any moment.
|
|
187
192
|
*/
|
|
188
193
|
setAdvancedConfiguration(configuration: OpenViduAdvancedConfiguration): void;
|
|
189
194
|
/**
|
|
@@ -193,15 +198,15 @@ export declare class OpenVidu {
|
|
|
193
198
|
/**
|
|
194
199
|
* @hidden
|
|
195
200
|
*/
|
|
196
|
-
sendNewVideoDimensionsIfRequired(publisher: Publisher, reason:
|
|
201
|
+
sendNewVideoDimensionsIfRequired(publisher: Publisher, reason: StreamPropertyChangedEventReason, WAIT_INTERVAL: number, MAX_ATTEMPTS: number): void;
|
|
197
202
|
/**
|
|
198
203
|
* @hidden
|
|
199
204
|
*/
|
|
200
|
-
sendVideoDimensionsChangedEvent(publisher: Publisher, reason:
|
|
205
|
+
sendVideoDimensionsChangedEvent(publisher: Publisher, reason: StreamPropertyChangedEventReason, oldWidth: number, oldHeight: number, newWidth: number, newHeight: number): void;
|
|
201
206
|
/**
|
|
202
207
|
* @hidden
|
|
203
208
|
*/
|
|
204
|
-
sendTrackChangedEvent(publisher: Publisher,
|
|
209
|
+
sendTrackChangedEvent(publisher: Publisher, oldLabel: string, newLabel: string, propertyType: ChangedPropertyType): void;
|
|
205
210
|
/**
|
|
206
211
|
* @hidden
|
|
207
212
|
*/
|
|
@@ -238,6 +243,10 @@ export declare class OpenVidu {
|
|
|
238
243
|
* @hidden
|
|
239
244
|
*/
|
|
240
245
|
getRecorder(): boolean;
|
|
246
|
+
/**
|
|
247
|
+
* @hidden
|
|
248
|
+
*/
|
|
249
|
+
getStt(): boolean;
|
|
241
250
|
/**
|
|
242
251
|
* @hidden
|
|
243
252
|
*/
|
package/lib/OpenVidu/OpenVidu.js
CHANGED
|
@@ -30,7 +30,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
30
30
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
31
31
|
function step(op) {
|
|
32
32
|
if (f) throw new TypeError("Generator is already executing.");
|
|
33
|
-
while (_) try {
|
|
33
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
34
34
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
35
35
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
36
36
|
switch (op[0]) {
|
|
@@ -87,7 +87,7 @@ var logger = OpenViduLogger_1.OpenViduLogger.getInstance();
|
|
|
87
87
|
var platform;
|
|
88
88
|
/**
|
|
89
89
|
* Entrypoint of OpenVidu Browser library.
|
|
90
|
-
* Use it to initialize objects of type
|
|
90
|
+
* Use it to initialize objects of type {@link Session}, {@link Publisher} and {@link LocalRecorder}
|
|
91
91
|
*/
|
|
92
92
|
var OpenVidu = /** @class */ (function () {
|
|
93
93
|
function OpenVidu() {
|
|
@@ -105,6 +105,10 @@ var OpenVidu = /** @class */ (function () {
|
|
|
105
105
|
* @hidden
|
|
106
106
|
*/
|
|
107
107
|
this.recorder = false;
|
|
108
|
+
/**
|
|
109
|
+
* @hidden
|
|
110
|
+
*/
|
|
111
|
+
this.stt = false;
|
|
108
112
|
/**
|
|
109
113
|
* @hidden
|
|
110
114
|
*/
|
|
@@ -161,18 +165,18 @@ var OpenVidu = /** @class */ (function () {
|
|
|
161
165
|
*
|
|
162
166
|
* #### Events dispatched
|
|
163
167
|
*
|
|
164
|
-
* The
|
|
168
|
+
* The {@link 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
|
|
165
169
|
* for your website. An `accessDialogClosed` event will also be dispatched after user clicks on "Allow" or "Block" in the pop-up.
|
|
166
170
|
*
|
|
167
|
-
* The
|
|
171
|
+
* The {@link Publisher} object will dispatch an `accessAllowed` or `accessDenied` event once it has been granted access to the requested input devices or not.
|
|
168
172
|
*
|
|
169
|
-
* The
|
|
170
|
-
* [let OpenVidu take care of the video players](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). See
|
|
173
|
+
* The {@link Publisher} object will dispatch a `videoElementCreated` event once a HTML video element has been added to DOM (only if you
|
|
174
|
+
* [let OpenVidu take care of the video players](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). See {@link VideoElementEvent} to learn more.
|
|
171
175
|
*
|
|
172
|
-
* The
|
|
176
|
+
* The {@link Publisher} object will dispatch a `streamPlaying` event once the local streams starts playing. See {@link StreamManagerEvent} to learn more.
|
|
173
177
|
*
|
|
174
|
-
* @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher will be inserted (see
|
|
175
|
-
* You can always call method
|
|
178
|
+
* @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher will be inserted (see {@link PublisherProperties.insertMode}). If *null* or *undefined* no default video will be created for this Publisher.
|
|
179
|
+
* You can always call method {@link Publisher.addVideoElement} or {@link Publisher.createVideoElement} to manage the video elements on your own (see [Manage video players](/en/stable/cheatsheet/manage-videos) section)
|
|
176
180
|
* @param completionHandler `error` parameter is null if `initPublisher` succeeds, and is defined if it fails.
|
|
177
181
|
* `completionHandler` function is called before the Publisher dispatches an `accessAllowed` or an `accessDenied` event
|
|
178
182
|
*/
|
|
@@ -306,7 +310,7 @@ var OpenVidu = /** @class */ (function () {
|
|
|
306
310
|
return platform.canScreenShare();
|
|
307
311
|
};
|
|
308
312
|
/**
|
|
309
|
-
* Collects information about the media input devices available on the system. You can pass property `deviceId` of a
|
|
313
|
+
* Collects information about the media input devices available on the system. You can pass property `deviceId` of a {@link Device} object as value of `audioSource` or `videoSource` properties in {@link initPublisher} method
|
|
310
314
|
*/
|
|
311
315
|
OpenVidu.prototype.getDevices = function () {
|
|
312
316
|
return new Promise(function (resolve, reject) {
|
|
@@ -416,9 +420,9 @@ var OpenVidu = /** @class */ (function () {
|
|
|
416
420
|
});
|
|
417
421
|
};
|
|
418
422
|
/**
|
|
419
|
-
* Get a MediaStream object that you can customize before calling
|
|
423
|
+
* Get a MediaStream object that you can customize before calling {@link initPublisher} (pass _MediaStreamTrack_ property of the _MediaStream_ value resolved by the Promise as `audioSource` or `videoSource` properties in {@link initPublisher})
|
|
420
424
|
*
|
|
421
|
-
* Parameter `options` is the same as in
|
|
425
|
+
* Parameter `options` is the same as in {@link initPublisher} second parameter (of type {@link PublisherProperties}), but only the following properties will be applied: `audioSource`, `videoSource`, `frameRate`, `resolution`
|
|
422
426
|
*
|
|
423
427
|
* 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:
|
|
424
428
|
* ```
|
|
@@ -597,7 +601,7 @@ var OpenVidu = /** @class */ (function () {
|
|
|
597
601
|
};
|
|
598
602
|
/* tslint:enable:no-empty */
|
|
599
603
|
/**
|
|
600
|
-
* Set OpenVidu advanced configuration options. `configuration` is an object of type
|
|
604
|
+
* Set OpenVidu advanced configuration options. `configuration` is an object of type {@link OpenViduAdvancedConfiguration}. Call this method to override previous values at any moment.
|
|
601
605
|
*/
|
|
602
606
|
OpenVidu.prototype.setAdvancedConfiguration = function (configuration) {
|
|
603
607
|
this.advancedConfiguration = configuration;
|
|
@@ -663,15 +667,16 @@ var OpenVidu = /** @class */ (function () {
|
|
|
663
667
|
/**
|
|
664
668
|
* @hidden
|
|
665
669
|
*/
|
|
666
|
-
OpenVidu.prototype.sendTrackChangedEvent = function (publisher,
|
|
670
|
+
OpenVidu.prototype.sendTrackChangedEvent = function (publisher, oldLabel, newLabel, propertyType) {
|
|
667
671
|
var _this = this;
|
|
668
672
|
var oldValue = { label: oldLabel };
|
|
669
673
|
var newValue = { label: newLabel };
|
|
674
|
+
var reason = 'trackReplaced';
|
|
670
675
|
if (publisher.stream.isLocalStreamPublished) {
|
|
671
676
|
this.sendRequest('streamPropertyChanged', {
|
|
672
677
|
streamId: publisher.stream.streamId,
|
|
673
678
|
property: propertyType,
|
|
674
|
-
newValue:
|
|
679
|
+
newValue: newValue,
|
|
675
680
|
reason: reason
|
|
676
681
|
}, function (error, response) {
|
|
677
682
|
if (error) {
|
|
@@ -804,7 +809,9 @@ var OpenVidu = /** @class */ (function () {
|
|
|
804
809
|
iceCandidate: this.session.recvIceCandidate.bind(this.session),
|
|
805
810
|
mediaError: this.session.onMediaError.bind(this.session),
|
|
806
811
|
masterNodeCrashedNotification: this.onMasterNodeCrashedNotification.bind(this),
|
|
807
|
-
forciblyReconnectSubscriber: this.session.onForciblyReconnectSubscriber.bind(this.session)
|
|
812
|
+
forciblyReconnectSubscriber: this.session.onForciblyReconnectSubscriber.bind(this.session),
|
|
813
|
+
speechToTextMessage: this.session.onSpeechToTextMessage.bind(this.session),
|
|
814
|
+
speechToTextDisconnected: this.session.onSpeechToTextDisconnected.bind(this.session)
|
|
808
815
|
}
|
|
809
816
|
};
|
|
810
817
|
this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient(config);
|
|
@@ -860,6 +867,12 @@ var OpenVidu = /** @class */ (function () {
|
|
|
860
867
|
OpenVidu.prototype.getRecorder = function () {
|
|
861
868
|
return this.recorder;
|
|
862
869
|
};
|
|
870
|
+
/**
|
|
871
|
+
* @hidden
|
|
872
|
+
*/
|
|
873
|
+
OpenVidu.prototype.getStt = function () {
|
|
874
|
+
return this.stt;
|
|
875
|
+
};
|
|
863
876
|
/**
|
|
864
877
|
* @hidden
|
|
865
878
|
*/
|