@webex/internal-media-core 1.38.6 → 1.39.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/dist/cjs/index.js
CHANGED
|
@@ -16249,18 +16249,22 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
16249
16249
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16250
16250
|
class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
16251
16251
|
constructor(mediaConnectionConfig, debugId) {
|
|
16252
|
+
var metricsCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => {};
|
|
16253
|
+
var closeCallback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : () => {};
|
|
16252
16254
|
super();
|
|
16253
16255
|
_defineProperty__default["default"](this, "id", void 0);
|
|
16254
16256
|
_defineProperty__default["default"](this, "debugId", void 0);
|
|
16255
16257
|
_defineProperty__default["default"](this, "multistreamConnection", void 0);
|
|
16256
16258
|
_defineProperty__default["default"](this, "roap", void 0);
|
|
16257
16259
|
_defineProperty__default["default"](this, "sdpNegotiationStarted", false);
|
|
16260
|
+
_defineProperty__default["default"](this, "closeCallback", void 0);
|
|
16258
16261
|
this.debugId = debugId;
|
|
16259
16262
|
this.id = debugId || 'MultistreamRoapMediaConnection';
|
|
16260
16263
|
configureWcmeLogger(debugId);
|
|
16261
16264
|
this.log('constructor()', "config: ".concat(JSON.stringify(mediaConnectionConfig)));
|
|
16262
|
-
this.multistreamConnection = this.createMultistreamConnection(mediaConnectionConfig);
|
|
16265
|
+
this.multistreamConnection = this.createMultistreamConnection(mediaConnectionConfig, metricsCallback);
|
|
16263
16266
|
this.roap = this.createRoap(debugId);
|
|
16267
|
+
this.closeCallback = closeCallback;
|
|
16264
16268
|
}
|
|
16265
16269
|
log(action, description) {
|
|
16266
16270
|
getLogger().info("".concat(this.id, ":").concat(action, " ").concat(description));
|
|
@@ -16268,7 +16272,7 @@ class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
|
16268
16272
|
error(action, description, error) {
|
|
16269
16273
|
getLogger().error("".concat(this.id, ":").concat(action, " ").concat(description, " ").concat(getErrorDescription(error)));
|
|
16270
16274
|
}
|
|
16271
|
-
createMultistreamConnection(mediaConnectionConfig) {
|
|
16275
|
+
createMultistreamConnection(mediaConnectionConfig, metricsCallback) {
|
|
16272
16276
|
this.log('createMultistreamConnection()', 'creating MultistreamConnection with floorControlledPresentation: true');
|
|
16273
16277
|
var multistreamConnection = new MultistreamConnection(_objectSpread(_objectSpread({}, mediaConnectionConfig), {}, {
|
|
16274
16278
|
floorControlledPresentation: true
|
|
@@ -16289,6 +16293,7 @@ class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
|
16289
16293
|
state
|
|
16290
16294
|
});
|
|
16291
16295
|
});
|
|
16296
|
+
multistreamConnection.setMetricsCallback(metricsCallback);
|
|
16292
16297
|
return multistreamConnection;
|
|
16293
16298
|
}
|
|
16294
16299
|
createRoap(debugId, seq) {
|
|
@@ -16312,6 +16317,7 @@ class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
|
16312
16317
|
this.log('close()', 'called');
|
|
16313
16318
|
this.closeMediaConnection();
|
|
16314
16319
|
this.stopRoapSession();
|
|
16320
|
+
this.closeCallback();
|
|
16315
16321
|
}
|
|
16316
16322
|
closeMediaConnection() {
|
|
16317
16323
|
this.multistreamConnection.close();
|
package/dist/esm/index.js
CHANGED
|
@@ -16238,18 +16238,22 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
16238
16238
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16239
16239
|
class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
16240
16240
|
constructor(mediaConnectionConfig, debugId) {
|
|
16241
|
+
var metricsCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => {};
|
|
16242
|
+
var closeCallback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : () => {};
|
|
16241
16243
|
super();
|
|
16242
16244
|
_defineProperty(this, "id", void 0);
|
|
16243
16245
|
_defineProperty(this, "debugId", void 0);
|
|
16244
16246
|
_defineProperty(this, "multistreamConnection", void 0);
|
|
16245
16247
|
_defineProperty(this, "roap", void 0);
|
|
16246
16248
|
_defineProperty(this, "sdpNegotiationStarted", false);
|
|
16249
|
+
_defineProperty(this, "closeCallback", void 0);
|
|
16247
16250
|
this.debugId = debugId;
|
|
16248
16251
|
this.id = debugId || 'MultistreamRoapMediaConnection';
|
|
16249
16252
|
configureWcmeLogger(debugId);
|
|
16250
16253
|
this.log('constructor()', "config: ".concat(JSON.stringify(mediaConnectionConfig)));
|
|
16251
|
-
this.multistreamConnection = this.createMultistreamConnection(mediaConnectionConfig);
|
|
16254
|
+
this.multistreamConnection = this.createMultistreamConnection(mediaConnectionConfig, metricsCallback);
|
|
16252
16255
|
this.roap = this.createRoap(debugId);
|
|
16256
|
+
this.closeCallback = closeCallback;
|
|
16253
16257
|
}
|
|
16254
16258
|
log(action, description) {
|
|
16255
16259
|
getLogger().info("".concat(this.id, ":").concat(action, " ").concat(description));
|
|
@@ -16257,7 +16261,7 @@ class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
|
16257
16261
|
error(action, description, error) {
|
|
16258
16262
|
getLogger().error("".concat(this.id, ":").concat(action, " ").concat(description, " ").concat(getErrorDescription(error)));
|
|
16259
16263
|
}
|
|
16260
|
-
createMultistreamConnection(mediaConnectionConfig) {
|
|
16264
|
+
createMultistreamConnection(mediaConnectionConfig, metricsCallback) {
|
|
16261
16265
|
this.log('createMultistreamConnection()', 'creating MultistreamConnection with floorControlledPresentation: true');
|
|
16262
16266
|
var multistreamConnection = new MultistreamConnection(_objectSpread(_objectSpread({}, mediaConnectionConfig), {}, {
|
|
16263
16267
|
floorControlledPresentation: true
|
|
@@ -16278,6 +16282,7 @@ class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
|
16278
16282
|
state
|
|
16279
16283
|
});
|
|
16280
16284
|
});
|
|
16285
|
+
multistreamConnection.setMetricsCallback(metricsCallback);
|
|
16281
16286
|
return multistreamConnection;
|
|
16282
16287
|
}
|
|
16283
16288
|
createRoap(debugId, seq) {
|
|
@@ -16301,6 +16306,7 @@ class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
|
16301
16306
|
this.log('close()', 'called');
|
|
16302
16307
|
this.closeMediaConnection();
|
|
16303
16308
|
this.stopRoapSession();
|
|
16309
|
+
this.closeCallback();
|
|
16304
16310
|
}
|
|
16305
16311
|
closeMediaConnection() {
|
|
16306
16312
|
this.multistreamConnection.close();
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import EventEmitter from 'events';
|
|
3
|
-
import { LocalTrack, ReceiveSlot, TransceiverStats, StreamRequest } from '@webex/web-client-media-engine';
|
|
3
|
+
import { LocalTrack, ReceiveSlot, TransceiverStats, StreamRequest, MetricsCallback } from '@webex/web-client-media-engine';
|
|
4
4
|
import { MediaType } from '@webex/json-multistream';
|
|
5
5
|
import { ConnectionState, RoapMessage } from './eventTypes';
|
|
6
6
|
import { MultistreamConnectionConfig } from './config';
|
|
7
|
-
export { ReceiveSlot, ReceiveSlotEvents, StreamRequest, getAudioOutputDevices, getVideoInputDevices, setOnDeviceChangeHandler, WcmeError, AudioDeviceConstraints, VideoDeviceConstraints, LocalTrackEvents, TrackPublishEvent, TrackMuteEvent, TrackEndEvent, LocalCameraTrack, LocalDisplayTrack, LocalMicrophoneTrack, LocalTrack, MediaStreamTrackKind, PeerConnection, createCameraTrack, createDisplayTrack, createMicrophoneTrack, getDevices, getAudioInputDevices, getRecommendedMaxBitrateForFrameSize, RecommendedOpusBitrates, } from '@webex/web-client-media-engine';
|
|
7
|
+
export { ReceiveSlot, ReceiveSlotEvents, StreamRequest, MetricsCallback, getAudioOutputDevices, getVideoInputDevices, setOnDeviceChangeHandler, WcmeError, AudioDeviceConstraints, VideoDeviceConstraints, LocalTrackEvents, TrackPublishEvent, TrackMuteEvent, TrackEndEvent, LocalCameraTrack, LocalDisplayTrack, LocalMicrophoneTrack, LocalTrack, MediaStreamTrackKind, PeerConnection, createCameraTrack, createDisplayTrack, createMicrophoneTrack, getDevices, getAudioInputDevices, getRecommendedMaxBitrateForFrameSize, RecommendedOpusBitrates, } from '@webex/web-client-media-engine';
|
|
8
8
|
export { ActiveSpeakerInfo, CodecInfo, getMediaFamily, H264Codec, MediaFamily, MediaType, StreamState, Policy, PolicySpecificInfo, ReceiverSelectedInfo, } from '@webex/json-multistream';
|
|
9
|
+
export declare type CloseCallback = () => void;
|
|
9
10
|
export declare class MultistreamRoapMediaConnection extends EventEmitter {
|
|
10
11
|
private id?;
|
|
11
12
|
private debugId?;
|
|
12
13
|
private multistreamConnection;
|
|
13
14
|
private roap;
|
|
14
15
|
private sdpNegotiationStarted;
|
|
15
|
-
|
|
16
|
+
private closeCallback;
|
|
17
|
+
constructor(mediaConnectionConfig: MultistreamConnectionConfig, debugId?: string, metricsCallback?: MetricsCallback, closeCallback?: CloseCallback);
|
|
16
18
|
private log;
|
|
17
19
|
private error;
|
|
18
20
|
private createMultistreamConnection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultistreamRoapMediaConnection.d.ts","sourceRoot":"","sources":["../../../src/MediaConnection/MultistreamRoapMediaConnection.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAElC,OAAO,EACL,UAAU,EAGV,WAAW,EACX,gBAAgB,EAChB,aAAa,
|
|
1
|
+
{"version":3,"file":"MultistreamRoapMediaConnection.d.ts","sourceRoot":"","sources":["../../../src/MediaConnection/MultistreamRoapMediaConnection.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAElC,OAAO,EACL,UAAU,EAGV,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,eAAe,EAChB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAA6C,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAG9F,OAAO,EAAQ,eAAe,EAAE,WAAW,EAAmB,MAAM,cAAc,CAAC;AAKnF,OAAO,EAAC,2BAA2B,EAAC,MAAM,UAAU,CAAC;AAGrD,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,eAAe,EAEf,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,oBAAoB,EAEpB,oCAAoC,EACpC,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,MAAM,EACN,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAEjC,oBAAY,aAAa,GAAG,MAAM,IAAI,CAAC;AAGvC,qBAAa,8BAA+B,SAAQ,YA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