@rongcloud/plugin-rtc 5.5.5-beem → 5.5.5-beem.1

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
3
- * CommitId - b8e57d36680c1d71921cded6b91771d4dfd4f3e8
4
- * Fri Oct 14 2022 19:54:22 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.5.5-beem.1
3
+ * CommitId - 754e3eb733996df922d0d59502a9e2d06927e3a0
4
+ * Fri Oct 14 2022 22:43:32 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
3
- * CommitId - b8e57d36680c1d71921cded6b91771d4dfd4f3e8
4
- * Fri Oct 14 2022 19:54:22 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.5.5-beem.1
3
+ * CommitId - 754e3eb733996df922d0d59502a9e2d06927e3a0
4
+ * Fri Oct 14 2022 22:43:32 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  import { Logger, 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';
@@ -14651,7 +14651,7 @@ const getCommonHeader$1 = () => ({
14651
14651
  'Content-Type': 'application/json;charset=UTF-8',
14652
14652
  'Cache-Control': 'no-cache',
14653
14653
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
14654
- ClientVersion: "5.5.5-beem",
14654
+ ClientVersion: "5.5.5-beem.1",
14655
14655
  'Client-Session-Id': getUUID(),
14656
14656
  'Request-Id': Date.now().toString(),
14657
14657
  });
@@ -14791,7 +14791,7 @@ const getCommonHeader = () => ({
14791
14791
  'Content-Type': 'application/json;charset=UTF-8',
14792
14792
  'Cache-Control': 'no-cache',
14793
14793
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
14794
- ClientVersion: "5.5.5-beem",
14794
+ ClientVersion: "5.5.5-beem.1",
14795
14795
  'Client-Session-Id': getUUID(),
14796
14796
  'Request-Id': Date.now().toString(),
14797
14797
  });
@@ -18117,7 +18117,7 @@ class PolarisReporter {
18117
18117
  * 加入房间
18118
18118
  */
18119
18119
  sendR1() {
18120
- const rtcVersion = "5.5.5-beem";
18120
+ const rtcVersion = "5.5.5-beem.1";
18121
18121
  const imVersion = this._context.getCoreVersion();
18122
18122
  const platform = 'web';
18123
18123
  const pcName = navigator.platform;
@@ -18266,7 +18266,7 @@ class PolarisHttpReporter {
18266
18266
  _formatR1Data() {
18267
18267
  return {
18268
18268
  joinTime: this._context.userJoinTime || 0,
18269
- rtcVersion: "5.5.5-beem",
18269
+ rtcVersion: "5.5.5-beem.1",
18270
18270
  imVersion: this._context.getCoreVersion(),
18271
18271
  platform: 'web',
18272
18272
  device: navigator.platform,
@@ -20183,6 +20183,7 @@ function transPullDataToStateMsgCont(data) {
20183
20183
  };
20184
20184
  return content;
20185
20185
  }
20186
+ const isIncludeUris = (userData) => userData.some((item) => (item.key === 'uris' || item.key === 'cdn_uris'));
20186
20187
  /**
20187
20188
  * 通知拉取到的增量房间数据格式为 IRoomStatus
20188
20189
  * 把 IRoomStatus 转化为通用解析资源方法(ParseRemoteResCommand)需要的数据
@@ -20190,13 +20191,21 @@ function transPullDataToStateMsgCont(data) {
20190
20191
  function transPullDataToResMsgCont(data) {
20191
20192
  var _a, _b;
20192
20193
  const { userId, userData } = data;
20194
+ /**
20195
+ * PullRoomStatusEvent 为 3 时,并不全代表资源变动,
20196
+ * 房间内设置的其他 key value,也会被拉下来,event 为 3
20197
+ */
20198
+ const hasUris = isIncludeUris(userData);
20199
+ if (!hasUris) {
20200
+ return;
20201
+ }
20193
20202
  const uris = (_a = userData.filter((item) => (item.key === 'uris'))[0]) === null || _a === void 0 ? void 0 : _a.value;
20194
20203
  const cdnUris = (_b = userData.filter((item) => (item.key === 'cdn_uris'))[0]) === null || _b === void 0 ? void 0 : _b.value;
20195
20204
  return {
20196
20205
  userId,
20197
20206
  content: {
20198
- uris: uris && JSON.parse(uris),
20199
- cdn_uris: cdnUris && JSON.parse(cdnUris),
20207
+ uris: (uris && JSON.parse(uris)),
20208
+ cdn_uris: (cdnUris && JSON.parse(cdnUris)),
20200
20209
  },
20201
20210
  };
20202
20211
  }
@@ -21792,7 +21801,14 @@ class PullRTCRoomStatusCommand extends BaseCommand {
21792
21801
  for (let index = 0; index < roomStatus.length; index++) {
21793
21802
  const item = roomStatus[index];
21794
21803
  if (item.event === PullRoomStatusEvent.RESOURCECHANGE) {
21795
- const { content, userId } = transPullDataToResMsgCont(item);
21804
+ const resData = transPullDataToResMsgCont(item);
21805
+ /**
21806
+ * 无 uris 或 cdn_uris 时,无需继续执行解析资源数据
21807
+ */
21808
+ if (!resData) {
21809
+ continue;
21810
+ }
21811
+ const { content, userId } = resData;
21796
21812
  if (userId === store.crtUserId) {
21797
21813
  continue;
21798
21814
  }
@@ -27799,7 +27815,7 @@ class RCRTCClient extends RCMediaStreamCapture {
27799
27815
  }
27800
27816
  reportSDKInfo() {
27801
27817
  this._context.reportSDKInfo({
27802
- 'plugin-rtc': "5.5.5-beem",
27818
+ 'plugin-rtc': "5.5.5-beem.1",
27803
27819
  });
27804
27820
  }
27805
27821
  }
@@ -28791,7 +28807,7 @@ const installer = {
28791
28807
  console.error('Please use the https protocol or use `http://localhost` to open the page!');
28792
28808
  return false;
28793
28809
  }
28794
- VersionManage.add('plugin-rtc', "5.5.5-beem");
28810
+ VersionManage.add('plugin-rtc', "5.5.5-beem.1");
28795
28811
  if (!VersionManage.validEngine("^5.6.0-beem")) {
28796
28812
  console.error(`The current engine version '${VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"^5.6.0-beem"}'.`);
28797
28813
  return false;
@@ -28804,8 +28820,8 @@ const installer = {
28804
28820
  logger.setOutputLevel(options.logLevel || LogL.DEBUG);
28805
28821
  RTCLogger.setLogger(logger);
28806
28822
  logger.warn(RCLoggerTag.L_INDEX_INSTALL_RTC_PLUGIN_O, JSON.stringify({
28807
- 'RCRTC Version': "5.5.5-beem",
28808
- Commit: "b8e57d36680c1d71921cded6b91771d4dfd4f3e8",
28823
+ 'RCRTC Version': "5.5.5-beem.1",
28824
+ Commit: "754e3eb733996df922d0d59502a9e2d06927e3a0",
28809
28825
  'browserInfo.browser': browserInfo.browser,
28810
28826
  'browserInfo.supportsUnifiedPlan': browserInfo.supportsUnifiedPlan,
28811
28827
  'browserInfo.version': browserInfo.version,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCRTC - v5.5.5-beem
3
- * CommitId - b8e57d36680c1d71921cded6b91771d4dfd4f3e8
4
- * Fri Oct 14 2022 19:54:22 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.5.5-beem.1
3
+ * CommitId - 754e3eb733996df922d0d59502a9e2d06927e3a0
4
+ * Fri Oct 14 2022 22:43:32 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  'use strict';
@@ -14655,7 +14655,7 @@ const getCommonHeader$1 = () => ({
14655
14655
  'Content-Type': 'application/json;charset=UTF-8',
14656
14656
  'Cache-Control': 'no-cache',
14657
14657
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
14658
- ClientVersion: "5.5.5-beem",
14658
+ ClientVersion: "5.5.5-beem.1",
14659
14659
  'Client-Session-Id': getUUID(),
14660
14660
  'Request-Id': Date.now().toString(),
14661
14661
  });
@@ -14795,7 +14795,7 @@ const getCommonHeader = () => ({
14795
14795
  'Content-Type': 'application/json;charset=UTF-8',
14796
14796
  'Cache-Control': 'no-cache',
14797
14797
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
14798
- ClientVersion: "5.5.5-beem",
14798
+ ClientVersion: "5.5.5-beem.1",
14799
14799
  'Client-Session-Id': getUUID(),
14800
14800
  'Request-Id': Date.now().toString(),
14801
14801
  });
@@ -18121,7 +18121,7 @@ class PolarisReporter {
18121
18121
  * 加入房间
18122
18122
  */
18123
18123
  sendR1() {
18124
- const rtcVersion = "5.5.5-beem";
18124
+ const rtcVersion = "5.5.5-beem.1";
18125
18125
  const imVersion = this._context.getCoreVersion();
18126
18126
  const platform = 'web';
18127
18127
  const pcName = navigator.platform;
@@ -18270,7 +18270,7 @@ class PolarisHttpReporter {
18270
18270
  _formatR1Data() {
18271
18271
  return {
18272
18272
  joinTime: this._context.userJoinTime || 0,
18273
- rtcVersion: "5.5.5-beem",
18273
+ rtcVersion: "5.5.5-beem.1",
18274
18274
  imVersion: this._context.getCoreVersion(),
18275
18275
  platform: 'web',
18276
18276
  device: navigator.platform,
@@ -20187,6 +20187,7 @@ function transPullDataToStateMsgCont(data) {
20187
20187
  };
20188
20188
  return content;
20189
20189
  }
20190
+ const isIncludeUris = (userData) => userData.some((item) => (item.key === 'uris' || item.key === 'cdn_uris'));
20190
20191
  /**
20191
20192
  * 通知拉取到的增量房间数据格式为 IRoomStatus
20192
20193
  * 把 IRoomStatus 转化为通用解析资源方法(ParseRemoteResCommand)需要的数据
@@ -20194,13 +20195,21 @@ function transPullDataToStateMsgCont(data) {
20194
20195
  function transPullDataToResMsgCont(data) {
20195
20196
  var _a, _b;
20196
20197
  const { userId, userData } = data;
20198
+ /**
20199
+ * PullRoomStatusEvent 为 3 时,并不全代表资源变动,
20200
+ * 房间内设置的其他 key value,也会被拉下来,event 为 3
20201
+ */
20202
+ const hasUris = isIncludeUris(userData);
20203
+ if (!hasUris) {
20204
+ return;
20205
+ }
20197
20206
  const uris = (_a = userData.filter((item) => (item.key === 'uris'))[0]) === null || _a === void 0 ? void 0 : _a.value;
20198
20207
  const cdnUris = (_b = userData.filter((item) => (item.key === 'cdn_uris'))[0]) === null || _b === void 0 ? void 0 : _b.value;
20199
20208
  return {
20200
20209
  userId,
20201
20210
  content: {
20202
- uris: uris && JSON.parse(uris),
20203
- cdn_uris: cdnUris && JSON.parse(cdnUris),
20211
+ uris: (uris && JSON.parse(uris)),
20212
+ cdn_uris: (cdnUris && JSON.parse(cdnUris)),
20204
20213
  },
20205
20214
  };
20206
20215
  }
@@ -21796,7 +21805,14 @@ class PullRTCRoomStatusCommand extends BaseCommand {
21796
21805
  for (let index = 0; index < roomStatus.length; index++) {
21797
21806
  const item = roomStatus[index];
21798
21807
  if (item.event === PullRoomStatusEvent.RESOURCECHANGE) {
21799
- const { content, userId } = transPullDataToResMsgCont(item);
21808
+ const resData = transPullDataToResMsgCont(item);
21809
+ /**
21810
+ * 无 uris 或 cdn_uris 时,无需继续执行解析资源数据
21811
+ */
21812
+ if (!resData) {
21813
+ continue;
21814
+ }
21815
+ const { content, userId } = resData;
21800
21816
  if (userId === store.crtUserId) {
21801
21817
  continue;
21802
21818
  }
@@ -27803,7 +27819,7 @@ class RCRTCClient extends RCMediaStreamCapture {
27803
27819
  }
27804
27820
  reportSDKInfo() {
27805
27821
  this._context.reportSDKInfo({
27806
- 'plugin-rtc': "5.5.5-beem",
27822
+ 'plugin-rtc': "5.5.5-beem.1",
27807
27823
  });
27808
27824
  }
27809
27825
  }
@@ -28795,7 +28811,7 @@ const installer = {
28795
28811
  console.error('Please use the https protocol or use `http://localhost` to open the page!');
28796
28812
  return false;
28797
28813
  }
28798
- engine.VersionManage.add('plugin-rtc', "5.5.5-beem");
28814
+ engine.VersionManage.add('plugin-rtc', "5.5.5-beem.1");
28799
28815
  if (!engine.VersionManage.validEngine("^5.6.0-beem")) {
28800
28816
  console.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"^5.6.0-beem"}'.`);
28801
28817
  return false;
@@ -28808,8 +28824,8 @@ const installer = {
28808
28824
  logger.setOutputLevel(options.logLevel || engine.LogL.DEBUG);
28809
28825
  RTCLogger.setLogger(logger);
28810
28826
  logger.warn(RCLoggerTag.L_INDEX_INSTALL_RTC_PLUGIN_O, JSON.stringify({
28811
- 'RCRTC Version': "5.5.5-beem",
28812
- Commit: "b8e57d36680c1d71921cded6b91771d4dfd4f3e8",
28827
+ 'RCRTC Version': "5.5.5-beem.1",
28828
+ Commit: "754e3eb733996df922d0d59502a9e2d06927e3a0",
28813
28829
  'browserInfo.browser': browserInfo.browser,
28814
28830
  'browserInfo.supportsUnifiedPlan': browserInfo.supportsUnifiedPlan,
28815
28831
  'browserInfo.version': browserInfo.version,
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCRTC - v5.5.5-beem
3
- * CommitId - b8e57d36680c1d71921cded6b91771d4dfd4f3e8
4
- * Fri Oct 14 2022 19:54:22 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.5.5-beem.1
3
+ * CommitId - 754e3eb733996df922d0d59502a9e2d06927e3a0
4
+ * Fri Oct 14 2022 22:43:32 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  (function (global, factory) {
@@ -14655,7 +14655,7 @@
14655
14655
  'Content-Type': 'application/json;charset=UTF-8',
14656
14656
  'Cache-Control': 'no-cache',
14657
14657
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
14658
- ClientVersion: "5.5.5-beem",
14658
+ ClientVersion: "5.5.5-beem.1",
14659
14659
  'Client-Session-Id': getUUID(),
14660
14660
  'Request-Id': Date.now().toString(),
14661
14661
  });
@@ -14795,7 +14795,7 @@
14795
14795
  'Content-Type': 'application/json;charset=UTF-8',
14796
14796
  'Cache-Control': 'no-cache',
14797
14797
  ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
14798
- ClientVersion: "5.5.5-beem",
14798
+ ClientVersion: "5.5.5-beem.1",
14799
14799
  'Client-Session-Id': getUUID(),
14800
14800
  'Request-Id': Date.now().toString(),
14801
14801
  });
@@ -18121,7 +18121,7 @@
18121
18121
  * 加入房间
18122
18122
  */
18123
18123
  sendR1() {
18124
- const rtcVersion = "5.5.5-beem";
18124
+ const rtcVersion = "5.5.5-beem.1";
18125
18125
  const imVersion = this._context.getCoreVersion();
18126
18126
  const platform = 'web';
18127
18127
  const pcName = navigator.platform;
@@ -18270,7 +18270,7 @@
18270
18270
  _formatR1Data() {
18271
18271
  return {
18272
18272
  joinTime: this._context.userJoinTime || 0,
18273
- rtcVersion: "5.5.5-beem",
18273
+ rtcVersion: "5.5.5-beem.1",
18274
18274
  imVersion: this._context.getCoreVersion(),
18275
18275
  platform: 'web',
18276
18276
  device: navigator.platform,
@@ -20187,6 +20187,7 @@
20187
20187
  };
20188
20188
  return content;
20189
20189
  }
20190
+ const isIncludeUris = (userData) => userData.some((item) => (item.key === 'uris' || item.key === 'cdn_uris'));
20190
20191
  /**
20191
20192
  * 通知拉取到的增量房间数据格式为 IRoomStatus
20192
20193
  * 把 IRoomStatus 转化为通用解析资源方法(ParseRemoteResCommand)需要的数据
@@ -20194,13 +20195,21 @@
20194
20195
  function transPullDataToResMsgCont(data) {
20195
20196
  var _a, _b;
20196
20197
  const { userId, userData } = data;
20198
+ /**
20199
+ * PullRoomStatusEvent 为 3 时,并不全代表资源变动,
20200
+ * 房间内设置的其他 key value,也会被拉下来,event 为 3
20201
+ */
20202
+ const hasUris = isIncludeUris(userData);
20203
+ if (!hasUris) {
20204
+ return;
20205
+ }
20197
20206
  const uris = (_a = userData.filter((item) => (item.key === 'uris'))[0]) === null || _a === void 0 ? void 0 : _a.value;
20198
20207
  const cdnUris = (_b = userData.filter((item) => (item.key === 'cdn_uris'))[0]) === null || _b === void 0 ? void 0 : _b.value;
20199
20208
  return {
20200
20209
  userId,
20201
20210
  content: {
20202
- uris: uris && JSON.parse(uris),
20203
- cdn_uris: cdnUris && JSON.parse(cdnUris),
20211
+ uris: (uris && JSON.parse(uris)),
20212
+ cdn_uris: (cdnUris && JSON.parse(cdnUris)),
20204
20213
  },
20205
20214
  };
20206
20215
  }
@@ -21796,7 +21805,14 @@
21796
21805
  for (let index = 0; index < roomStatus.length; index++) {
21797
21806
  const item = roomStatus[index];
21798
21807
  if (item.event === PullRoomStatusEvent.RESOURCECHANGE) {
21799
- const { content, userId } = transPullDataToResMsgCont(item);
21808
+ const resData = transPullDataToResMsgCont(item);
21809
+ /**
21810
+ * 无 uris 或 cdn_uris 时,无需继续执行解析资源数据
21811
+ */
21812
+ if (!resData) {
21813
+ continue;
21814
+ }
21815
+ const { content, userId } = resData;
21800
21816
  if (userId === store.crtUserId) {
21801
21817
  continue;
21802
21818
  }
@@ -27803,7 +27819,7 @@
27803
27819
  }
27804
27820
  reportSDKInfo() {
27805
27821
  this._context.reportSDKInfo({
27806
- 'plugin-rtc': "5.5.5-beem",
27822
+ 'plugin-rtc': "5.5.5-beem.1",
27807
27823
  });
27808
27824
  }
27809
27825
  }
@@ -28795,7 +28811,7 @@ message probuf {
28795
28811
  console.error('Please use the https protocol or use `http://localhost` to open the page!');
28796
28812
  return false;
28797
28813
  }
28798
- engine.VersionManage.add('plugin-rtc', "5.5.5-beem");
28814
+ engine.VersionManage.add('plugin-rtc', "5.5.5-beem.1");
28799
28815
  if (!engine.VersionManage.validEngine("^5.6.0-beem")) {
28800
28816
  console.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"^5.6.0-beem"}'.`);
28801
28817
  return false;
@@ -28808,8 +28824,8 @@ message probuf {
28808
28824
  logger.setOutputLevel(options.logLevel || engine.LogL.DEBUG);
28809
28825
  RTCLogger.setLogger(logger);
28810
28826
  logger.warn(RCLoggerTag.L_INDEX_INSTALL_RTC_PLUGIN_O, JSON.stringify({
28811
- 'RCRTC Version': "5.5.5-beem",
28812
- Commit: "b8e57d36680c1d71921cded6b91771d4dfd4f3e8",
28827
+ 'RCRTC Version': "5.5.5-beem.1",
28828
+ Commit: "754e3eb733996df922d0d59502a9e2d06927e3a0",
28813
28829
  'browserInfo.browser': browserInfo.browser,
28814
28830
  'browserInfo.supportsUnifiedPlan': browserInfo.supportsUnifiedPlan,
28815
28831
  '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",
3
+ "version": "5.5.5-beem.1",
4
4
  "description": "@rongcloud/plugin-rtc",
5
5
  "main": "./dist/index.js",
6
6
  "__attrs__": {
@@ -30,5 +30,5 @@
30
30
  "engines": {
31
31
  "node": ">=10.0.0"
32
32
  },
33
- "__commit__": "b8e57d36680c1d71921cded6b91771d4dfd4f3e8"
33
+ "__commit__": "754e3eb733996df922d0d59502a9e2d06927e3a0"
34
34
  }