@rongcloud/plugin-rtc 5.5.5-beem.2 → 5.5.5-beem.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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCRTC - v5.5.5-beem.2
3
- * CommitId - fb1da8eadeb0d8d9871ed026c4ccb09a9f570b77
4
- * Thu Oct 27 2022 20:08:26 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.5.5-beem.3
3
+ * CommitId - b639b89eb82e0b55da6285514427d887456ecbd2
4
+ * Mon Oct 31 2022 13:25:42 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  import { EventEmitter, BasicLogger, INaviInfo, RTCPluginContext, AbsCodec, IPromiseResult, ErrorCode, KVString, IRuntime, IAsyncRes, ConnectionStatus, ConversationType, ISendMsgOptions, IReceivedMessage, EnableLogL, IPluginGenerator } from '@rongcloud/engine';
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCRTC - v5.5.5-beem.2
3
- * CommitId - fb1da8eadeb0d8d9871ed026c4ccb09a9f570b77
4
- * Thu Oct 27 2022 20:08:26 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.5.5-beem.3
3
+ * CommitId - b639b89eb82e0b55da6285514427d887456ecbd2
4
+ * Mon Oct 31 2022 13:25:42 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  import { EventEmitter, isNumber, validate, isObject as isObject$1, ErrorCode, HttpMethod, isArray, ConnectionStatus, notEmptyObject, notEmptyArray, notEmptyString, isString, RTCMode as RTCMode$1, assert, ConversationType, isHttpUrl, isBoolean, isUndefined, forEach, VersionManage, LogL } from '@rongcloud/engine';
@@ -14738,7 +14738,7 @@ const getCommonHeader$1 = () => ({
14738
14738
  'Content-Type': 'application/json;charset=UTF-8',
14739
14739
  'Cache-Control': 'no-cache',
14740
14740
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
14741
- ClientVersion: "5.5.5-beem.2",
14741
+ ClientVersion: "5.5.5-beem.3",
14742
14742
  'Client-Session-Id': getUUID(),
14743
14743
  'Request-Id': Date.now().toString(),
14744
14744
  });
@@ -15316,7 +15316,7 @@ const getCommonHeader = () => ({
15316
15316
  'Content-Type': 'application/json;charset=UTF-8',
15317
15317
  'Cache-Control': 'no-cache',
15318
15318
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
15319
- ClientVersion: "5.5.5-beem.2",
15319
+ ClientVersion: "5.5.5-beem.3",
15320
15320
  'Client-Session-Id': getUUID(),
15321
15321
  'Request-Id': Date.now().toString(),
15322
15322
  });
@@ -15827,6 +15827,21 @@ class SourceIdMap {
15827
15827
  }
15828
15828
  SourceIdMap._instance = new Map([['sourceIdForPublishMap', new Map()], ['sourceIdForSubscribeMap', new Map()]]);
15829
15829
 
15830
+ var ReportTypes;
15831
+ (function (ReportTypes) {
15832
+ ReportTypes["TRACK"] = "track";
15833
+ ReportTypes["STREAM"] = "stream";
15834
+ ReportTypes["MEDIASOURCE"] = "media-source";
15835
+ ReportTypes["INBOUNDRTP"] = "inbound-rtp";
15836
+ ReportTypes["OUTBOUNDRTP"] = "outbound-rtp";
15837
+ ReportTypes["REMOTEINBOUNDRTP"] = "remote-inbound-rtp";
15838
+ ReportTypes["PEERCONNECTION"] = "peer-connection";
15839
+ ReportTypes["TRANSPORT"] = "transport";
15840
+ ReportTypes["CERTIFICATE"] = "certificate";
15841
+ ReportTypes["CANDIDATEPAIR"] = "candidate-pair";
15842
+ ReportTypes["REMOTECANDIDATE"] = "remote-candidate";
15843
+ ReportTypes["LOCALCANDIDATE"] = "local-candidate";
15844
+ })(ReportTypes || (ReportTypes = {}));
15830
15845
  class AbstractStatParser {
15831
15846
  constructor(_rtcPeerConn, _sdpSemantics, _currentUserId) {
15832
15847
  this._rtcPeerConn = _rtcPeerConn;
@@ -16067,6 +16082,38 @@ class AbstractStatParser {
16067
16082
  const valid = answer === null || answer === void 0 ? void 0 : answer.split('\r\nm=').some((item) => (item.includes(ssrc) && item.includes('a=inactive')));
16068
16083
  return !valid;
16069
16084
  }
16085
+ formatStateData(stats) {
16086
+ const init = {
16087
+ outbound: [],
16088
+ remoteInbound: [],
16089
+ inbound: [],
16090
+ transport: [],
16091
+ connection: [],
16092
+ };
16093
+ return Object.values(stats).reduce((result, item) => {
16094
+ if (item.type === ReportTypes.REMOTEINBOUNDRTP) {
16095
+ result.remoteInbound.push(item);
16096
+ return result;
16097
+ }
16098
+ if (item.type === ReportTypes.INBOUNDRTP) {
16099
+ result.inbound.push(item);
16100
+ return result;
16101
+ }
16102
+ if (item.type === ReportTypes.OUTBOUNDRTP) {
16103
+ result.outbound.push(item);
16104
+ return result;
16105
+ }
16106
+ if (item.type === ReportTypes.TRANSPORT) {
16107
+ result.transport.push(item);
16108
+ return result;
16109
+ }
16110
+ if (item.type === ReportTypes.PEERCONNECTION) {
16111
+ result.connection.push(item);
16112
+ return result;
16113
+ }
16114
+ return result;
16115
+ }, init);
16116
+ }
16070
16117
  }
16071
16118
  /**
16072
16119
  * 从sdp中解析出ssrc和msid并缓存
@@ -16102,24 +16149,23 @@ AbstractStatParser.formatSourceIdMapFromSdp = (sdp, type) => {
16102
16149
  */
16103
16150
  class RTCReportParser$2 extends AbstractStatParser {
16104
16151
  formatRCRTCStateReport(stats) {
16152
+ const { outbound, remoteInbound, inbound, transport, connection, } = this.formatStateData(stats);
16105
16153
  const reports = {
16106
16154
  senders: [],
16107
16155
  receivers: [],
16108
16156
  };
16109
16157
  // 当次报告创建时的时间戳
16110
- const timestamp = Math.floor(stats.RTCPeerConnection.timestamp);
16158
+ const timestamp = Math.floor(connection[0].timestamp);
16111
16159
  reports.timestamp = timestamp;
16112
- const keys = Object.keys(stats);
16113
16160
  // 总丢包数
16114
16161
  let totalPacketsLost = 0;
16115
16162
  // 上行码率总和
16116
16163
  let bitrateSend = 0;
16117
16164
  // 解析上行媒体流数据: RTCOutboundRTPVideoStream | RTCOutboundRTPAudioStream
16118
- const outboundKeys = keys.filter((key) => /^RTCOutboundRTP(Video|Audio)Stream_/.test(key));
16119
- outboundKeys.forEach((key) => {
16165
+ // const outboundKeys = keys.filter((key) => /^RTCOutboundRTP(Video|Audio)Stream_/.test(key));
16166
+ outbound.forEach((outboundInfo) => {
16120
16167
  var _a;
16121
16168
  // 本端输出数据
16122
- const outboundInfo = stats[key];
16123
16169
  if (this._sdpSemantics === 'unified-plan' && !this.isValidSender(outboundInfo)) {
16124
16170
  return;
16125
16171
  }
@@ -16209,9 +16255,8 @@ class RTCReportParser$2 extends AbstractStatParser {
16209
16255
  * outbound-rtp 存在无 remoteId 的情况,导致取不到有效的 jitter、rtt、packetsLost,
16210
16256
  * 可拿到 remote-inbound-rtp 的 localId,补充 senders 中的 jitter、rtt、packetsLost 数据,重新计算丢包率
16211
16257
  */
16212
- const remoteInboundKeys = keys.filter((key) => /RTCRemoteInboundRtp(Video|Audio)Stream_/.test(key));
16213
- remoteInboundKeys.forEach((key) => {
16214
- const { localId, jitter, roundTripTime: rtt, packetsLost, } = stats[key];
16258
+ remoteInbound.forEach((remoteInboundItem) => {
16259
+ const { localId, jitter, roundTripTime: rtt, packetsLost, } = remoteInboundItem;
16215
16260
  const sender = reports.senders.filter((item) => item.id === localId)[0];
16216
16261
  if (sender && !senderHasRemoteData(sender)) {
16217
16262
  const resourceId = this.getResourceIdByParseSdp(stats[sender.id]);
@@ -16224,9 +16269,7 @@ class RTCReportParser$2 extends AbstractStatParser {
16224
16269
  // 下行码率总和
16225
16270
  let bitrateRecv = 0;
16226
16271
  // 下行流数据解析
16227
- const inboundKeys = keys.filter((key) => /^RTCInboundRTP(Video|Audio)Stream_/.test(key));
16228
- inboundKeys.forEach((key) => {
16229
- const inboundInfo = stats[key];
16272
+ inbound.forEach((inboundInfo) => {
16230
16273
  if (this._sdpSemantics === 'unified-plan' && !this.isValidReceiver(inboundInfo)) {
16231
16274
  return;
16232
16275
  }
@@ -16275,9 +16318,8 @@ class RTCReportParser$2 extends AbstractStatParser {
16275
16318
  });
16276
16319
  });
16277
16320
  // 解析本端/远端 IP、Port 数据
16278
- const transportKey = keys.filter((key) => /^RTCTransport_/.test(key))[0];
16279
- if (transportKey) {
16280
- const rtcTransport = stats[transportKey];
16321
+ if (transport.length > 0) {
16322
+ const rtcTransport = transport[0];
16281
16323
  const { selectedCandidatePairId } = rtcTransport;
16282
16324
  if (selectedCandidatePairId) {
16283
16325
  const iceCandidatePair = stats[selectedCandidatePairId];
@@ -16312,40 +16354,26 @@ class RTCReportParser$2 extends AbstractStatParser {
16312
16354
  }
16313
16355
  getAudioLevelList(stats) {
16314
16356
  const audioLevelList = [];
16315
- const keys = Object.keys(stats);
16316
16357
  // 解析上行媒体流数据: RTCOutboundRTPVideoStream | RTCOutboundRTPAudioStream
16317
- const outboundKeys = keys.filter((key) => /^RTCOutboundRTPAudioStream_/.test(key));
16318
- outboundKeys.forEach((key) => {
16319
- var _a, _b;
16358
+ const { outbound, inbound } = this.formatStateData(stats);
16359
+ const outboundList = outbound.filter((item) => (item === null || item === void 0 ? void 0 : item.kind) === 'audio');
16360
+ outboundList.forEach((outboundInfo) => {
16361
+ var _a;
16320
16362
  // 本端输出数据
16321
- const outboundInfo = stats[key];
16322
16363
  if (this._sdpSemantics === 'unified-plan' && !this.isValidSender(outboundInfo)) {
16323
16364
  return;
16324
16365
  }
16325
16366
  const { mediaSourceId, trackId, kind } = outboundInfo;
16326
- const SingleInstance = SdpResource.getInstance();
16327
- const resourceIds = SingleInstance.streams;
16328
- let resourceId = '';
16329
- for (const streamId of resourceIds.keys()) {
16330
- const value = resourceIds.get(streamId);
16331
- if (value) {
16332
- const tracks = (_a = stats[`RTCMediaStream_${value.msid}`]) === null || _a === void 0 ? void 0 : _a.trackIds;
16333
- if (tracks && tracks.includes(outboundInfo.trackId) && kind === value.kind) {
16334
- resourceId = streamId;
16335
- }
16336
- }
16337
- }
16338
- // const resourceId = this.getResourceIdByParseSdp(outboundInfo);
16339
- const audioLevel = mediaSourceId && stats[mediaSourceId] ? stats[mediaSourceId].audioLevel : (((_b = stats[trackId]) === null || _b === void 0 ? void 0 : _b.audioLevel) || null);
16367
+ const resourceId = this.getResourceIdByParseSdp(outboundInfo);
16368
+ const audioLevel = mediaSourceId && stats[mediaSourceId] ? stats[mediaSourceId].audioLevel : (((_a = stats[trackId]) === null || _a === void 0 ? void 0 : _a.audioLevel) || null);
16340
16369
  audioLevelList.push({
16341
16370
  trackId: resourceId,
16342
16371
  audioLevel: (audioLevel || audioLevel === 0) ? handleAudioLevel(audioLevel) : null,
16343
16372
  });
16344
16373
  });
16345
16374
  // 下行流数据解析
16346
- const inboundKeys = keys.filter((key) => /^RTCInboundRTPAudioStream_/.test(key));
16347
- inboundKeys.forEach((key) => {
16348
- const inboundInfo = stats[key];
16375
+ const inboundList = inbound.filter((item) => (item === null || item === void 0 ? void 0 : item.kind) === 'audio');
16376
+ inboundList.forEach((inboundInfo) => {
16349
16377
  if (this._sdpSemantics === 'unified-plan' && !this.isValidReceiver(inboundInfo)) {
16350
16378
  return;
16351
16379
  }
@@ -18501,7 +18529,7 @@ class PolarisReporter {
18501
18529
  * 加入房间
18502
18530
  */
18503
18531
  sendR1() {
18504
- const rtcVersion = "5.5.5-beem.2";
18532
+ const rtcVersion = "5.5.5-beem.3";
18505
18533
  const imVersion = this._context.getCoreVersion();
18506
18534
  const platform = 'web';
18507
18535
  const pcName = navigator.platform;
@@ -18651,7 +18679,7 @@ class PolarisHttpReporter {
18651
18679
  _formatR1Data() {
18652
18680
  return {
18653
18681
  joinTime: this._context.userJoinTime || 0,
18654
- rtcVersion: "5.5.5-beem.2",
18682
+ rtcVersion: "5.5.5-beem.3",
18655
18683
  imVersion: this._context.getCoreVersion(),
18656
18684
  platform: 'web',
18657
18685
  device: navigator.platform,
@@ -27538,7 +27566,7 @@ class RCRTCClient extends RCMediaStreamCapture {
27538
27566
  }
27539
27567
  reportSDKInfo() {
27540
27568
  this._context.reportSDKInfo({
27541
- 'plugin-rtc': "5.5.5-beem.2",
27569
+ 'plugin-rtc': "5.5.5-beem.3",
27542
27570
  });
27543
27571
  }
27544
27572
  }
@@ -28049,7 +28077,7 @@ const encodeRtcHttp3Report = (codec, report, reportType) => {
28049
28077
  if ((reportType === RCReportType.R3 && r3Info)) {
28050
28078
  const { info } = r3Info;
28051
28079
  const { streams } = info;
28052
- let innerStreams = Array.isArray(streams) && streams.map((stream) => codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28080
+ let innerStreams = Array.isArray(streams) && streams.map((stream) => stream && codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28053
28081
  let innerInfo = codec.encode(RTCPB.RtcPBStatusInfo, Object.assign(Object.assign({}, info), { streams: innerStreams }), true);
28054
28082
  let innterR3Info = codec.encode(RTCPB.RtcPBR3Info, { info: innerInfo }, true);
28055
28083
  return codec.encode(RTCPB.RtcPBPolaris, Object.assign(Object.assign({}, commonData), { r3Info: innterR3Info }));
@@ -28057,7 +28085,7 @@ const encodeRtcHttp3Report = (codec, report, reportType) => {
28057
28085
  if ((reportType === RCReportType.R4 && r4Info)) {
28058
28086
  const { info } = r4Info;
28059
28087
  const { streams } = info;
28060
- let innerStreams = Array.isArray(streams) && streams.map((stream) => codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28088
+ let innerStreams = Array.isArray(streams) && streams.map((stream) => stream && codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28061
28089
  let innerInfo = codec.encode(RTCPB.RtcPBStatusInfo, Object.assign(Object.assign({}, info), { streams: innerStreams }), true);
28062
28090
  let innerR4Info = codec.encode(RTCPB.RtcPBR4Info, { info: innerInfo }, true);
28063
28091
  return codec.encode(RTCPB.RtcPBPolaris, Object.assign(Object.assign({}, commonData), { r4Info: innerR4Info }));
@@ -28525,7 +28553,7 @@ const installer = {
28525
28553
  console.error('Please use the https protocol or use `http://localhost` to open the page!');
28526
28554
  return false;
28527
28555
  }
28528
- VersionManage.add('plugin-rtc', "5.5.5-beem.2");
28556
+ VersionManage.add('plugin-rtc', "5.5.5-beem.3");
28529
28557
  if (!VersionManage.validEngine("^5.6.2-beem.2")) {
28530
28558
  console.error(`The current engine version '${VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"^5.6.2-beem.2"}'.`);
28531
28559
  return false;
@@ -28539,8 +28567,8 @@ const installer = {
28539
28567
  RTCLogger.setLogger(originLogger);
28540
28568
  logger.setLogger(originLogger);
28541
28569
  originLogger.warn(RCLoggerTag.L_INDEX_INSTALL_RTC_PLUGIN_O, JSON.stringify({
28542
- 'RCRTC Version': "5.5.5-beem.2",
28543
- Commit: "fb1da8eadeb0d8d9871ed026c4ccb09a9f570b77",
28570
+ 'RCRTC Version': "5.5.5-beem.3",
28571
+ Commit: "b639b89eb82e0b55da6285514427d887456ecbd2",
28544
28572
  'browserInfo.browser': browserInfo.browser,
28545
28573
  'browserInfo.supportsUnifiedPlan': browserInfo.supportsUnifiedPlan,
28546
28574
  'browserInfo.version': browserInfo.version,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCRTC - v5.5.5-beem.2
3
- * CommitId - fb1da8eadeb0d8d9871ed026c4ccb09a9f570b77
4
- * Thu Oct 27 2022 20:08:26 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.5.5-beem.3
3
+ * CommitId - b639b89eb82e0b55da6285514427d887456ecbd2
4
+ * Mon Oct 31 2022 13:25:42 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  'use strict';
@@ -14742,7 +14742,7 @@ const getCommonHeader$1 = () => ({
14742
14742
  'Content-Type': 'application/json;charset=UTF-8',
14743
14743
  'Cache-Control': 'no-cache',
14744
14744
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
14745
- ClientVersion: "5.5.5-beem.2",
14745
+ ClientVersion: "5.5.5-beem.3",
14746
14746
  'Client-Session-Id': getUUID(),
14747
14747
  'Request-Id': Date.now().toString(),
14748
14748
  });
@@ -15320,7 +15320,7 @@ const getCommonHeader = () => ({
15320
15320
  'Content-Type': 'application/json;charset=UTF-8',
15321
15321
  'Cache-Control': 'no-cache',
15322
15322
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
15323
- ClientVersion: "5.5.5-beem.2",
15323
+ ClientVersion: "5.5.5-beem.3",
15324
15324
  'Client-Session-Id': getUUID(),
15325
15325
  'Request-Id': Date.now().toString(),
15326
15326
  });
@@ -15831,6 +15831,21 @@ class SourceIdMap {
15831
15831
  }
15832
15832
  SourceIdMap._instance = new Map([['sourceIdForPublishMap', new Map()], ['sourceIdForSubscribeMap', new Map()]]);
15833
15833
 
15834
+ var ReportTypes;
15835
+ (function (ReportTypes) {
15836
+ ReportTypes["TRACK"] = "track";
15837
+ ReportTypes["STREAM"] = "stream";
15838
+ ReportTypes["MEDIASOURCE"] = "media-source";
15839
+ ReportTypes["INBOUNDRTP"] = "inbound-rtp";
15840
+ ReportTypes["OUTBOUNDRTP"] = "outbound-rtp";
15841
+ ReportTypes["REMOTEINBOUNDRTP"] = "remote-inbound-rtp";
15842
+ ReportTypes["PEERCONNECTION"] = "peer-connection";
15843
+ ReportTypes["TRANSPORT"] = "transport";
15844
+ ReportTypes["CERTIFICATE"] = "certificate";
15845
+ ReportTypes["CANDIDATEPAIR"] = "candidate-pair";
15846
+ ReportTypes["REMOTECANDIDATE"] = "remote-candidate";
15847
+ ReportTypes["LOCALCANDIDATE"] = "local-candidate";
15848
+ })(ReportTypes || (ReportTypes = {}));
15834
15849
  class AbstractStatParser {
15835
15850
  constructor(_rtcPeerConn, _sdpSemantics, _currentUserId) {
15836
15851
  this._rtcPeerConn = _rtcPeerConn;
@@ -16071,6 +16086,38 @@ class AbstractStatParser {
16071
16086
  const valid = answer === null || answer === void 0 ? void 0 : answer.split('\r\nm=').some((item) => (item.includes(ssrc) && item.includes('a=inactive')));
16072
16087
  return !valid;
16073
16088
  }
16089
+ formatStateData(stats) {
16090
+ const init = {
16091
+ outbound: [],
16092
+ remoteInbound: [],
16093
+ inbound: [],
16094
+ transport: [],
16095
+ connection: [],
16096
+ };
16097
+ return Object.values(stats).reduce((result, item) => {
16098
+ if (item.type === ReportTypes.REMOTEINBOUNDRTP) {
16099
+ result.remoteInbound.push(item);
16100
+ return result;
16101
+ }
16102
+ if (item.type === ReportTypes.INBOUNDRTP) {
16103
+ result.inbound.push(item);
16104
+ return result;
16105
+ }
16106
+ if (item.type === ReportTypes.OUTBOUNDRTP) {
16107
+ result.outbound.push(item);
16108
+ return result;
16109
+ }
16110
+ if (item.type === ReportTypes.TRANSPORT) {
16111
+ result.transport.push(item);
16112
+ return result;
16113
+ }
16114
+ if (item.type === ReportTypes.PEERCONNECTION) {
16115
+ result.connection.push(item);
16116
+ return result;
16117
+ }
16118
+ return result;
16119
+ }, init);
16120
+ }
16074
16121
  }
16075
16122
  /**
16076
16123
  * 从sdp中解析出ssrc和msid并缓存
@@ -16106,24 +16153,23 @@ AbstractStatParser.formatSourceIdMapFromSdp = (sdp, type) => {
16106
16153
  */
16107
16154
  class RTCReportParser$2 extends AbstractStatParser {
16108
16155
  formatRCRTCStateReport(stats) {
16156
+ const { outbound, remoteInbound, inbound, transport, connection, } = this.formatStateData(stats);
16109
16157
  const reports = {
16110
16158
  senders: [],
16111
16159
  receivers: [],
16112
16160
  };
16113
16161
  // 当次报告创建时的时间戳
16114
- const timestamp = Math.floor(stats.RTCPeerConnection.timestamp);
16162
+ const timestamp = Math.floor(connection[0].timestamp);
16115
16163
  reports.timestamp = timestamp;
16116
- const keys = Object.keys(stats);
16117
16164
  // 总丢包数
16118
16165
  let totalPacketsLost = 0;
16119
16166
  // 上行码率总和
16120
16167
  let bitrateSend = 0;
16121
16168
  // 解析上行媒体流数据: RTCOutboundRTPVideoStream | RTCOutboundRTPAudioStream
16122
- const outboundKeys = keys.filter((key) => /^RTCOutboundRTP(Video|Audio)Stream_/.test(key));
16123
- outboundKeys.forEach((key) => {
16169
+ // const outboundKeys = keys.filter((key) => /^RTCOutboundRTP(Video|Audio)Stream_/.test(key));
16170
+ outbound.forEach((outboundInfo) => {
16124
16171
  var _a;
16125
16172
  // 本端输出数据
16126
- const outboundInfo = stats[key];
16127
16173
  if (this._sdpSemantics === 'unified-plan' && !this.isValidSender(outboundInfo)) {
16128
16174
  return;
16129
16175
  }
@@ -16213,9 +16259,8 @@ class RTCReportParser$2 extends AbstractStatParser {
16213
16259
  * outbound-rtp 存在无 remoteId 的情况,导致取不到有效的 jitter、rtt、packetsLost,
16214
16260
  * 可拿到 remote-inbound-rtp 的 localId,补充 senders 中的 jitter、rtt、packetsLost 数据,重新计算丢包率
16215
16261
  */
16216
- const remoteInboundKeys = keys.filter((key) => /RTCRemoteInboundRtp(Video|Audio)Stream_/.test(key));
16217
- remoteInboundKeys.forEach((key) => {
16218
- const { localId, jitter, roundTripTime: rtt, packetsLost, } = stats[key];
16262
+ remoteInbound.forEach((remoteInboundItem) => {
16263
+ const { localId, jitter, roundTripTime: rtt, packetsLost, } = remoteInboundItem;
16219
16264
  const sender = reports.senders.filter((item) => item.id === localId)[0];
16220
16265
  if (sender && !senderHasRemoteData(sender)) {
16221
16266
  const resourceId = this.getResourceIdByParseSdp(stats[sender.id]);
@@ -16228,9 +16273,7 @@ class RTCReportParser$2 extends AbstractStatParser {
16228
16273
  // 下行码率总和
16229
16274
  let bitrateRecv = 0;
16230
16275
  // 下行流数据解析
16231
- const inboundKeys = keys.filter((key) => /^RTCInboundRTP(Video|Audio)Stream_/.test(key));
16232
- inboundKeys.forEach((key) => {
16233
- const inboundInfo = stats[key];
16276
+ inbound.forEach((inboundInfo) => {
16234
16277
  if (this._sdpSemantics === 'unified-plan' && !this.isValidReceiver(inboundInfo)) {
16235
16278
  return;
16236
16279
  }
@@ -16279,9 +16322,8 @@ class RTCReportParser$2 extends AbstractStatParser {
16279
16322
  });
16280
16323
  });
16281
16324
  // 解析本端/远端 IP、Port 数据
16282
- const transportKey = keys.filter((key) => /^RTCTransport_/.test(key))[0];
16283
- if (transportKey) {
16284
- const rtcTransport = stats[transportKey];
16325
+ if (transport.length > 0) {
16326
+ const rtcTransport = transport[0];
16285
16327
  const { selectedCandidatePairId } = rtcTransport;
16286
16328
  if (selectedCandidatePairId) {
16287
16329
  const iceCandidatePair = stats[selectedCandidatePairId];
@@ -16316,40 +16358,26 @@ class RTCReportParser$2 extends AbstractStatParser {
16316
16358
  }
16317
16359
  getAudioLevelList(stats) {
16318
16360
  const audioLevelList = [];
16319
- const keys = Object.keys(stats);
16320
16361
  // 解析上行媒体流数据: RTCOutboundRTPVideoStream | RTCOutboundRTPAudioStream
16321
- const outboundKeys = keys.filter((key) => /^RTCOutboundRTPAudioStream_/.test(key));
16322
- outboundKeys.forEach((key) => {
16323
- var _a, _b;
16362
+ const { outbound, inbound } = this.formatStateData(stats);
16363
+ const outboundList = outbound.filter((item) => (item === null || item === void 0 ? void 0 : item.kind) === 'audio');
16364
+ outboundList.forEach((outboundInfo) => {
16365
+ var _a;
16324
16366
  // 本端输出数据
16325
- const outboundInfo = stats[key];
16326
16367
  if (this._sdpSemantics === 'unified-plan' && !this.isValidSender(outboundInfo)) {
16327
16368
  return;
16328
16369
  }
16329
16370
  const { mediaSourceId, trackId, kind } = outboundInfo;
16330
- const SingleInstance = SdpResource.getInstance();
16331
- const resourceIds = SingleInstance.streams;
16332
- let resourceId = '';
16333
- for (const streamId of resourceIds.keys()) {
16334
- const value = resourceIds.get(streamId);
16335
- if (value) {
16336
- const tracks = (_a = stats[`RTCMediaStream_${value.msid}`]) === null || _a === void 0 ? void 0 : _a.trackIds;
16337
- if (tracks && tracks.includes(outboundInfo.trackId) && kind === value.kind) {
16338
- resourceId = streamId;
16339
- }
16340
- }
16341
- }
16342
- // const resourceId = this.getResourceIdByParseSdp(outboundInfo);
16343
- const audioLevel = mediaSourceId && stats[mediaSourceId] ? stats[mediaSourceId].audioLevel : (((_b = stats[trackId]) === null || _b === void 0 ? void 0 : _b.audioLevel) || null);
16371
+ const resourceId = this.getResourceIdByParseSdp(outboundInfo);
16372
+ const audioLevel = mediaSourceId && stats[mediaSourceId] ? stats[mediaSourceId].audioLevel : (((_a = stats[trackId]) === null || _a === void 0 ? void 0 : _a.audioLevel) || null);
16344
16373
  audioLevelList.push({
16345
16374
  trackId: resourceId,
16346
16375
  audioLevel: (audioLevel || audioLevel === 0) ? handleAudioLevel(audioLevel) : null,
16347
16376
  });
16348
16377
  });
16349
16378
  // 下行流数据解析
16350
- const inboundKeys = keys.filter((key) => /^RTCInboundRTPAudioStream_/.test(key));
16351
- inboundKeys.forEach((key) => {
16352
- const inboundInfo = stats[key];
16379
+ const inboundList = inbound.filter((item) => (item === null || item === void 0 ? void 0 : item.kind) === 'audio');
16380
+ inboundList.forEach((inboundInfo) => {
16353
16381
  if (this._sdpSemantics === 'unified-plan' && !this.isValidReceiver(inboundInfo)) {
16354
16382
  return;
16355
16383
  }
@@ -18505,7 +18533,7 @@ class PolarisReporter {
18505
18533
  * 加入房间
18506
18534
  */
18507
18535
  sendR1() {
18508
- const rtcVersion = "5.5.5-beem.2";
18536
+ const rtcVersion = "5.5.5-beem.3";
18509
18537
  const imVersion = this._context.getCoreVersion();
18510
18538
  const platform = 'web';
18511
18539
  const pcName = navigator.platform;
@@ -18655,7 +18683,7 @@ class PolarisHttpReporter {
18655
18683
  _formatR1Data() {
18656
18684
  return {
18657
18685
  joinTime: this._context.userJoinTime || 0,
18658
- rtcVersion: "5.5.5-beem.2",
18686
+ rtcVersion: "5.5.5-beem.3",
18659
18687
  imVersion: this._context.getCoreVersion(),
18660
18688
  platform: 'web',
18661
18689
  device: navigator.platform,
@@ -27542,7 +27570,7 @@ class RCRTCClient extends RCMediaStreamCapture {
27542
27570
  }
27543
27571
  reportSDKInfo() {
27544
27572
  this._context.reportSDKInfo({
27545
- 'plugin-rtc': "5.5.5-beem.2",
27573
+ 'plugin-rtc': "5.5.5-beem.3",
27546
27574
  });
27547
27575
  }
27548
27576
  }
@@ -28053,7 +28081,7 @@ const encodeRtcHttp3Report = (codec, report, reportType) => {
28053
28081
  if ((reportType === RCReportType.R3 && r3Info)) {
28054
28082
  const { info } = r3Info;
28055
28083
  const { streams } = info;
28056
- let innerStreams = Array.isArray(streams) && streams.map((stream) => codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28084
+ let innerStreams = Array.isArray(streams) && streams.map((stream) => stream && codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28057
28085
  let innerInfo = codec.encode(RTCPB.RtcPBStatusInfo, Object.assign(Object.assign({}, info), { streams: innerStreams }), true);
28058
28086
  let innterR3Info = codec.encode(RTCPB.RtcPBR3Info, { info: innerInfo }, true);
28059
28087
  return codec.encode(RTCPB.RtcPBPolaris, Object.assign(Object.assign({}, commonData), { r3Info: innterR3Info }));
@@ -28061,7 +28089,7 @@ const encodeRtcHttp3Report = (codec, report, reportType) => {
28061
28089
  if ((reportType === RCReportType.R4 && r4Info)) {
28062
28090
  const { info } = r4Info;
28063
28091
  const { streams } = info;
28064
- let innerStreams = Array.isArray(streams) && streams.map((stream) => codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28092
+ let innerStreams = Array.isArray(streams) && streams.map((stream) => stream && codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28065
28093
  let innerInfo = codec.encode(RTCPB.RtcPBStatusInfo, Object.assign(Object.assign({}, info), { streams: innerStreams }), true);
28066
28094
  let innerR4Info = codec.encode(RTCPB.RtcPBR4Info, { info: innerInfo }, true);
28067
28095
  return codec.encode(RTCPB.RtcPBPolaris, Object.assign(Object.assign({}, commonData), { r4Info: innerR4Info }));
@@ -28529,7 +28557,7 @@ const installer = {
28529
28557
  console.error('Please use the https protocol or use `http://localhost` to open the page!');
28530
28558
  return false;
28531
28559
  }
28532
- engine.VersionManage.add('plugin-rtc', "5.5.5-beem.2");
28560
+ engine.VersionManage.add('plugin-rtc', "5.5.5-beem.3");
28533
28561
  if (!engine.VersionManage.validEngine("^5.6.2-beem.2")) {
28534
28562
  console.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"^5.6.2-beem.2"}'.`);
28535
28563
  return false;
@@ -28543,8 +28571,8 @@ const installer = {
28543
28571
  RTCLogger.setLogger(originLogger);
28544
28572
  logger.setLogger(originLogger);
28545
28573
  originLogger.warn(RCLoggerTag.L_INDEX_INSTALL_RTC_PLUGIN_O, JSON.stringify({
28546
- 'RCRTC Version': "5.5.5-beem.2",
28547
- Commit: "fb1da8eadeb0d8d9871ed026c4ccb09a9f570b77",
28574
+ 'RCRTC Version': "5.5.5-beem.3",
28575
+ Commit: "b639b89eb82e0b55da6285514427d887456ecbd2",
28548
28576
  'browserInfo.browser': browserInfo.browser,
28549
28577
  'browserInfo.supportsUnifiedPlan': browserInfo.supportsUnifiedPlan,
28550
28578
  'browserInfo.version': browserInfo.version,
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCRTC - v5.5.5-beem.2
3
- * CommitId - fb1da8eadeb0d8d9871ed026c4ccb09a9f570b77
4
- * Thu Oct 27 2022 20:08:26 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.5.5-beem.3
3
+ * CommitId - b639b89eb82e0b55da6285514427d887456ecbd2
4
+ * Mon Oct 31 2022 13:25:42 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  (function (global, factory) {
@@ -14742,7 +14742,7 @@
14742
14742
  'Content-Type': 'application/json;charset=UTF-8',
14743
14743
  'Cache-Control': 'no-cache',
14744
14744
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
14745
- ClientVersion: "5.5.5-beem.2",
14745
+ ClientVersion: "5.5.5-beem.3",
14746
14746
  'Client-Session-Id': getUUID(),
14747
14747
  'Request-Id': Date.now().toString(),
14748
14748
  });
@@ -15320,7 +15320,7 @@
15320
15320
  'Content-Type': 'application/json;charset=UTF-8',
15321
15321
  'Cache-Control': 'no-cache',
15322
15322
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
15323
- ClientVersion: "5.5.5-beem.2",
15323
+ ClientVersion: "5.5.5-beem.3",
15324
15324
  'Client-Session-Id': getUUID(),
15325
15325
  'Request-Id': Date.now().toString(),
15326
15326
  });
@@ -15831,6 +15831,21 @@
15831
15831
  }
15832
15832
  SourceIdMap._instance = new Map([['sourceIdForPublishMap', new Map()], ['sourceIdForSubscribeMap', new Map()]]);
15833
15833
 
15834
+ var ReportTypes;
15835
+ (function (ReportTypes) {
15836
+ ReportTypes["TRACK"] = "track";
15837
+ ReportTypes["STREAM"] = "stream";
15838
+ ReportTypes["MEDIASOURCE"] = "media-source";
15839
+ ReportTypes["INBOUNDRTP"] = "inbound-rtp";
15840
+ ReportTypes["OUTBOUNDRTP"] = "outbound-rtp";
15841
+ ReportTypes["REMOTEINBOUNDRTP"] = "remote-inbound-rtp";
15842
+ ReportTypes["PEERCONNECTION"] = "peer-connection";
15843
+ ReportTypes["TRANSPORT"] = "transport";
15844
+ ReportTypes["CERTIFICATE"] = "certificate";
15845
+ ReportTypes["CANDIDATEPAIR"] = "candidate-pair";
15846
+ ReportTypes["REMOTECANDIDATE"] = "remote-candidate";
15847
+ ReportTypes["LOCALCANDIDATE"] = "local-candidate";
15848
+ })(ReportTypes || (ReportTypes = {}));
15834
15849
  class AbstractStatParser {
15835
15850
  constructor(_rtcPeerConn, _sdpSemantics, _currentUserId) {
15836
15851
  this._rtcPeerConn = _rtcPeerConn;
@@ -16071,6 +16086,38 @@
16071
16086
  const valid = answer === null || answer === void 0 ? void 0 : answer.split('\r\nm=').some((item) => (item.includes(ssrc) && item.includes('a=inactive')));
16072
16087
  return !valid;
16073
16088
  }
16089
+ formatStateData(stats) {
16090
+ const init = {
16091
+ outbound: [],
16092
+ remoteInbound: [],
16093
+ inbound: [],
16094
+ transport: [],
16095
+ connection: [],
16096
+ };
16097
+ return Object.values(stats).reduce((result, item) => {
16098
+ if (item.type === ReportTypes.REMOTEINBOUNDRTP) {
16099
+ result.remoteInbound.push(item);
16100
+ return result;
16101
+ }
16102
+ if (item.type === ReportTypes.INBOUNDRTP) {
16103
+ result.inbound.push(item);
16104
+ return result;
16105
+ }
16106
+ if (item.type === ReportTypes.OUTBOUNDRTP) {
16107
+ result.outbound.push(item);
16108
+ return result;
16109
+ }
16110
+ if (item.type === ReportTypes.TRANSPORT) {
16111
+ result.transport.push(item);
16112
+ return result;
16113
+ }
16114
+ if (item.type === ReportTypes.PEERCONNECTION) {
16115
+ result.connection.push(item);
16116
+ return result;
16117
+ }
16118
+ return result;
16119
+ }, init);
16120
+ }
16074
16121
  }
16075
16122
  /**
16076
16123
  * 从sdp中解析出ssrc和msid并缓存
@@ -16106,24 +16153,23 @@
16106
16153
  */
16107
16154
  class RTCReportParser$2 extends AbstractStatParser {
16108
16155
  formatRCRTCStateReport(stats) {
16156
+ const { outbound, remoteInbound, inbound, transport, connection, } = this.formatStateData(stats);
16109
16157
  const reports = {
16110
16158
  senders: [],
16111
16159
  receivers: [],
16112
16160
  };
16113
16161
  // 当次报告创建时的时间戳
16114
- const timestamp = Math.floor(stats.RTCPeerConnection.timestamp);
16162
+ const timestamp = Math.floor(connection[0].timestamp);
16115
16163
  reports.timestamp = timestamp;
16116
- const keys = Object.keys(stats);
16117
16164
  // 总丢包数
16118
16165
  let totalPacketsLost = 0;
16119
16166
  // 上行码率总和
16120
16167
  let bitrateSend = 0;
16121
16168
  // 解析上行媒体流数据: RTCOutboundRTPVideoStream | RTCOutboundRTPAudioStream
16122
- const outboundKeys = keys.filter((key) => /^RTCOutboundRTP(Video|Audio)Stream_/.test(key));
16123
- outboundKeys.forEach((key) => {
16169
+ // const outboundKeys = keys.filter((key) => /^RTCOutboundRTP(Video|Audio)Stream_/.test(key));
16170
+ outbound.forEach((outboundInfo) => {
16124
16171
  var _a;
16125
16172
  // 本端输出数据
16126
- const outboundInfo = stats[key];
16127
16173
  if (this._sdpSemantics === 'unified-plan' && !this.isValidSender(outboundInfo)) {
16128
16174
  return;
16129
16175
  }
@@ -16213,9 +16259,8 @@
16213
16259
  * outbound-rtp 存在无 remoteId 的情况,导致取不到有效的 jitter、rtt、packetsLost,
16214
16260
  * 可拿到 remote-inbound-rtp 的 localId,补充 senders 中的 jitter、rtt、packetsLost 数据,重新计算丢包率
16215
16261
  */
16216
- const remoteInboundKeys = keys.filter((key) => /RTCRemoteInboundRtp(Video|Audio)Stream_/.test(key));
16217
- remoteInboundKeys.forEach((key) => {
16218
- const { localId, jitter, roundTripTime: rtt, packetsLost, } = stats[key];
16262
+ remoteInbound.forEach((remoteInboundItem) => {
16263
+ const { localId, jitter, roundTripTime: rtt, packetsLost, } = remoteInboundItem;
16219
16264
  const sender = reports.senders.filter((item) => item.id === localId)[0];
16220
16265
  if (sender && !senderHasRemoteData(sender)) {
16221
16266
  const resourceId = this.getResourceIdByParseSdp(stats[sender.id]);
@@ -16228,9 +16273,7 @@
16228
16273
  // 下行码率总和
16229
16274
  let bitrateRecv = 0;
16230
16275
  // 下行流数据解析
16231
- const inboundKeys = keys.filter((key) => /^RTCInboundRTP(Video|Audio)Stream_/.test(key));
16232
- inboundKeys.forEach((key) => {
16233
- const inboundInfo = stats[key];
16276
+ inbound.forEach((inboundInfo) => {
16234
16277
  if (this._sdpSemantics === 'unified-plan' && !this.isValidReceiver(inboundInfo)) {
16235
16278
  return;
16236
16279
  }
@@ -16279,9 +16322,8 @@
16279
16322
  });
16280
16323
  });
16281
16324
  // 解析本端/远端 IP、Port 数据
16282
- const transportKey = keys.filter((key) => /^RTCTransport_/.test(key))[0];
16283
- if (transportKey) {
16284
- const rtcTransport = stats[transportKey];
16325
+ if (transport.length > 0) {
16326
+ const rtcTransport = transport[0];
16285
16327
  const { selectedCandidatePairId } = rtcTransport;
16286
16328
  if (selectedCandidatePairId) {
16287
16329
  const iceCandidatePair = stats[selectedCandidatePairId];
@@ -16316,40 +16358,26 @@
16316
16358
  }
16317
16359
  getAudioLevelList(stats) {
16318
16360
  const audioLevelList = [];
16319
- const keys = Object.keys(stats);
16320
16361
  // 解析上行媒体流数据: RTCOutboundRTPVideoStream | RTCOutboundRTPAudioStream
16321
- const outboundKeys = keys.filter((key) => /^RTCOutboundRTPAudioStream_/.test(key));
16322
- outboundKeys.forEach((key) => {
16323
- var _a, _b;
16362
+ const { outbound, inbound } = this.formatStateData(stats);
16363
+ const outboundList = outbound.filter((item) => (item === null || item === void 0 ? void 0 : item.kind) === 'audio');
16364
+ outboundList.forEach((outboundInfo) => {
16365
+ var _a;
16324
16366
  // 本端输出数据
16325
- const outboundInfo = stats[key];
16326
16367
  if (this._sdpSemantics === 'unified-plan' && !this.isValidSender(outboundInfo)) {
16327
16368
  return;
16328
16369
  }
16329
16370
  const { mediaSourceId, trackId, kind } = outboundInfo;
16330
- const SingleInstance = SdpResource.getInstance();
16331
- const resourceIds = SingleInstance.streams;
16332
- let resourceId = '';
16333
- for (const streamId of resourceIds.keys()) {
16334
- const value = resourceIds.get(streamId);
16335
- if (value) {
16336
- const tracks = (_a = stats[`RTCMediaStream_${value.msid}`]) === null || _a === void 0 ? void 0 : _a.trackIds;
16337
- if (tracks && tracks.includes(outboundInfo.trackId) && kind === value.kind) {
16338
- resourceId = streamId;
16339
- }
16340
- }
16341
- }
16342
- // const resourceId = this.getResourceIdByParseSdp(outboundInfo);
16343
- const audioLevel = mediaSourceId && stats[mediaSourceId] ? stats[mediaSourceId].audioLevel : (((_b = stats[trackId]) === null || _b === void 0 ? void 0 : _b.audioLevel) || null);
16371
+ const resourceId = this.getResourceIdByParseSdp(outboundInfo);
16372
+ const audioLevel = mediaSourceId && stats[mediaSourceId] ? stats[mediaSourceId].audioLevel : (((_a = stats[trackId]) === null || _a === void 0 ? void 0 : _a.audioLevel) || null);
16344
16373
  audioLevelList.push({
16345
16374
  trackId: resourceId,
16346
16375
  audioLevel: (audioLevel || audioLevel === 0) ? handleAudioLevel(audioLevel) : null,
16347
16376
  });
16348
16377
  });
16349
16378
  // 下行流数据解析
16350
- const inboundKeys = keys.filter((key) => /^RTCInboundRTPAudioStream_/.test(key));
16351
- inboundKeys.forEach((key) => {
16352
- const inboundInfo = stats[key];
16379
+ const inboundList = inbound.filter((item) => (item === null || item === void 0 ? void 0 : item.kind) === 'audio');
16380
+ inboundList.forEach((inboundInfo) => {
16353
16381
  if (this._sdpSemantics === 'unified-plan' && !this.isValidReceiver(inboundInfo)) {
16354
16382
  return;
16355
16383
  }
@@ -18505,7 +18533,7 @@
18505
18533
  * 加入房间
18506
18534
  */
18507
18535
  sendR1() {
18508
- const rtcVersion = "5.5.5-beem.2";
18536
+ const rtcVersion = "5.5.5-beem.3";
18509
18537
  const imVersion = this._context.getCoreVersion();
18510
18538
  const platform = 'web';
18511
18539
  const pcName = navigator.platform;
@@ -18655,7 +18683,7 @@
18655
18683
  _formatR1Data() {
18656
18684
  return {
18657
18685
  joinTime: this._context.userJoinTime || 0,
18658
- rtcVersion: "5.5.5-beem.2",
18686
+ rtcVersion: "5.5.5-beem.3",
18659
18687
  imVersion: this._context.getCoreVersion(),
18660
18688
  platform: 'web',
18661
18689
  device: navigator.platform,
@@ -27542,7 +27570,7 @@
27542
27570
  }
27543
27571
  reportSDKInfo() {
27544
27572
  this._context.reportSDKInfo({
27545
- 'plugin-rtc': "5.5.5-beem.2",
27573
+ 'plugin-rtc': "5.5.5-beem.3",
27546
27574
  });
27547
27575
  }
27548
27576
  }
@@ -28053,7 +28081,7 @@ message probuf {
28053
28081
  if ((reportType === RCReportType.R3 && r3Info)) {
28054
28082
  const { info } = r3Info;
28055
28083
  const { streams } = info;
28056
- let innerStreams = Array.isArray(streams) && streams.map((stream) => codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28084
+ let innerStreams = Array.isArray(streams) && streams.map((stream) => stream && codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28057
28085
  let innerInfo = codec.encode(RTCPB.RtcPBStatusInfo, Object.assign(Object.assign({}, info), { streams: innerStreams }), true);
28058
28086
  let innterR3Info = codec.encode(RTCPB.RtcPBR3Info, { info: innerInfo }, true);
28059
28087
  return codec.encode(RTCPB.RtcPBPolaris, Object.assign(Object.assign({}, commonData), { r3Info: innterR3Info }));
@@ -28061,7 +28089,7 @@ message probuf {
28061
28089
  if ((reportType === RCReportType.R4 && r4Info)) {
28062
28090
  const { info } = r4Info;
28063
28091
  const { streams } = info;
28064
- let innerStreams = Array.isArray(streams) && streams.map((stream) => codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28092
+ let innerStreams = Array.isArray(streams) && streams.map((stream) => stream && codec.encode(RTCPB.RtcPBStreamInfo, stream, true));
28065
28093
  let innerInfo = codec.encode(RTCPB.RtcPBStatusInfo, Object.assign(Object.assign({}, info), { streams: innerStreams }), true);
28066
28094
  let innerR4Info = codec.encode(RTCPB.RtcPBR4Info, { info: innerInfo }, true);
28067
28095
  return codec.encode(RTCPB.RtcPBPolaris, Object.assign(Object.assign({}, commonData), { r4Info: innerR4Info }));
@@ -28529,7 +28557,7 @@ message probuf {
28529
28557
  console.error('Please use the https protocol or use `http://localhost` to open the page!');
28530
28558
  return false;
28531
28559
  }
28532
- engine.VersionManage.add('plugin-rtc', "5.5.5-beem.2");
28560
+ engine.VersionManage.add('plugin-rtc', "5.5.5-beem.3");
28533
28561
  if (!engine.VersionManage.validEngine("^5.6.2-beem.2")) {
28534
28562
  console.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"^5.6.2-beem.2"}'.`);
28535
28563
  return false;
@@ -28543,8 +28571,8 @@ message probuf {
28543
28571
  RTCLogger.setLogger(originLogger);
28544
28572
  logger.setLogger(originLogger);
28545
28573
  originLogger.warn(RCLoggerTag.L_INDEX_INSTALL_RTC_PLUGIN_O, JSON.stringify({
28546
- 'RCRTC Version': "5.5.5-beem.2",
28547
- Commit: "fb1da8eadeb0d8d9871ed026c4ccb09a9f570b77",
28574
+ 'RCRTC Version': "5.5.5-beem.3",
28575
+ Commit: "b639b89eb82e0b55da6285514427d887456ecbd2",
28548
28576
  'browserInfo.browser': browserInfo.browser,
28549
28577
  'browserInfo.supportsUnifiedPlan': browserInfo.supportsUnifiedPlan,
28550
28578
  'browserInfo.version': browserInfo.version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rongcloud/plugin-rtc",
3
- "version": "5.5.5-beem.2",
3
+ "version": "5.5.5-beem.3",
4
4
  "description": "@rongcloud/plugin-rtc",
5
5
  "main": "./dist/index.js",
6
6
  "__attrs__": {
@@ -33,5 +33,5 @@
33
33
  "peerDependencies": {
34
34
  "@rongcloud/engine": "^5.6.2-beem.2"
35
35
  },
36
- "__commit__": "fb1da8eadeb0d8d9871ed026c4ccb09a9f570b77"
36
+ "__commit__": "b639b89eb82e0b55da6285514427d887456ecbd2"
37
37
  }