@webex/web-client-media-engine 3.29.2 → 3.29.3
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 +57 -56
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +57 -56
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -6658,23 +6658,6 @@ function areCodecInfosEqual(left, right) {
|
|
|
6658
6658
|
return left.payloadType === right.payloadType && areH264CodecsEqual(left.h264, right.h264);
|
|
6659
6659
|
}
|
|
6660
6660
|
|
|
6661
|
-
var HomerMsgType;
|
|
6662
|
-
(function (HomerMsgType) {
|
|
6663
|
-
HomerMsgType["Multistream"] = "multistream";
|
|
6664
|
-
})(HomerMsgType || (HomerMsgType = {}));
|
|
6665
|
-
class HomerMsg {
|
|
6666
|
-
constructor(msgType, payload) {
|
|
6667
|
-
this.msgType = msgType;
|
|
6668
|
-
this.payload = payload;
|
|
6669
|
-
}
|
|
6670
|
-
static fromJson(data) {
|
|
6671
|
-
if (!data.msgType || !data.payload) {
|
|
6672
|
-
return null;
|
|
6673
|
-
}
|
|
6674
|
-
return new HomerMsg(data.msgType, data.payload);
|
|
6675
|
-
}
|
|
6676
|
-
}
|
|
6677
|
-
|
|
6678
6661
|
var JmpMsgType;
|
|
6679
6662
|
(function (JmpMsgType) {
|
|
6680
6663
|
JmpMsgType["MediaRequest"] = "mediaRequest";
|
|
@@ -6707,6 +6690,19 @@ function isValidJmpMsg(msg) {
|
|
|
6707
6690
|
isValidJmpMsgPayload(maybeJmpMsg.payload));
|
|
6708
6691
|
}
|
|
6709
6692
|
|
|
6693
|
+
class MediaRequestAckMsg {
|
|
6694
|
+
constructor(mediaRequestSeqNum) {
|
|
6695
|
+
this.mediaRequestSeqNum = mediaRequestSeqNum;
|
|
6696
|
+
}
|
|
6697
|
+
toString() {
|
|
6698
|
+
return `MediaRequestAckMsg(seqNum=${this.mediaRequestSeqNum})`;
|
|
6699
|
+
}
|
|
6700
|
+
}
|
|
6701
|
+
function isValidMediaRequestAckMsg(msg) {
|
|
6702
|
+
const maybeMediaRequestAckMsg = msg;
|
|
6703
|
+
return Boolean(maybeMediaRequestAckMsg.mediaRequestSeqNum);
|
|
6704
|
+
}
|
|
6705
|
+
|
|
6710
6706
|
class MediaRequestMsg {
|
|
6711
6707
|
constructor(seqNum, requests) {
|
|
6712
6708
|
this.seqNum = seqNum;
|
|
@@ -6721,17 +6717,17 @@ function isValidMediaRequestMsg(msg) {
|
|
|
6721
6717
|
return Boolean(maybeMediaRequestMsg.seqNum && maybeMediaRequestMsg.requests);
|
|
6722
6718
|
}
|
|
6723
6719
|
|
|
6724
|
-
class
|
|
6725
|
-
constructor(
|
|
6726
|
-
this.
|
|
6720
|
+
class MediaRequestStatusAckMsg {
|
|
6721
|
+
constructor(mediaRequestStatusSeqNum) {
|
|
6722
|
+
this.mediaRequestStatusSeqNum = mediaRequestStatusSeqNum;
|
|
6727
6723
|
}
|
|
6728
6724
|
toString() {
|
|
6729
|
-
return `
|
|
6725
|
+
return `MediaRequestStatusAckMsg(seqNum=${this.mediaRequestStatusSeqNum})`;
|
|
6730
6726
|
}
|
|
6731
6727
|
}
|
|
6732
|
-
function
|
|
6733
|
-
const
|
|
6734
|
-
return Boolean(
|
|
6728
|
+
function isValidMediaRequestStatusAckMsg(msg) {
|
|
6729
|
+
const maybeMediaRequestStatusAckMsg = msg;
|
|
6730
|
+
return Boolean(maybeMediaRequestStatusAckMsg.mediaRequestStatusSeqNum);
|
|
6735
6731
|
}
|
|
6736
6732
|
|
|
6737
6733
|
function isValidMidRidStreamId(obj) {
|
|
@@ -6785,19 +6781,6 @@ function isValidMediaRequestStatusMsg(msg) {
|
|
|
6785
6781
|
maybeMediaRequestStatusMsg.streamStates.every((streamInfo) => isValidStreamInfo(streamInfo)));
|
|
6786
6782
|
}
|
|
6787
6783
|
|
|
6788
|
-
class MediaRequestStatusAckMsg {
|
|
6789
|
-
constructor(mediaRequestStatusSeqNum) {
|
|
6790
|
-
this.mediaRequestStatusSeqNum = mediaRequestStatusSeqNum;
|
|
6791
|
-
}
|
|
6792
|
-
toString() {
|
|
6793
|
-
return `MediaRequestStatusAckMsg(seqNum=${this.mediaRequestStatusSeqNum})`;
|
|
6794
|
-
}
|
|
6795
|
-
}
|
|
6796
|
-
function isValidMediaRequestStatusAckMsg(msg) {
|
|
6797
|
-
const maybeMediaRequestStatusAckMsg = msg;
|
|
6798
|
-
return Boolean(maybeMediaRequestStatusAckMsg.mediaRequestStatusSeqNum);
|
|
6799
|
-
}
|
|
6800
|
-
|
|
6801
6784
|
class ReceiverSelectedInfo {
|
|
6802
6785
|
constructor(csi) {
|
|
6803
6786
|
this.csi = csi;
|
|
@@ -6830,6 +6813,19 @@ function arePolicySpecificInfosEqual(left, right) {
|
|
|
6830
6813
|
throw new Error('Invalid PolicySpecificInfo');
|
|
6831
6814
|
}
|
|
6832
6815
|
|
|
6816
|
+
class SourceAdvertisementAckMsg {
|
|
6817
|
+
constructor(sourceAdvertisementSeqNum) {
|
|
6818
|
+
this.sourceAdvertisementSeqNum = sourceAdvertisementSeqNum;
|
|
6819
|
+
}
|
|
6820
|
+
toString() {
|
|
6821
|
+
return `SourceAdvertisementAckMsg(sourceAdvertisementSeqNum=${this.sourceAdvertisementSeqNum})`;
|
|
6822
|
+
}
|
|
6823
|
+
}
|
|
6824
|
+
function isValidSourceAdvertisementAckMsg(msg) {
|
|
6825
|
+
const maybeSourceAdvertisementAckMsg = msg;
|
|
6826
|
+
return Boolean(maybeSourceAdvertisementAckMsg.sourceAdvertisementSeqNum);
|
|
6827
|
+
}
|
|
6828
|
+
|
|
6833
6829
|
class SourceAdvertisementMsg {
|
|
6834
6830
|
constructor(seqNum, numTotalSources, numLiveSources, namedMediaGroups, videoContentHint) {
|
|
6835
6831
|
this.seqNum = seqNum;
|
|
@@ -6855,19 +6851,6 @@ function areSourceAdvertisementMsgsEqual(sourceAdvertisementMsg1, sourceAdvertis
|
|
|
6855
6851
|
sourceAdvertisementMsg1.videoContentHint === sourceAdvertisementMsg2.videoContentHint);
|
|
6856
6852
|
}
|
|
6857
6853
|
|
|
6858
|
-
class SourceAdvertisementAckMsg {
|
|
6859
|
-
constructor(sourceAdvertisementSeqNum) {
|
|
6860
|
-
this.sourceAdvertisementSeqNum = sourceAdvertisementSeqNum;
|
|
6861
|
-
}
|
|
6862
|
-
toString() {
|
|
6863
|
-
return `SourceAdvertisementAckMsg(sourceAdvertisementSeqNum=${this.sourceAdvertisementSeqNum})`;
|
|
6864
|
-
}
|
|
6865
|
-
}
|
|
6866
|
-
function isValidSourceAdvertisementAckMsg(msg) {
|
|
6867
|
-
const maybeSourceAdvertisementAckMsg = msg;
|
|
6868
|
-
return Boolean(maybeSourceAdvertisementAckMsg.sourceAdvertisementSeqNum);
|
|
6869
|
-
}
|
|
6870
|
-
|
|
6871
6854
|
class StreamRequest$1 {
|
|
6872
6855
|
constructor(policy, policySpecificInfo, ids, maxPayloadBitsPerSecond, codecInfos = []) {
|
|
6873
6856
|
this.policy = policy;
|
|
@@ -7098,8 +7081,7 @@ class JmpSession extends events$3.EventEmitter {
|
|
|
7098
7081
|
msgType,
|
|
7099
7082
|
payload,
|
|
7100
7083
|
});
|
|
7101
|
-
|
|
7102
|
-
(_a = this.txCallback) === null || _a === void 0 ? void 0 : _a.call(this, JSON.stringify(homerMsg));
|
|
7084
|
+
(_a = this.txCallback) === null || _a === void 0 ? void 0 : _a.call(this, jmpMsg);
|
|
7103
7085
|
}
|
|
7104
7086
|
handleIncomingMediaRequest(mediaRequestMsg) {
|
|
7105
7087
|
var _a;
|
|
@@ -10514,6 +10496,23 @@ class IngressSdpMunger {
|
|
|
10514
10496
|
}
|
|
10515
10497
|
}
|
|
10516
10498
|
|
|
10499
|
+
var HomerMsgType;
|
|
10500
|
+
(function (HomerMsgType) {
|
|
10501
|
+
HomerMsgType["Multistream"] = "multistream";
|
|
10502
|
+
})(HomerMsgType || (HomerMsgType = {}));
|
|
10503
|
+
class HomerMsg {
|
|
10504
|
+
constructor(msgType, payload) {
|
|
10505
|
+
this.msgType = msgType;
|
|
10506
|
+
this.payload = payload;
|
|
10507
|
+
}
|
|
10508
|
+
static fromJson(data) {
|
|
10509
|
+
if (!data.msgType || !data.payload) {
|
|
10510
|
+
return null;
|
|
10511
|
+
}
|
|
10512
|
+
return new HomerMsg(data.msgType, data.payload);
|
|
10513
|
+
}
|
|
10514
|
+
}
|
|
10515
|
+
|
|
10517
10516
|
class MidPredictor {
|
|
10518
10517
|
constructor() {
|
|
10519
10518
|
this.currentMid = 0;
|
|
@@ -15083,22 +15082,24 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
15083
15082
|
}
|
|
15084
15083
|
createJmpSession(mediaType) {
|
|
15085
15084
|
const jmpSession = new JmpSession(getMediaFamily(mediaType), getMediaContent(mediaType));
|
|
15086
|
-
jmpSession.setTxCallback((
|
|
15085
|
+
jmpSession.setTxCallback((jmpMessage) => {
|
|
15087
15086
|
var _a;
|
|
15088
15087
|
if (((_a = this.dataChannel) === null || _a === void 0 ? void 0 : _a.readyState) !== 'open') {
|
|
15089
15088
|
logger.error(`DataChannel not created or not connected. Unable to send JMP message.`);
|
|
15090
15089
|
return;
|
|
15091
15090
|
}
|
|
15091
|
+
const homerMsg = new HomerMsg(HomerMsgType.Multistream, jmpMessage);
|
|
15092
|
+
const serializedHomerMsg = JSON.stringify(homerMsg);
|
|
15092
15093
|
try {
|
|
15093
|
-
logger.info(`Sending JMP message
|
|
15094
|
-
this.dataChannel.send(
|
|
15094
|
+
logger.info(`Sending JMP message: ${serializedHomerMsg}`);
|
|
15095
|
+
this.dataChannel.send(serializedHomerMsg);
|
|
15095
15096
|
}
|
|
15096
15097
|
catch (err) {
|
|
15097
15098
|
const { bufferedAmount, readyState } = this.dataChannel;
|
|
15098
15099
|
const { sctp } = this.pc.getUnderlyingRTCPeerConnection();
|
|
15099
15100
|
const { maxMessageSize, state } = sctp || {};
|
|
15100
15101
|
logErrorAndThrow(exports.WcmeErrorType.DATA_CHANNEL_SEND_FAILED, `Sending JMP message failed with error: ${err},
|
|
15101
|
-
Message size: ${
|
|
15102
|
+
Message size: ${serializedHomerMsg.length},
|
|
15102
15103
|
Data Channel State: ${readyState},
|
|
15103
15104
|
Data Channel Buffered amount: ${bufferedAmount},
|
|
15104
15105
|
SCTP State: ${state},
|