@webex/internal-media-core 1.35.0 → 1.35.2
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
|
@@ -4911,7 +4911,7 @@ function eventTargetAgnosticAddListener$1(emitter, name, listener, flags) {
|
|
|
4911
4911
|
* Typed event emitter class.
|
|
4912
4912
|
*/
|
|
4913
4913
|
class EventEmitter$2 extends events$1.exports.EventEmitter {}
|
|
4914
|
-
|
|
4914
|
+
exports.LocalTrackEvents = void 0;
|
|
4915
4915
|
(function (LocalTrackEvents) {
|
|
4916
4916
|
LocalTrackEvents["Ended"] = "ended";
|
|
4917
4917
|
LocalTrackEvents["Muted"] = "muted";
|
|
@@ -4926,7 +4926,7 @@ var LocalTrackEvents;
|
|
|
4926
4926
|
* Fires when there has been a change in the underlying track.
|
|
4927
4927
|
*/
|
|
4928
4928
|
LocalTrackEvents["UnderlyingTrackChange"] = "underlying-track-change";
|
|
4929
|
-
})(LocalTrackEvents || (LocalTrackEvents = {}));
|
|
4929
|
+
})(exports.LocalTrackEvents || (exports.LocalTrackEvents = {}));
|
|
4930
4930
|
// TBD: Fix this once types are published separately
|
|
4931
4931
|
// export type TrackEffect = BaseMicrophoneEffect | BaseCameraEffect;
|
|
4932
4932
|
/**
|
|
@@ -4950,7 +4950,7 @@ class LocalTrack extends EventEmitter$2 {
|
|
|
4950
4950
|
* Emit ended event when the underlying track ends.
|
|
4951
4951
|
*/
|
|
4952
4952
|
this.underlyingTrack.onended = () => {
|
|
4953
|
-
this.emit(LocalTrackEvents.Ended, {
|
|
4953
|
+
this.emit(exports.LocalTrackEvents.Ended, {
|
|
4954
4954
|
trackState: this.trackState
|
|
4955
4955
|
});
|
|
4956
4956
|
};
|
|
@@ -5045,7 +5045,7 @@ class LocalTrack extends EventEmitter$2 {
|
|
|
5045
5045
|
if (this.underlyingTrack.enabled === muted) {
|
|
5046
5046
|
this.originalTrack.enabled = !muted;
|
|
5047
5047
|
this.underlyingTrack.enabled = !muted;
|
|
5048
|
-
this.emit(LocalTrackEvents.Muted, {
|
|
5048
|
+
this.emit(exports.LocalTrackEvents.Muted, {
|
|
5049
5049
|
trackState: this.trackState
|
|
5050
5050
|
});
|
|
5051
5051
|
logger$3.log("Local track ".concat(muted ? 'muted' : 'unmuted', ":"), {
|
|
@@ -5062,7 +5062,7 @@ class LocalTrack extends EventEmitter$2 {
|
|
|
5062
5062
|
setPublished(isPublished) {
|
|
5063
5063
|
if (this.isPublished !== isPublished) {
|
|
5064
5064
|
this.isPublished = isPublished;
|
|
5065
|
-
this.emit(LocalTrackEvents.PublishedStateUpdate, {
|
|
5065
|
+
this.emit(exports.LocalTrackEvents.PublishedStateUpdate, {
|
|
5066
5066
|
trackState: this.trackState,
|
|
5067
5067
|
isPublished
|
|
5068
5068
|
});
|
|
@@ -5079,7 +5079,7 @@ class LocalTrack extends EventEmitter$2 {
|
|
|
5079
5079
|
stop() {
|
|
5080
5080
|
this.originalTrack.stop();
|
|
5081
5081
|
this.underlyingTrack.stop();
|
|
5082
|
-
this.emit(LocalTrackEvents.Ended, {
|
|
5082
|
+
this.emit(exports.LocalTrackEvents.Ended, {
|
|
5083
5083
|
trackState: this.trackState
|
|
5084
5084
|
});
|
|
5085
5085
|
logger$3.log("Local track stopped:", {
|
|
@@ -5097,7 +5097,7 @@ class LocalTrack extends EventEmitter$2 {
|
|
|
5097
5097
|
yield effect.load(this.underlyingStream);
|
|
5098
5098
|
this.underlyingStream = effect.getUnderlyingStream();
|
|
5099
5099
|
this.effects.set(name, effect);
|
|
5100
|
-
this.emit(LocalTrackEvents.UnderlyingTrackChange);
|
|
5100
|
+
this.emit(exports.LocalTrackEvents.UnderlyingTrackChange);
|
|
5101
5101
|
});
|
|
5102
5102
|
}
|
|
5103
5103
|
/**
|
|
@@ -5121,11 +5121,11 @@ class LocalTrack extends EventEmitter$2 {
|
|
|
5121
5121
|
this.effects.forEach(effect => effect.dispose());
|
|
5122
5122
|
this.effects.clear();
|
|
5123
5123
|
this.underlyingStream = this.originalStream;
|
|
5124
|
-
this.emit(LocalTrackEvents.UnderlyingTrackChange);
|
|
5124
|
+
this.emit(exports.LocalTrackEvents.UnderlyingTrackChange);
|
|
5125
5125
|
}
|
|
5126
5126
|
}
|
|
5127
5127
|
}
|
|
5128
|
-
LocalTrack.Events = LocalTrackEvents;
|
|
5128
|
+
LocalTrack.Events = exports.LocalTrackEvents;
|
|
5129
5129
|
|
|
5130
5130
|
/**
|
|
5131
5131
|
* Represents a local track for a camera source.
|
|
@@ -12181,13 +12181,13 @@ class SendOnlyTransceiver extends Transceiver {
|
|
|
12181
12181
|
replacePublishedTrack(newTrack) {
|
|
12182
12182
|
var _a, _b;
|
|
12183
12183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12184
|
-
(_a = this.publishedTrack) === null || _a === void 0 ? void 0 : _a.off(LocalTrackEvents.UnderlyingTrackChange, this.handleTrackChange);
|
|
12184
|
+
(_a = this.publishedTrack) === null || _a === void 0 ? void 0 : _a.off(exports.LocalTrackEvents.UnderlyingTrackChange, this.handleTrackChange);
|
|
12185
12185
|
(_b = this.publishedTrack) === null || _b === void 0 ? void 0 : _b.setPublished(false);
|
|
12186
12186
|
if (this.requested) {
|
|
12187
12187
|
yield this.sender.replaceTrack((newTrack === null || newTrack === void 0 ? void 0 : newTrack.underlyingTrack) || null);
|
|
12188
12188
|
}
|
|
12189
12189
|
this.publishedTrack = newTrack;
|
|
12190
|
-
newTrack === null || newTrack === void 0 ? void 0 : newTrack.on(LocalTrackEvents.UnderlyingTrackChange, this.handleTrackChange);
|
|
12190
|
+
newTrack === null || newTrack === void 0 ? void 0 : newTrack.on(exports.LocalTrackEvents.UnderlyingTrackChange, this.handleTrackChange);
|
|
12191
12191
|
newTrack === null || newTrack === void 0 ? void 0 : newTrack.setPublished(true);
|
|
12192
12192
|
});
|
|
12193
12193
|
}
|
|
@@ -14141,7 +14141,8 @@ var defaultMultistreamConnectionOptions = {
|
|
|
14141
14141
|
disableSimulcast: getBrowserDetails().name === 'Firefox',
|
|
14142
14142
|
streamSignalingMode: 'SSRC',
|
|
14143
14143
|
bundlePolicy: 'max-compat',
|
|
14144
|
-
iceServers: undefined
|
|
14144
|
+
iceServers: undefined,
|
|
14145
|
+
disableContentSimulcast: true
|
|
14145
14146
|
};
|
|
14146
14147
|
class MultistreamConnection extends EventEmitter {
|
|
14147
14148
|
constructor() {
|
|
@@ -14163,11 +14164,11 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14163
14164
|
this.overuseStateManager.start();
|
|
14164
14165
|
this.statsManager = new StatsManager(() => this.pc.getStats(), stats => this.preProcessStats(stats));
|
|
14165
14166
|
var mainSceneId = generateSceneId();
|
|
14166
|
-
var videoMainEncodingOptions = this.getVideoEncodingOptions();
|
|
14167
|
+
var videoMainEncodingOptions = this.getVideoEncodingOptions(MediaContent$1.Main);
|
|
14167
14168
|
this.createSendTransceiver(MediaType.VideoMain, mainSceneId, videoMainEncodingOptions);
|
|
14168
14169
|
this.createSendTransceiver(MediaType.AudioMain, mainSceneId);
|
|
14169
14170
|
if (this.options.floorControlledPresentation) {
|
|
14170
|
-
var videoPresentationEncodingOptions = this.getVideoEncodingOptions();
|
|
14171
|
+
var videoPresentationEncodingOptions = this.getVideoEncodingOptions(MediaContent$1.Slides);
|
|
14171
14172
|
var contentSceneId = generateSceneId();
|
|
14172
14173
|
this.createSendTransceiver(MediaType.VideoSlides, contentSceneId, videoPresentationEncodingOptions);
|
|
14173
14174
|
this.createSendTransceiver(MediaType.AudioSlides, contentSceneId);
|
|
@@ -14197,8 +14198,9 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14197
14198
|
getConnectionState() {
|
|
14198
14199
|
return this.pc.getConnectionState();
|
|
14199
14200
|
}
|
|
14200
|
-
getVideoEncodingOptions() {
|
|
14201
|
-
|
|
14201
|
+
getVideoEncodingOptions(content) {
|
|
14202
|
+
var enabledSimulcast = content === MediaContent$1.Main ? !this.options.disableSimulcast : !this.options.disableContentSimulcast;
|
|
14203
|
+
return enabledSimulcast ? [{
|
|
14202
14204
|
scaleResolutionDownBy: 4,
|
|
14203
14205
|
active: false
|
|
14204
14206
|
}, {
|
|
@@ -14630,7 +14632,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14630
14632
|
});
|
|
14631
14633
|
parsed.avMedia.filter(av => av.direction === 'sendrecv').forEach(av => {
|
|
14632
14634
|
var egressSignaler = this.streamSignalerManager.getOrCreateEgressStreamSignaler(av.mid);
|
|
14633
|
-
var simulcastEnabled = av.
|
|
14635
|
+
var simulcastEnabled = !!av.simulcast;
|
|
14634
14636
|
var rtxEnabled = av.type === 'video';
|
|
14635
14637
|
egressSignaler.signalStreams(simulcastEnabled, rtxEnabled, av);
|
|
14636
14638
|
if (av.type === 'video') {
|
|
@@ -14691,15 +14693,25 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14691
14693
|
requestMedia(mediaType, mediaRequests) {
|
|
14692
14694
|
var _a;
|
|
14693
14695
|
var task = () => {
|
|
14696
|
+
var _a;
|
|
14694
14697
|
var jmpSession = this.jmpSessions.get(mediaType);
|
|
14695
14698
|
if (!jmpSession) {
|
|
14696
14699
|
logger$4.error("Unable to find jmp session for ".concat(mediaType));
|
|
14697
14700
|
return;
|
|
14698
14701
|
}
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14702
|
+
var requestedReceiveSlotIds = [];
|
|
14703
|
+
mediaRequests.forEach(mr => mr.receiveSlots.forEach(rs => {
|
|
14704
|
+
if (!rs.id) {
|
|
14705
|
+
logger$4.error("Running subscribe task, but ReceiveSlot ID is missing!");
|
|
14706
|
+
return;
|
|
14707
|
+
}
|
|
14708
|
+
requestedReceiveSlotIds.push(rs.id);
|
|
14709
|
+
}));
|
|
14710
|
+
(_a = this.recvTransceivers.get(mediaType)) === null || _a === void 0 ? void 0 : _a.forEach(transceiver => {
|
|
14711
|
+
if (!requestedReceiveSlotIds.some(id => compareStreamIds(id, transceiver.receiveSlot.id))) {
|
|
14712
|
+
transceiver.receiveSlot._updateSource('no source', undefined);
|
|
14713
|
+
}
|
|
14714
|
+
});
|
|
14703
14715
|
jmpSession.sendRequests(mediaRequests.map(mr => mr._toJmpScrRequest()));
|
|
14704
14716
|
};
|
|
14705
14717
|
if (((_a = this.dataChannel) === null || _a === void 0 ? void 0 : _a.readyState) === 'open') {
|
|
@@ -14722,7 +14734,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14722
14734
|
this.addMid(mediaType);
|
|
14723
14735
|
transceiver.replaceTransceiver(this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
|
|
14724
14736
|
direction: 'sendrecv',
|
|
14725
|
-
sendEncodings: getMediaFamily$1(mediaType) === MediaFamily.Video ? this.getVideoEncodingOptions() : undefined
|
|
14737
|
+
sendEncodings: getMediaFamily$1(mediaType) === MediaFamily.Video ? this.getVideoEncodingOptions(getMediaContent(mediaType)) : undefined
|
|
14726
14738
|
}));
|
|
14727
14739
|
transceiver.csi = generateCsi(getMediaFamily$1(mediaType), mainSceneId);
|
|
14728
14740
|
(_a = this.jmpSessions.get(mediaType)) === null || _a === void 0 ? void 0 : _a.close();
|
|
@@ -23896,43 +23908,13 @@ class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
|
23896
23908
|
}
|
|
23897
23909
|
this.roap.roapMessageReceived(roapMessage);
|
|
23898
23910
|
}
|
|
23899
|
-
publishTrack(track
|
|
23900
|
-
|
|
23901
|
-
return
|
|
23902
|
-
_this.log('publishTrack()', "called with track.kind=".concat(track.kind, ", mediaContent=").concat(mediaContent));
|
|
23903
|
-
if (track.kind === 'audio') {
|
|
23904
|
-
if (mediaContent === 'main') {
|
|
23905
|
-
yield _this.multistreamConnection.publishTrack(new LocalMicrophoneTrack(new MediaStream([track])));
|
|
23906
|
-
} else {
|
|
23907
|
-
yield _this.multistreamConnection.publishTrack(new LocalDisplayTrack(new MediaStream([track])));
|
|
23908
|
-
}
|
|
23909
|
-
} else if (track.kind === 'video') {
|
|
23910
|
-
if (mediaContent === 'main') {
|
|
23911
|
-
yield _this.multistreamConnection.publishTrack(new LocalCameraTrack(new MediaStream([track])));
|
|
23912
|
-
} else {
|
|
23913
|
-
yield _this.multistreamConnection.publishTrack(new LocalDisplayTrack(new MediaStream([track])));
|
|
23914
|
-
}
|
|
23915
|
-
}
|
|
23916
|
-
})();
|
|
23911
|
+
publishTrack(track) {
|
|
23912
|
+
this.log('publishTrack()', 'called');
|
|
23913
|
+
return this.multistreamConnection.publishTrack(track);
|
|
23917
23914
|
}
|
|
23918
|
-
unpublishTrack(track
|
|
23919
|
-
|
|
23920
|
-
return
|
|
23921
|
-
_this2.log('unpublishTrack()', "called with track.kind=".concat(track.kind, ", mediaContent=").concat(mediaContent));
|
|
23922
|
-
if (track.kind === 'audio') {
|
|
23923
|
-
if (mediaContent === 'main') {
|
|
23924
|
-
yield _this2.multistreamConnection.unpublishTrack(new LocalMicrophoneTrack(new MediaStream([track])));
|
|
23925
|
-
} else {
|
|
23926
|
-
yield _this2.multistreamConnection.unpublishTrack(new LocalDisplayTrack(new MediaStream([track])));
|
|
23927
|
-
}
|
|
23928
|
-
} else if (track.kind === 'video') {
|
|
23929
|
-
if (mediaContent === 'main') {
|
|
23930
|
-
yield _this2.multistreamConnection.unpublishTrack(new LocalCameraTrack(new MediaStream([track])));
|
|
23931
|
-
} else {
|
|
23932
|
-
yield _this2.multistreamConnection.unpublishTrack(new LocalDisplayTrack(new MediaStream([track])));
|
|
23933
|
-
}
|
|
23934
|
-
}
|
|
23935
|
-
})();
|
|
23915
|
+
unpublishTrack(track) {
|
|
23916
|
+
this.log('unpublishTrack()', 'called');
|
|
23917
|
+
return this.multistreamConnection.unpublishTrack(track);
|
|
23936
23918
|
}
|
|
23937
23919
|
createReceiveSlot(mediaType) {
|
|
23938
23920
|
this.log('createReceiveSlot()', "called");
|
|
@@ -24009,6 +23991,10 @@ exports.ActiveSpeakerInfo = ActiveSpeakerInfo;
|
|
|
24009
23991
|
exports.CodecInfo = CodecInfo;
|
|
24010
23992
|
exports.Errors = Errors;
|
|
24011
23993
|
exports.H264Codec = H264Codec;
|
|
23994
|
+
exports.LocalCameraTrack = LocalCameraTrack;
|
|
23995
|
+
exports.LocalDisplayTrack = LocalDisplayTrack;
|
|
23996
|
+
exports.LocalMicrophoneTrack = LocalMicrophoneTrack;
|
|
23997
|
+
exports.LocalTrack = LocalTrack;
|
|
24012
23998
|
exports.Media = Media;
|
|
24013
23999
|
exports.MediaRequest = MediaRequest;
|
|
24014
24000
|
exports.MultistreamRoapMediaConnection = MultistreamRoapMediaConnection;
|
package/dist/esm/index.js
CHANGED
|
@@ -14130,7 +14130,8 @@ var defaultMultistreamConnectionOptions = {
|
|
|
14130
14130
|
disableSimulcast: getBrowserDetails().name === 'Firefox',
|
|
14131
14131
|
streamSignalingMode: 'SSRC',
|
|
14132
14132
|
bundlePolicy: 'max-compat',
|
|
14133
|
-
iceServers: undefined
|
|
14133
|
+
iceServers: undefined,
|
|
14134
|
+
disableContentSimulcast: true
|
|
14134
14135
|
};
|
|
14135
14136
|
class MultistreamConnection extends EventEmitter {
|
|
14136
14137
|
constructor() {
|
|
@@ -14152,11 +14153,11 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14152
14153
|
this.overuseStateManager.start();
|
|
14153
14154
|
this.statsManager = new StatsManager(() => this.pc.getStats(), stats => this.preProcessStats(stats));
|
|
14154
14155
|
var mainSceneId = generateSceneId();
|
|
14155
|
-
var videoMainEncodingOptions = this.getVideoEncodingOptions();
|
|
14156
|
+
var videoMainEncodingOptions = this.getVideoEncodingOptions(MediaContent$1.Main);
|
|
14156
14157
|
this.createSendTransceiver(MediaType$1.VideoMain, mainSceneId, videoMainEncodingOptions);
|
|
14157
14158
|
this.createSendTransceiver(MediaType$1.AudioMain, mainSceneId);
|
|
14158
14159
|
if (this.options.floorControlledPresentation) {
|
|
14159
|
-
var videoPresentationEncodingOptions = this.getVideoEncodingOptions();
|
|
14160
|
+
var videoPresentationEncodingOptions = this.getVideoEncodingOptions(MediaContent$1.Slides);
|
|
14160
14161
|
var contentSceneId = generateSceneId();
|
|
14161
14162
|
this.createSendTransceiver(MediaType$1.VideoSlides, contentSceneId, videoPresentationEncodingOptions);
|
|
14162
14163
|
this.createSendTransceiver(MediaType$1.AudioSlides, contentSceneId);
|
|
@@ -14186,8 +14187,9 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14186
14187
|
getConnectionState() {
|
|
14187
14188
|
return this.pc.getConnectionState();
|
|
14188
14189
|
}
|
|
14189
|
-
getVideoEncodingOptions() {
|
|
14190
|
-
|
|
14190
|
+
getVideoEncodingOptions(content) {
|
|
14191
|
+
var enabledSimulcast = content === MediaContent$1.Main ? !this.options.disableSimulcast : !this.options.disableContentSimulcast;
|
|
14192
|
+
return enabledSimulcast ? [{
|
|
14191
14193
|
scaleResolutionDownBy: 4,
|
|
14192
14194
|
active: false
|
|
14193
14195
|
}, {
|
|
@@ -14619,7 +14621,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14619
14621
|
});
|
|
14620
14622
|
parsed.avMedia.filter(av => av.direction === 'sendrecv').forEach(av => {
|
|
14621
14623
|
var egressSignaler = this.streamSignalerManager.getOrCreateEgressStreamSignaler(av.mid);
|
|
14622
|
-
var simulcastEnabled = av.
|
|
14624
|
+
var simulcastEnabled = !!av.simulcast;
|
|
14623
14625
|
var rtxEnabled = av.type === 'video';
|
|
14624
14626
|
egressSignaler.signalStreams(simulcastEnabled, rtxEnabled, av);
|
|
14625
14627
|
if (av.type === 'video') {
|
|
@@ -14680,15 +14682,25 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14680
14682
|
requestMedia(mediaType, mediaRequests) {
|
|
14681
14683
|
var _a;
|
|
14682
14684
|
var task = () => {
|
|
14685
|
+
var _a;
|
|
14683
14686
|
var jmpSession = this.jmpSessions.get(mediaType);
|
|
14684
14687
|
if (!jmpSession) {
|
|
14685
14688
|
logger$4.error("Unable to find jmp session for ".concat(mediaType));
|
|
14686
14689
|
return;
|
|
14687
14690
|
}
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
|
|
14691
|
+
var requestedReceiveSlotIds = [];
|
|
14692
|
+
mediaRequests.forEach(mr => mr.receiveSlots.forEach(rs => {
|
|
14693
|
+
if (!rs.id) {
|
|
14694
|
+
logger$4.error("Running subscribe task, but ReceiveSlot ID is missing!");
|
|
14695
|
+
return;
|
|
14696
|
+
}
|
|
14697
|
+
requestedReceiveSlotIds.push(rs.id);
|
|
14698
|
+
}));
|
|
14699
|
+
(_a = this.recvTransceivers.get(mediaType)) === null || _a === void 0 ? void 0 : _a.forEach(transceiver => {
|
|
14700
|
+
if (!requestedReceiveSlotIds.some(id => compareStreamIds(id, transceiver.receiveSlot.id))) {
|
|
14701
|
+
transceiver.receiveSlot._updateSource('no source', undefined);
|
|
14702
|
+
}
|
|
14703
|
+
});
|
|
14692
14704
|
jmpSession.sendRequests(mediaRequests.map(mr => mr._toJmpScrRequest()));
|
|
14693
14705
|
};
|
|
14694
14706
|
if (((_a = this.dataChannel) === null || _a === void 0 ? void 0 : _a.readyState) === 'open') {
|
|
@@ -14711,7 +14723,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14711
14723
|
this.addMid(mediaType);
|
|
14712
14724
|
transceiver.replaceTransceiver(this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
|
|
14713
14725
|
direction: 'sendrecv',
|
|
14714
|
-
sendEncodings: getMediaFamily$1(mediaType) === MediaFamily$1.Video ? this.getVideoEncodingOptions() : undefined
|
|
14726
|
+
sendEncodings: getMediaFamily$1(mediaType) === MediaFamily$1.Video ? this.getVideoEncodingOptions(getMediaContent(mediaType)) : undefined
|
|
14715
14727
|
}));
|
|
14716
14728
|
transceiver.csi = generateCsi(getMediaFamily$1(mediaType), mainSceneId);
|
|
14717
14729
|
(_a = this.jmpSessions.get(mediaType)) === null || _a === void 0 ? void 0 : _a.close();
|
|
@@ -23885,43 +23897,13 @@ class MultistreamRoapMediaConnection extends EventEmitter$4 {
|
|
|
23885
23897
|
}
|
|
23886
23898
|
this.roap.roapMessageReceived(roapMessage);
|
|
23887
23899
|
}
|
|
23888
|
-
publishTrack(track
|
|
23889
|
-
|
|
23890
|
-
return
|
|
23891
|
-
_this.log('publishTrack()', "called with track.kind=".concat(track.kind, ", mediaContent=").concat(mediaContent));
|
|
23892
|
-
if (track.kind === 'audio') {
|
|
23893
|
-
if (mediaContent === 'main') {
|
|
23894
|
-
yield _this.multistreamConnection.publishTrack(new LocalMicrophoneTrack(new MediaStream([track])));
|
|
23895
|
-
} else {
|
|
23896
|
-
yield _this.multistreamConnection.publishTrack(new LocalDisplayTrack(new MediaStream([track])));
|
|
23897
|
-
}
|
|
23898
|
-
} else if (track.kind === 'video') {
|
|
23899
|
-
if (mediaContent === 'main') {
|
|
23900
|
-
yield _this.multistreamConnection.publishTrack(new LocalCameraTrack(new MediaStream([track])));
|
|
23901
|
-
} else {
|
|
23902
|
-
yield _this.multistreamConnection.publishTrack(new LocalDisplayTrack(new MediaStream([track])));
|
|
23903
|
-
}
|
|
23904
|
-
}
|
|
23905
|
-
})();
|
|
23900
|
+
publishTrack(track) {
|
|
23901
|
+
this.log('publishTrack()', 'called');
|
|
23902
|
+
return this.multistreamConnection.publishTrack(track);
|
|
23906
23903
|
}
|
|
23907
|
-
unpublishTrack(track
|
|
23908
|
-
|
|
23909
|
-
return
|
|
23910
|
-
_this2.log('unpublishTrack()', "called with track.kind=".concat(track.kind, ", mediaContent=").concat(mediaContent));
|
|
23911
|
-
if (track.kind === 'audio') {
|
|
23912
|
-
if (mediaContent === 'main') {
|
|
23913
|
-
yield _this2.multistreamConnection.unpublishTrack(new LocalMicrophoneTrack(new MediaStream([track])));
|
|
23914
|
-
} else {
|
|
23915
|
-
yield _this2.multistreamConnection.unpublishTrack(new LocalDisplayTrack(new MediaStream([track])));
|
|
23916
|
-
}
|
|
23917
|
-
} else if (track.kind === 'video') {
|
|
23918
|
-
if (mediaContent === 'main') {
|
|
23919
|
-
yield _this2.multistreamConnection.unpublishTrack(new LocalCameraTrack(new MediaStream([track])));
|
|
23920
|
-
} else {
|
|
23921
|
-
yield _this2.multistreamConnection.unpublishTrack(new LocalDisplayTrack(new MediaStream([track])));
|
|
23922
|
-
}
|
|
23923
|
-
}
|
|
23924
|
-
})();
|
|
23904
|
+
unpublishTrack(track) {
|
|
23905
|
+
this.log('unpublishTrack()', 'called');
|
|
23906
|
+
return this.multistreamConnection.unpublishTrack(track);
|
|
23925
23907
|
}
|
|
23926
23908
|
createReceiveSlot(mediaType) {
|
|
23927
23909
|
this.log('createReceiveSlot()', "called");
|
|
@@ -23994,4 +23976,4 @@ var Media = {
|
|
|
23994
23976
|
isBrowserSupported
|
|
23995
23977
|
};
|
|
23996
23978
|
|
|
23997
|
-
export { ActiveSpeakerInfo, CodecInfo, ConnectionState, ErrorType, Errors, Event$1 as Event, H264Codec, Media, MediaFamily, MediaRequest, MediaType, MultistreamRoapMediaConnection, Policy, ReceiveSlot, ReceiveSlotEvents, ReceiverSelectedInfo, RemoteTrackType, RoapMediaConnection, getErrorDescription, getLogger, getMediaFamily, isBrowserSupported, setLogger };
|
|
23979
|
+
export { ActiveSpeakerInfo, CodecInfo, ConnectionState, ErrorType, Errors, Event$1 as Event, H264Codec, LocalCameraTrack, LocalDisplayTrack, LocalMicrophoneTrack, LocalTrack, LocalTrackEvents, Media, MediaFamily, MediaRequest, MediaType, MultistreamRoapMediaConnection, Policy, ReceiveSlot, ReceiveSlotEvents, ReceiverSelectedInfo, RemoteTrackType, RoapMediaConnection, getErrorDescription, getLogger, getMediaFamily, isBrowserSupported, setLogger };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import EventEmitter from 'events';
|
|
3
|
-
import { MediaRequest, ReceiveSlot, TransceiverStats } from '@webex/web-client-media-engine';
|
|
3
|
+
import { LocalTrack, MediaRequest, ReceiveSlot, TransceiverStats } 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 { MediaRequest, ReceiveSlot, ReceiveSlotEvents } from '@webex/web-client-media-engine';
|
|
7
|
+
export { LocalCameraTrack, LocalDisplayTrack, LocalMicrophoneTrack, LocalTrack, LocalTrackEvents, MediaRequest, ReceiveSlot, ReceiveSlotEvents, } from '@webex/web-client-media-engine';
|
|
8
8
|
export { ActiveSpeakerInfo, CodecInfo, getMediaFamily, H264Codec, MediaFamily, MediaType, SourceState, Policy, PolicySpecificInfo, ReceiverSelectedInfo, } from '@webex/json-multistream';
|
|
9
9
|
export declare class MultistreamRoapMediaConnection extends EventEmitter {
|
|
10
10
|
private id?;
|
|
@@ -27,8 +27,8 @@ export declare class MultistreamRoapMediaConnection extends EventEmitter {
|
|
|
27
27
|
getStats(): Promise<RTCStatsReport>;
|
|
28
28
|
getTransceiverStats(): Promise<TransceiverStats>;
|
|
29
29
|
roapMessageReceived(roapMessage: RoapMessage): void;
|
|
30
|
-
publishTrack(track:
|
|
31
|
-
unpublishTrack(track:
|
|
30
|
+
publishTrack(track: LocalTrack): Promise<void>;
|
|
31
|
+
unpublishTrack(track: LocalTrack): Promise<void>;
|
|
32
32
|
createReceiveSlot(mediaType: MediaType): Promise<ReceiveSlot>;
|
|
33
33
|
requestMedia(mediaType: MediaType, mediaRequests: MediaRequest[]): void;
|
|
34
34
|
private createLocalOffer;
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"MultistreamRoapMediaConnection.d.ts","sourceRoot":"","sources":["../../../src/MediaConnection/MultistreamRoapMediaConnection.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAElC,OAAO,EAEL,UAAU,EACV,YAAY,EAGZ,WAAW,EACX,gBAAgB,EACjB,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,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,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;AAGjC,qBAAa,8BAA+B,SAAQ,YAAY;IAC9D,OAAO,CAAC,EAAE,CAAC,CAAS;IAEpB,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,OAAO,CAAC,qBAAqB,CAAwB;IAErD,OAAO,CAAC,IAAI,CAAO;IAEnB,OAAO,CAAC,qBAAqB,CAAS;gBAS1B,qBAAqB,EAAE,2BAA2B,EAAE,OAAO,CAAC,EAAE,MAAM;IAehF,OAAO,CAAC,mBAAmB;IAqC3B,OAAO,CAAC,GAAG;IAIX,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,2BAA2B;IAyCnC,OAAO,CAAC,UAAU;IA4BX,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAiB9B,KAAK,IAAI,IAAI;IAOpB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,eAAe;IAiBhB,SAAS,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE,aAAa,UAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA2B1E,kBAAkB,IAAI,eAAe;IAWrC,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC;IAOnC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAShD,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAanD,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAM9C,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAMhD,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;IAM7D,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,IAAI;IAM9E,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,kBAAkB;CAkB3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/internal-media-core",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.2",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/cjs",
|
|
6
6
|
"dist/esm",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@babel/runtime": "^7.18.9",
|
|
48
48
|
"@webex/json-multistream": "1.20.2",
|
|
49
49
|
"@webex/ts-sdp": "1.3.0",
|
|
50
|
-
"@webex/web-client-media-engine": "1.38.
|
|
50
|
+
"@webex/web-client-media-engine": "1.38.4",
|
|
51
51
|
"detectrtc": "^1.4.1",
|
|
52
52
|
"events": "^3.3.0",
|
|
53
53
|
"typed-emitter": "^2.1.0",
|