@rongcloud/plugin-rtc 5.6.3-alpha.5 → 5.6.3-alpha.6
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/LICENSE +0 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +36 -26
- package/dist/index.js +36 -26
- package/dist/index.umd.js +36 -26
- package/package.json +2 -2
package/LICENSE
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.6.3-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.6.3-alpha.6
|
|
3
|
+
* CommitId - 57278f3bdddf532d3b7f4f3cc38e026fe8569537
|
|
4
|
+
* Thu Nov 17 2022 16:28:36 GMT+0800 (中国标准时间)
|
|
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,12 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.6.3-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.6.3-alpha.6
|
|
3
|
+
* CommitId - 57278f3bdddf532d3b7f4f3cc38e026fe8569537
|
|
4
|
+
* Thu Nov 17 2022 16:28:36 GMT+0800 (中国标准时间)
|
|
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';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/*! *****************************************************************************
|
|
10
10
|
Copyright (c) Microsoft Corporation.
|
|
11
11
|
|
|
12
12
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -8050,7 +8050,7 @@ class Pinger {
|
|
|
8050
8050
|
this._latestTimestamp = Date.now();
|
|
8051
8051
|
this._started = false;
|
|
8052
8052
|
this._timer = null;
|
|
8053
|
-
this._pullRTCRoomStatus = (roomId, tracId) => { };
|
|
8053
|
+
this._pullRTCRoomStatus = (roomId, tracId, targetPullVersion) => { };
|
|
8054
8054
|
const { roomId, roomMode } = this._store;
|
|
8055
8055
|
this._roomId = roomId;
|
|
8056
8056
|
this._roomMode = roomMode;
|
|
@@ -8101,7 +8101,7 @@ class Pinger {
|
|
|
8101
8101
|
(_d = (_c = this._context) === null || _c === void 0 ? void 0 : _c.logger) === null || _d === void 0 ? void 0 : _d.info(RCLoggerTag.L_RTCPING_PULL_ROOM_STATUS_O, JSON.stringify({
|
|
8102
8102
|
pingerVersion,
|
|
8103
8103
|
}), traceId);
|
|
8104
|
-
this._pullRTCRoomStatus(this._roomId, traceId);
|
|
8104
|
+
this._pullRTCRoomStatus(this._roomId, traceId, pingerVersion);
|
|
8105
8105
|
}
|
|
8106
8106
|
}
|
|
8107
8107
|
_checkAlive() {
|
|
@@ -14800,7 +14800,7 @@ const getCommonHeader$1 = () => ({
|
|
|
14800
14800
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
14801
14801
|
'Cache-Control': 'no-cache',
|
|
14802
14802
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
14803
|
-
ClientVersion: "5.6.3-alpha.
|
|
14803
|
+
ClientVersion: "5.6.3-alpha.6",
|
|
14804
14804
|
'Client-Session-Id': getUUID(),
|
|
14805
14805
|
'Request-Id': Date.now().toString(),
|
|
14806
14806
|
});
|
|
@@ -15376,7 +15376,7 @@ const getCommonHeader = () => ({
|
|
|
15376
15376
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
15377
15377
|
'Cache-Control': 'no-cache',
|
|
15378
15378
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
15379
|
-
ClientVersion: "5.6.3-alpha.
|
|
15379
|
+
ClientVersion: "5.6.3-alpha.6",
|
|
15380
15380
|
'Client-Session-Id': getUUID(),
|
|
15381
15381
|
'Request-Id': Date.now().toString(),
|
|
15382
15382
|
});
|
|
@@ -18684,7 +18684,7 @@ class PolarisReporter {
|
|
|
18684
18684
|
* 加入房间
|
|
18685
18685
|
*/
|
|
18686
18686
|
sendR1() {
|
|
18687
|
-
const rtcVersion = "5.6.3-alpha.
|
|
18687
|
+
const rtcVersion = "5.6.3-alpha.6";
|
|
18688
18688
|
const imVersion = this._context.getCoreVersion();
|
|
18689
18689
|
const platform = 'web';
|
|
18690
18690
|
const pcName = navigator.platform;
|
|
@@ -18834,7 +18834,7 @@ class PolarisHttpReporter {
|
|
|
18834
18834
|
_formatR1Data() {
|
|
18835
18835
|
return {
|
|
18836
18836
|
joinTime: this._context.userJoinTime || 0,
|
|
18837
|
-
rtcVersion: "5.6.3-alpha.
|
|
18837
|
+
rtcVersion: "5.6.3-alpha.6",
|
|
18838
18838
|
imVersion: this._context.getCoreVersion(),
|
|
18839
18839
|
platform: 'web',
|
|
18840
18840
|
device: navigator.platform,
|
|
@@ -22132,7 +22132,7 @@ var PullRoomStatusEvent;
|
|
|
22132
22132
|
})(PullRoomStatusEvent || (PullRoomStatusEvent = {}));
|
|
22133
22133
|
|
|
22134
22134
|
class PullRTCRoomStatusCommand extends BaseCommand {
|
|
22135
|
-
constructor(_roomId, _traceId, _context, _callbacks, _subhook, _dealUserAppListener) {
|
|
22135
|
+
constructor(_roomId, _traceId, _context, _callbacks, _subhook, _dealUserAppListener, _targetPullVersion) {
|
|
22136
22136
|
super();
|
|
22137
22137
|
this._roomId = _roomId;
|
|
22138
22138
|
this._traceId = _traceId;
|
|
@@ -22140,28 +22140,38 @@ class PullRTCRoomStatusCommand extends BaseCommand {
|
|
|
22140
22140
|
this._callbacks = _callbacks;
|
|
22141
22141
|
this._subhook = _subhook;
|
|
22142
22142
|
this._dealUserAppListener = _dealUserAppListener;
|
|
22143
|
+
this._targetPullVersion = _targetPullVersion;
|
|
22143
22144
|
}
|
|
22144
22145
|
get kind() {
|
|
22145
22146
|
return RCCommandKind.PULL_RTCROOM_STATUS;
|
|
22146
22147
|
}
|
|
22147
22148
|
execute(store, invoker) {
|
|
22148
|
-
var _a, _b, _c;
|
|
22149
|
+
var _a, _b, _c, _d;
|
|
22149
22150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22150
|
-
const
|
|
22151
|
+
const localVersion = store.getRoomStatusVersion();
|
|
22151
22152
|
(_a = this._context.logger) === null || _a === void 0 ? void 0 : _a.info(RCLoggerTag.L_PULL_ROOM_STATUS_T, JSON.stringify({
|
|
22152
22153
|
roomId: this._roomId,
|
|
22153
|
-
|
|
22154
|
+
localVersion,
|
|
22154
22155
|
}), this._traceId);
|
|
22155
|
-
|
|
22156
|
-
if (code !== ErrorCode.SUCCESS) {
|
|
22156
|
+
if (this._targetPullVersion && this._targetPullVersion <= localVersion) {
|
|
22157
22157
|
(_b = this._context.logger) === null || _b === void 0 ? void 0 : _b.info(RCLoggerTag.L_PULL_ROOM_STATUS_R, JSON.stringify({
|
|
22158
|
+
status: RCLoggerStatus.SUCCESSED,
|
|
22159
|
+
msg: 'the roomData has been pulled',
|
|
22160
|
+
localVersion,
|
|
22161
|
+
targetPullVersion: this._targetPullVersion,
|
|
22162
|
+
}), this._traceId);
|
|
22163
|
+
return { code: ErrorCode.SUCCESS };
|
|
22164
|
+
}
|
|
22165
|
+
const { code, data } = yield this._context.pullRTCRoomStatus(this._roomId, localVersion);
|
|
22166
|
+
if (code !== ErrorCode.SUCCESS) {
|
|
22167
|
+
(_c = this._context.logger) === null || _c === void 0 ? void 0 : _c.info(RCLoggerTag.L_PULL_ROOM_STATUS_R, JSON.stringify({
|
|
22158
22168
|
status: RCLoggerStatus.FAILED,
|
|
22159
22169
|
code,
|
|
22160
22170
|
}), this._traceId);
|
|
22161
22171
|
return { code };
|
|
22162
22172
|
}
|
|
22163
22173
|
const { bFullStatus, version: newVersion, usersData, roomStatus, } = data;
|
|
22164
|
-
(
|
|
22174
|
+
(_d = this._context.logger) === null || _d === void 0 ? void 0 : _d.info(RCLoggerTag.L_PULL_ROOM_STATUS_R, JSON.stringify({
|
|
22165
22175
|
bFullStatus,
|
|
22166
22176
|
version: int64ToTimestamp(newVersion),
|
|
22167
22177
|
usersData,
|
|
@@ -22279,12 +22289,12 @@ class RCAbstractRoom extends EventEmitter {
|
|
|
22279
22289
|
// eslint-disable-next-line no-case-declarations
|
|
22280
22290
|
const tracId = (_d = (_c = this._context) === null || _c === void 0 ? void 0 : _c.logger) === null || _d === void 0 ? void 0 : _d.createTraceId();
|
|
22281
22291
|
(_f = (_e = this._context) === null || _e === void 0 ? void 0 : _e.logger) === null || _f === void 0 ? void 0 : _f.info(RCLoggerTag.L_RTCNTF_PULL_ROOM_STATUS_O, null, tracId);
|
|
22282
|
-
this._startPullRTCRoomStatus(roomId, tracId);
|
|
22292
|
+
this._startPullRTCRoomStatus(roomId, tracId, time);
|
|
22283
22293
|
break;
|
|
22284
22294
|
}
|
|
22285
22295
|
}));
|
|
22286
22296
|
}
|
|
22287
|
-
_pullRTCRoomStatus(roomId, tracId) {
|
|
22297
|
+
_pullRTCRoomStatus(roomId, tracId, targetPullVersion) {
|
|
22288
22298
|
return new PullRTCRoomStatusCommand(roomId, tracId, this._context, {
|
|
22289
22299
|
onUserJoin: this._callAppListener.bind(this, 'onUserJoin'),
|
|
22290
22300
|
onUserLeave: this._callAppListener.bind(this, 'onUserLeave'),
|
|
@@ -22293,15 +22303,15 @@ class RCAbstractRoom extends EventEmitter {
|
|
|
22293
22303
|
onTrackPublish: this._onTrackPublish.bind(this),
|
|
22294
22304
|
onTrackUnpublish: this._onTrackUnpublish.bind(this),
|
|
22295
22305
|
onCDNEnableChange: this._callAppListener.bind(this, 'onCDNEnableChange'),
|
|
22296
|
-
}, this._subhook.bind(this), this._dealUserAppListener.bind(this));
|
|
22306
|
+
}, this._subhook.bind(this), this._dealUserAppListener.bind(this), targetPullVersion);
|
|
22297
22307
|
}
|
|
22298
22308
|
/**
|
|
22299
22309
|
* 拉取房间数据
|
|
22300
22310
|
* @param roomId 房间 id
|
|
22301
22311
|
*/
|
|
22302
|
-
_startPullRTCRoomStatus(roomId, tracId) {
|
|
22312
|
+
_startPullRTCRoomStatus(roomId, tracId, targetPullVersion) {
|
|
22303
22313
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22304
|
-
yield this._invoker.push(this._pullRTCRoomStatus(roomId, tracId));
|
|
22314
|
+
yield this._invoker.push(this._pullRTCRoomStatus(roomId, tracId, targetPullVersion));
|
|
22305
22315
|
});
|
|
22306
22316
|
}
|
|
22307
22317
|
__innerInit(mode, joinType, livingType, innerUserDatas, outerUserDatas, traceId) {
|
|
@@ -28074,7 +28084,7 @@ class RCRTCClient extends RCMediaStreamCapture {
|
|
|
28074
28084
|
}
|
|
28075
28085
|
reportSDKInfo() {
|
|
28076
28086
|
this._context.reportSDKInfo({
|
|
28077
|
-
'plugin-rtc': "5.6.3-alpha.
|
|
28087
|
+
'plugin-rtc': "5.6.3-alpha.6",
|
|
28078
28088
|
});
|
|
28079
28089
|
}
|
|
28080
28090
|
}
|
|
@@ -29067,7 +29077,7 @@ const installer = {
|
|
|
29067
29077
|
console.error('Please use the https protocol or use `http://localhost` to open the page!');
|
|
29068
29078
|
return false;
|
|
29069
29079
|
}
|
|
29070
|
-
VersionManage.add('plugin-rtc', "5.6.3-alpha.
|
|
29080
|
+
VersionManage.add('plugin-rtc', "5.6.3-alpha.6");
|
|
29071
29081
|
if (!VersionManage.validEngine("^5.6.0")) {
|
|
29072
29082
|
console.error(`The current engine version '${VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"^5.6.0"}'.`);
|
|
29073
29083
|
return false;
|
|
@@ -29081,8 +29091,8 @@ const installer = {
|
|
|
29081
29091
|
RTCLogger.setLogger(originLogger);
|
|
29082
29092
|
logger.setLogger(originLogger);
|
|
29083
29093
|
originLogger.warn(RCLoggerTag.L_INDEX_INSTALL_RTC_PLUGIN_O, JSON.stringify({
|
|
29084
|
-
'RCRTC Version': "5.6.3-alpha.
|
|
29085
|
-
Commit: "
|
|
29094
|
+
'RCRTC Version': "5.6.3-alpha.6",
|
|
29095
|
+
Commit: "57278f3bdddf532d3b7f4f3cc38e026fe8569537",
|
|
29086
29096
|
'browserInfo.browser': browserInfo.browser,
|
|
29087
29097
|
'browserInfo.supportsUnifiedPlan': browserInfo.supportsUnifiedPlan,
|
|
29088
29098
|
'browserInfo.version': browserInfo.version,
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.6.3-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.6.3-alpha.6
|
|
3
|
+
* CommitId - 57278f3bdddf532d3b7f4f3cc38e026fe8569537
|
|
4
|
+
* Thu Nov 17 2022 16:28:36 GMT+0800 (中国标准时间)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
10
10
|
|
|
11
11
|
var engine = require('@rongcloud/engine');
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
/*! *****************************************************************************
|
|
14
14
|
Copyright (c) Microsoft Corporation.
|
|
15
15
|
|
|
16
16
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -8054,7 +8054,7 @@ class Pinger {
|
|
|
8054
8054
|
this._latestTimestamp = Date.now();
|
|
8055
8055
|
this._started = false;
|
|
8056
8056
|
this._timer = null;
|
|
8057
|
-
this._pullRTCRoomStatus = (roomId, tracId) => { };
|
|
8057
|
+
this._pullRTCRoomStatus = (roomId, tracId, targetPullVersion) => { };
|
|
8058
8058
|
const { roomId, roomMode } = this._store;
|
|
8059
8059
|
this._roomId = roomId;
|
|
8060
8060
|
this._roomMode = roomMode;
|
|
@@ -8105,7 +8105,7 @@ class Pinger {
|
|
|
8105
8105
|
(_d = (_c = this._context) === null || _c === void 0 ? void 0 : _c.logger) === null || _d === void 0 ? void 0 : _d.info(RCLoggerTag.L_RTCPING_PULL_ROOM_STATUS_O, JSON.stringify({
|
|
8106
8106
|
pingerVersion,
|
|
8107
8107
|
}), traceId);
|
|
8108
|
-
this._pullRTCRoomStatus(this._roomId, traceId);
|
|
8108
|
+
this._pullRTCRoomStatus(this._roomId, traceId, pingerVersion);
|
|
8109
8109
|
}
|
|
8110
8110
|
}
|
|
8111
8111
|
_checkAlive() {
|
|
@@ -14804,7 +14804,7 @@ const getCommonHeader$1 = () => ({
|
|
|
14804
14804
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
14805
14805
|
'Cache-Control': 'no-cache',
|
|
14806
14806
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
14807
|
-
ClientVersion: "5.6.3-alpha.
|
|
14807
|
+
ClientVersion: "5.6.3-alpha.6",
|
|
14808
14808
|
'Client-Session-Id': getUUID(),
|
|
14809
14809
|
'Request-Id': Date.now().toString(),
|
|
14810
14810
|
});
|
|
@@ -15380,7 +15380,7 @@ const getCommonHeader = () => ({
|
|
|
15380
15380
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
15381
15381
|
'Cache-Control': 'no-cache',
|
|
15382
15382
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
15383
|
-
ClientVersion: "5.6.3-alpha.
|
|
15383
|
+
ClientVersion: "5.6.3-alpha.6",
|
|
15384
15384
|
'Client-Session-Id': getUUID(),
|
|
15385
15385
|
'Request-Id': Date.now().toString(),
|
|
15386
15386
|
});
|
|
@@ -18688,7 +18688,7 @@ class PolarisReporter {
|
|
|
18688
18688
|
* 加入房间
|
|
18689
18689
|
*/
|
|
18690
18690
|
sendR1() {
|
|
18691
|
-
const rtcVersion = "5.6.3-alpha.
|
|
18691
|
+
const rtcVersion = "5.6.3-alpha.6";
|
|
18692
18692
|
const imVersion = this._context.getCoreVersion();
|
|
18693
18693
|
const platform = 'web';
|
|
18694
18694
|
const pcName = navigator.platform;
|
|
@@ -18838,7 +18838,7 @@ class PolarisHttpReporter {
|
|
|
18838
18838
|
_formatR1Data() {
|
|
18839
18839
|
return {
|
|
18840
18840
|
joinTime: this._context.userJoinTime || 0,
|
|
18841
|
-
rtcVersion: "5.6.3-alpha.
|
|
18841
|
+
rtcVersion: "5.6.3-alpha.6",
|
|
18842
18842
|
imVersion: this._context.getCoreVersion(),
|
|
18843
18843
|
platform: 'web',
|
|
18844
18844
|
device: navigator.platform,
|
|
@@ -22136,7 +22136,7 @@ var PullRoomStatusEvent;
|
|
|
22136
22136
|
})(PullRoomStatusEvent || (PullRoomStatusEvent = {}));
|
|
22137
22137
|
|
|
22138
22138
|
class PullRTCRoomStatusCommand extends BaseCommand {
|
|
22139
|
-
constructor(_roomId, _traceId, _context, _callbacks, _subhook, _dealUserAppListener) {
|
|
22139
|
+
constructor(_roomId, _traceId, _context, _callbacks, _subhook, _dealUserAppListener, _targetPullVersion) {
|
|
22140
22140
|
super();
|
|
22141
22141
|
this._roomId = _roomId;
|
|
22142
22142
|
this._traceId = _traceId;
|
|
@@ -22144,28 +22144,38 @@ class PullRTCRoomStatusCommand extends BaseCommand {
|
|
|
22144
22144
|
this._callbacks = _callbacks;
|
|
22145
22145
|
this._subhook = _subhook;
|
|
22146
22146
|
this._dealUserAppListener = _dealUserAppListener;
|
|
22147
|
+
this._targetPullVersion = _targetPullVersion;
|
|
22147
22148
|
}
|
|
22148
22149
|
get kind() {
|
|
22149
22150
|
return RCCommandKind.PULL_RTCROOM_STATUS;
|
|
22150
22151
|
}
|
|
22151
22152
|
execute(store, invoker) {
|
|
22152
|
-
var _a, _b, _c;
|
|
22153
|
+
var _a, _b, _c, _d;
|
|
22153
22154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22154
|
-
const
|
|
22155
|
+
const localVersion = store.getRoomStatusVersion();
|
|
22155
22156
|
(_a = this._context.logger) === null || _a === void 0 ? void 0 : _a.info(RCLoggerTag.L_PULL_ROOM_STATUS_T, JSON.stringify({
|
|
22156
22157
|
roomId: this._roomId,
|
|
22157
|
-
|
|
22158
|
+
localVersion,
|
|
22158
22159
|
}), this._traceId);
|
|
22159
|
-
|
|
22160
|
-
if (code !== engine.ErrorCode.SUCCESS) {
|
|
22160
|
+
if (this._targetPullVersion && this._targetPullVersion <= localVersion) {
|
|
22161
22161
|
(_b = this._context.logger) === null || _b === void 0 ? void 0 : _b.info(RCLoggerTag.L_PULL_ROOM_STATUS_R, JSON.stringify({
|
|
22162
|
+
status: RCLoggerStatus.SUCCESSED,
|
|
22163
|
+
msg: 'the roomData has been pulled',
|
|
22164
|
+
localVersion,
|
|
22165
|
+
targetPullVersion: this._targetPullVersion,
|
|
22166
|
+
}), this._traceId);
|
|
22167
|
+
return { code: engine.ErrorCode.SUCCESS };
|
|
22168
|
+
}
|
|
22169
|
+
const { code, data } = yield this._context.pullRTCRoomStatus(this._roomId, localVersion);
|
|
22170
|
+
if (code !== engine.ErrorCode.SUCCESS) {
|
|
22171
|
+
(_c = this._context.logger) === null || _c === void 0 ? void 0 : _c.info(RCLoggerTag.L_PULL_ROOM_STATUS_R, JSON.stringify({
|
|
22162
22172
|
status: RCLoggerStatus.FAILED,
|
|
22163
22173
|
code,
|
|
22164
22174
|
}), this._traceId);
|
|
22165
22175
|
return { code };
|
|
22166
22176
|
}
|
|
22167
22177
|
const { bFullStatus, version: newVersion, usersData, roomStatus, } = data;
|
|
22168
|
-
(
|
|
22178
|
+
(_d = this._context.logger) === null || _d === void 0 ? void 0 : _d.info(RCLoggerTag.L_PULL_ROOM_STATUS_R, JSON.stringify({
|
|
22169
22179
|
bFullStatus,
|
|
22170
22180
|
version: int64ToTimestamp(newVersion),
|
|
22171
22181
|
usersData,
|
|
@@ -22283,12 +22293,12 @@ class RCAbstractRoom extends engine.EventEmitter {
|
|
|
22283
22293
|
// eslint-disable-next-line no-case-declarations
|
|
22284
22294
|
const tracId = (_d = (_c = this._context) === null || _c === void 0 ? void 0 : _c.logger) === null || _d === void 0 ? void 0 : _d.createTraceId();
|
|
22285
22295
|
(_f = (_e = this._context) === null || _e === void 0 ? void 0 : _e.logger) === null || _f === void 0 ? void 0 : _f.info(RCLoggerTag.L_RTCNTF_PULL_ROOM_STATUS_O, null, tracId);
|
|
22286
|
-
this._startPullRTCRoomStatus(roomId, tracId);
|
|
22296
|
+
this._startPullRTCRoomStatus(roomId, tracId, time);
|
|
22287
22297
|
break;
|
|
22288
22298
|
}
|
|
22289
22299
|
}));
|
|
22290
22300
|
}
|
|
22291
|
-
_pullRTCRoomStatus(roomId, tracId) {
|
|
22301
|
+
_pullRTCRoomStatus(roomId, tracId, targetPullVersion) {
|
|
22292
22302
|
return new PullRTCRoomStatusCommand(roomId, tracId, this._context, {
|
|
22293
22303
|
onUserJoin: this._callAppListener.bind(this, 'onUserJoin'),
|
|
22294
22304
|
onUserLeave: this._callAppListener.bind(this, 'onUserLeave'),
|
|
@@ -22297,15 +22307,15 @@ class RCAbstractRoom extends engine.EventEmitter {
|
|
|
22297
22307
|
onTrackPublish: this._onTrackPublish.bind(this),
|
|
22298
22308
|
onTrackUnpublish: this._onTrackUnpublish.bind(this),
|
|
22299
22309
|
onCDNEnableChange: this._callAppListener.bind(this, 'onCDNEnableChange'),
|
|
22300
|
-
}, this._subhook.bind(this), this._dealUserAppListener.bind(this));
|
|
22310
|
+
}, this._subhook.bind(this), this._dealUserAppListener.bind(this), targetPullVersion);
|
|
22301
22311
|
}
|
|
22302
22312
|
/**
|
|
22303
22313
|
* 拉取房间数据
|
|
22304
22314
|
* @param roomId 房间 id
|
|
22305
22315
|
*/
|
|
22306
|
-
_startPullRTCRoomStatus(roomId, tracId) {
|
|
22316
|
+
_startPullRTCRoomStatus(roomId, tracId, targetPullVersion) {
|
|
22307
22317
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22308
|
-
yield this._invoker.push(this._pullRTCRoomStatus(roomId, tracId));
|
|
22318
|
+
yield this._invoker.push(this._pullRTCRoomStatus(roomId, tracId, targetPullVersion));
|
|
22309
22319
|
});
|
|
22310
22320
|
}
|
|
22311
22321
|
__innerInit(mode, joinType, livingType, innerUserDatas, outerUserDatas, traceId) {
|
|
@@ -28078,7 +28088,7 @@ class RCRTCClient extends RCMediaStreamCapture {
|
|
|
28078
28088
|
}
|
|
28079
28089
|
reportSDKInfo() {
|
|
28080
28090
|
this._context.reportSDKInfo({
|
|
28081
|
-
'plugin-rtc': "5.6.3-alpha.
|
|
28091
|
+
'plugin-rtc': "5.6.3-alpha.6",
|
|
28082
28092
|
});
|
|
28083
28093
|
}
|
|
28084
28094
|
}
|
|
@@ -29071,7 +29081,7 @@ const installer = {
|
|
|
29071
29081
|
console.error('Please use the https protocol or use `http://localhost` to open the page!');
|
|
29072
29082
|
return false;
|
|
29073
29083
|
}
|
|
29074
|
-
engine.VersionManage.add('plugin-rtc', "5.6.3-alpha.
|
|
29084
|
+
engine.VersionManage.add('plugin-rtc', "5.6.3-alpha.6");
|
|
29075
29085
|
if (!engine.VersionManage.validEngine("^5.6.0")) {
|
|
29076
29086
|
console.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"^5.6.0"}'.`);
|
|
29077
29087
|
return false;
|
|
@@ -29085,8 +29095,8 @@ const installer = {
|
|
|
29085
29095
|
RTCLogger.setLogger(originLogger);
|
|
29086
29096
|
logger.setLogger(originLogger);
|
|
29087
29097
|
originLogger.warn(RCLoggerTag.L_INDEX_INSTALL_RTC_PLUGIN_O, JSON.stringify({
|
|
29088
|
-
'RCRTC Version': "5.6.3-alpha.
|
|
29089
|
-
Commit: "
|
|
29098
|
+
'RCRTC Version': "5.6.3-alpha.6",
|
|
29099
|
+
Commit: "57278f3bdddf532d3b7f4f3cc38e026fe8569537",
|
|
29090
29100
|
'browserInfo.browser': browserInfo.browser,
|
|
29091
29101
|
'browserInfo.supportsUnifiedPlan': browserInfo.supportsUnifiedPlan,
|
|
29092
29102
|
'browserInfo.version': browserInfo.version,
|
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.6.3-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.6.3-alpha.6
|
|
3
|
+
* CommitId - 57278f3bdddf532d3b7f4f3cc38e026fe8569537
|
|
4
|
+
* Thu Nov 17 2022 16:28:36 GMT+0800 (中国标准时间)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
(function (global, factory) {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.RCRTC = {}, global.RCEngine));
|
|
11
11
|
})(this, (function (exports, engine) { 'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
/*! *****************************************************************************
|
|
14
14
|
Copyright (c) Microsoft Corporation.
|
|
15
15
|
|
|
16
16
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -8054,7 +8054,7 @@
|
|
|
8054
8054
|
this._latestTimestamp = Date.now();
|
|
8055
8055
|
this._started = false;
|
|
8056
8056
|
this._timer = null;
|
|
8057
|
-
this._pullRTCRoomStatus = (roomId, tracId) => { };
|
|
8057
|
+
this._pullRTCRoomStatus = (roomId, tracId, targetPullVersion) => { };
|
|
8058
8058
|
const { roomId, roomMode } = this._store;
|
|
8059
8059
|
this._roomId = roomId;
|
|
8060
8060
|
this._roomMode = roomMode;
|
|
@@ -8105,7 +8105,7 @@
|
|
|
8105
8105
|
(_d = (_c = this._context) === null || _c === void 0 ? void 0 : _c.logger) === null || _d === void 0 ? void 0 : _d.info(RCLoggerTag.L_RTCPING_PULL_ROOM_STATUS_O, JSON.stringify({
|
|
8106
8106
|
pingerVersion,
|
|
8107
8107
|
}), traceId);
|
|
8108
|
-
this._pullRTCRoomStatus(this._roomId, traceId);
|
|
8108
|
+
this._pullRTCRoomStatus(this._roomId, traceId, pingerVersion);
|
|
8109
8109
|
}
|
|
8110
8110
|
}
|
|
8111
8111
|
_checkAlive() {
|
|
@@ -14804,7 +14804,7 @@
|
|
|
14804
14804
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
14805
14805
|
'Cache-Control': 'no-cache',
|
|
14806
14806
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
14807
|
-
ClientVersion: "5.6.3-alpha.
|
|
14807
|
+
ClientVersion: "5.6.3-alpha.6",
|
|
14808
14808
|
'Client-Session-Id': getUUID(),
|
|
14809
14809
|
'Request-Id': Date.now().toString(),
|
|
14810
14810
|
});
|
|
@@ -15380,7 +15380,7 @@
|
|
|
15380
15380
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
15381
15381
|
'Cache-Control': 'no-cache',
|
|
15382
15382
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
15383
|
-
ClientVersion: "5.6.3-alpha.
|
|
15383
|
+
ClientVersion: "5.6.3-alpha.6",
|
|
15384
15384
|
'Client-Session-Id': getUUID(),
|
|
15385
15385
|
'Request-Id': Date.now().toString(),
|
|
15386
15386
|
});
|
|
@@ -18688,7 +18688,7 @@
|
|
|
18688
18688
|
* 加入房间
|
|
18689
18689
|
*/
|
|
18690
18690
|
sendR1() {
|
|
18691
|
-
const rtcVersion = "5.6.3-alpha.
|
|
18691
|
+
const rtcVersion = "5.6.3-alpha.6";
|
|
18692
18692
|
const imVersion = this._context.getCoreVersion();
|
|
18693
18693
|
const platform = 'web';
|
|
18694
18694
|
const pcName = navigator.platform;
|
|
@@ -18838,7 +18838,7 @@
|
|
|
18838
18838
|
_formatR1Data() {
|
|
18839
18839
|
return {
|
|
18840
18840
|
joinTime: this._context.userJoinTime || 0,
|
|
18841
|
-
rtcVersion: "5.6.3-alpha.
|
|
18841
|
+
rtcVersion: "5.6.3-alpha.6",
|
|
18842
18842
|
imVersion: this._context.getCoreVersion(),
|
|
18843
18843
|
platform: 'web',
|
|
18844
18844
|
device: navigator.platform,
|
|
@@ -22136,7 +22136,7 @@
|
|
|
22136
22136
|
})(PullRoomStatusEvent || (PullRoomStatusEvent = {}));
|
|
22137
22137
|
|
|
22138
22138
|
class PullRTCRoomStatusCommand extends BaseCommand {
|
|
22139
|
-
constructor(_roomId, _traceId, _context, _callbacks, _subhook, _dealUserAppListener) {
|
|
22139
|
+
constructor(_roomId, _traceId, _context, _callbacks, _subhook, _dealUserAppListener, _targetPullVersion) {
|
|
22140
22140
|
super();
|
|
22141
22141
|
this._roomId = _roomId;
|
|
22142
22142
|
this._traceId = _traceId;
|
|
@@ -22144,28 +22144,38 @@
|
|
|
22144
22144
|
this._callbacks = _callbacks;
|
|
22145
22145
|
this._subhook = _subhook;
|
|
22146
22146
|
this._dealUserAppListener = _dealUserAppListener;
|
|
22147
|
+
this._targetPullVersion = _targetPullVersion;
|
|
22147
22148
|
}
|
|
22148
22149
|
get kind() {
|
|
22149
22150
|
return RCCommandKind.PULL_RTCROOM_STATUS;
|
|
22150
22151
|
}
|
|
22151
22152
|
execute(store, invoker) {
|
|
22152
|
-
var _a, _b, _c;
|
|
22153
|
+
var _a, _b, _c, _d;
|
|
22153
22154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22154
|
-
const
|
|
22155
|
+
const localVersion = store.getRoomStatusVersion();
|
|
22155
22156
|
(_a = this._context.logger) === null || _a === void 0 ? void 0 : _a.info(RCLoggerTag.L_PULL_ROOM_STATUS_T, JSON.stringify({
|
|
22156
22157
|
roomId: this._roomId,
|
|
22157
|
-
|
|
22158
|
+
localVersion,
|
|
22158
22159
|
}), this._traceId);
|
|
22159
|
-
|
|
22160
|
-
if (code !== engine.ErrorCode.SUCCESS) {
|
|
22160
|
+
if (this._targetPullVersion && this._targetPullVersion <= localVersion) {
|
|
22161
22161
|
(_b = this._context.logger) === null || _b === void 0 ? void 0 : _b.info(RCLoggerTag.L_PULL_ROOM_STATUS_R, JSON.stringify({
|
|
22162
|
+
status: RCLoggerStatus.SUCCESSED,
|
|
22163
|
+
msg: 'the roomData has been pulled',
|
|
22164
|
+
localVersion,
|
|
22165
|
+
targetPullVersion: this._targetPullVersion,
|
|
22166
|
+
}), this._traceId);
|
|
22167
|
+
return { code: engine.ErrorCode.SUCCESS };
|
|
22168
|
+
}
|
|
22169
|
+
const { code, data } = yield this._context.pullRTCRoomStatus(this._roomId, localVersion);
|
|
22170
|
+
if (code !== engine.ErrorCode.SUCCESS) {
|
|
22171
|
+
(_c = this._context.logger) === null || _c === void 0 ? void 0 : _c.info(RCLoggerTag.L_PULL_ROOM_STATUS_R, JSON.stringify({
|
|
22162
22172
|
status: RCLoggerStatus.FAILED,
|
|
22163
22173
|
code,
|
|
22164
22174
|
}), this._traceId);
|
|
22165
22175
|
return { code };
|
|
22166
22176
|
}
|
|
22167
22177
|
const { bFullStatus, version: newVersion, usersData, roomStatus, } = data;
|
|
22168
|
-
(
|
|
22178
|
+
(_d = this._context.logger) === null || _d === void 0 ? void 0 : _d.info(RCLoggerTag.L_PULL_ROOM_STATUS_R, JSON.stringify({
|
|
22169
22179
|
bFullStatus,
|
|
22170
22180
|
version: int64ToTimestamp(newVersion),
|
|
22171
22181
|
usersData,
|
|
@@ -22283,12 +22293,12 @@
|
|
|
22283
22293
|
// eslint-disable-next-line no-case-declarations
|
|
22284
22294
|
const tracId = (_d = (_c = this._context) === null || _c === void 0 ? void 0 : _c.logger) === null || _d === void 0 ? void 0 : _d.createTraceId();
|
|
22285
22295
|
(_f = (_e = this._context) === null || _e === void 0 ? void 0 : _e.logger) === null || _f === void 0 ? void 0 : _f.info(RCLoggerTag.L_RTCNTF_PULL_ROOM_STATUS_O, null, tracId);
|
|
22286
|
-
this._startPullRTCRoomStatus(roomId, tracId);
|
|
22296
|
+
this._startPullRTCRoomStatus(roomId, tracId, time);
|
|
22287
22297
|
break;
|
|
22288
22298
|
}
|
|
22289
22299
|
}));
|
|
22290
22300
|
}
|
|
22291
|
-
_pullRTCRoomStatus(roomId, tracId) {
|
|
22301
|
+
_pullRTCRoomStatus(roomId, tracId, targetPullVersion) {
|
|
22292
22302
|
return new PullRTCRoomStatusCommand(roomId, tracId, this._context, {
|
|
22293
22303
|
onUserJoin: this._callAppListener.bind(this, 'onUserJoin'),
|
|
22294
22304
|
onUserLeave: this._callAppListener.bind(this, 'onUserLeave'),
|
|
@@ -22297,15 +22307,15 @@
|
|
|
22297
22307
|
onTrackPublish: this._onTrackPublish.bind(this),
|
|
22298
22308
|
onTrackUnpublish: this._onTrackUnpublish.bind(this),
|
|
22299
22309
|
onCDNEnableChange: this._callAppListener.bind(this, 'onCDNEnableChange'),
|
|
22300
|
-
}, this._subhook.bind(this), this._dealUserAppListener.bind(this));
|
|
22310
|
+
}, this._subhook.bind(this), this._dealUserAppListener.bind(this), targetPullVersion);
|
|
22301
22311
|
}
|
|
22302
22312
|
/**
|
|
22303
22313
|
* 拉取房间数据
|
|
22304
22314
|
* @param roomId 房间 id
|
|
22305
22315
|
*/
|
|
22306
|
-
_startPullRTCRoomStatus(roomId, tracId) {
|
|
22316
|
+
_startPullRTCRoomStatus(roomId, tracId, targetPullVersion) {
|
|
22307
22317
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22308
|
-
yield this._invoker.push(this._pullRTCRoomStatus(roomId, tracId));
|
|
22318
|
+
yield this._invoker.push(this._pullRTCRoomStatus(roomId, tracId, targetPullVersion));
|
|
22309
22319
|
});
|
|
22310
22320
|
}
|
|
22311
22321
|
__innerInit(mode, joinType, livingType, innerUserDatas, outerUserDatas, traceId) {
|
|
@@ -28078,7 +28088,7 @@
|
|
|
28078
28088
|
}
|
|
28079
28089
|
reportSDKInfo() {
|
|
28080
28090
|
this._context.reportSDKInfo({
|
|
28081
|
-
'plugin-rtc': "5.6.3-alpha.
|
|
28091
|
+
'plugin-rtc': "5.6.3-alpha.6",
|
|
28082
28092
|
});
|
|
28083
28093
|
}
|
|
28084
28094
|
}
|
|
@@ -29071,7 +29081,7 @@ message probuf {
|
|
|
29071
29081
|
console.error('Please use the https protocol or use `http://localhost` to open the page!');
|
|
29072
29082
|
return false;
|
|
29073
29083
|
}
|
|
29074
|
-
engine.VersionManage.add('plugin-rtc', "5.6.3-alpha.
|
|
29084
|
+
engine.VersionManage.add('plugin-rtc', "5.6.3-alpha.6");
|
|
29075
29085
|
if (!engine.VersionManage.validEngine("^5.6.0")) {
|
|
29076
29086
|
console.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"^5.6.0"}'.`);
|
|
29077
29087
|
return false;
|
|
@@ -29085,8 +29095,8 @@ message probuf {
|
|
|
29085
29095
|
RTCLogger.setLogger(originLogger);
|
|
29086
29096
|
logger.setLogger(originLogger);
|
|
29087
29097
|
originLogger.warn(RCLoggerTag.L_INDEX_INSTALL_RTC_PLUGIN_O, JSON.stringify({
|
|
29088
|
-
'RCRTC Version': "5.6.3-alpha.
|
|
29089
|
-
Commit: "
|
|
29098
|
+
'RCRTC Version': "5.6.3-alpha.6",
|
|
29099
|
+
Commit: "57278f3bdddf532d3b7f4f3cc38e026fe8569537",
|
|
29090
29100
|
'browserInfo.browser': browserInfo.browser,
|
|
29091
29101
|
'browserInfo.supportsUnifiedPlan': browserInfo.supportsUnifiedPlan,
|
|
29092
29102
|
'browserInfo.version': browserInfo.version,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rongcloud/plugin-rtc",
|
|
3
|
-
"version": "5.6.3-alpha.
|
|
3
|
+
"version": "5.6.3-alpha.6",
|
|
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.0"
|
|
35
35
|
},
|
|
36
|
-
"__commit__": "
|
|
36
|
+
"__commit__": "57278f3bdddf532d3b7f4f3cc38e026fe8569537"
|
|
37
37
|
}
|