@rongcloud/plugin-rtc 5.4.7-alpha.2 → 5.4.7-alpha.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 +3 -3
- package/dist/index.esm.js +16 -14
- package/dist/index.js +16 -14
- package/dist/index.umd.js +16 -14
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.4.7-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.4.7-alpha.3
|
|
3
|
+
* CommitId - 851c4005fa6dfee3d966699f4bc260b0b6cbd7ea
|
|
4
|
+
* Fri Sep 02 2022 09:48:41 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
import { EventEmitter, RTCMode, IRuntime, RTCPluginContext, IJoinRTCRoomData, IReceivedMessage, ErrorCode, RTCJoinType, IRTCUserData, KVString, IServerRTCRoomEntry, LogLevel, IRTCJoinedInfo, IPluginGenerator } from '@rongcloud/engine';
|
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.4.7-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.4.7-alpha.3
|
|
3
|
+
* CommitId - 851c4005fa6dfee3d966699f4bc260b0b6cbd7ea
|
|
4
|
+
* Fri Sep 02 2022 09:48:41 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
import { Logger, EventEmitter, logger as logger$1, LogSource, isNumber, validate, ErrorCode, HttpMethod, ConnectionStatus, RTCMode, notEmptyString, isObject as isObject$1, isString, RTCJoinType, RTCApiType, isArray, assert, ConversationType, isHttpUrl, isBoolean, isUndefined, RTCIdentityChangeType, VersionManage } from '@rongcloud/engine';
|
|
@@ -7935,7 +7935,7 @@ const getCommonHeader = () => ({
|
|
|
7935
7935
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
7936
7936
|
'Cache-Control': 'no-cache',
|
|
7937
7937
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
7938
|
-
ClientVersion: "5.4.7-alpha.
|
|
7938
|
+
ClientVersion: "5.4.7-alpha.3",
|
|
7939
7939
|
'Client-Session-Id': getUUID(),
|
|
7940
7940
|
'Request-Id': Date.now().toString()
|
|
7941
7941
|
});
|
|
@@ -8025,11 +8025,12 @@ class RCMediaService {
|
|
|
8025
8025
|
path,
|
|
8026
8026
|
headers,
|
|
8027
8027
|
body,
|
|
8028
|
-
reqId
|
|
8028
|
+
reqId,
|
|
8029
|
+
timeout: this._timeout
|
|
8029
8030
|
}, {
|
|
8030
8031
|
logSource: LogSource.RTC
|
|
8031
8032
|
});
|
|
8032
|
-
logger.info(`request -> Request-Id: ${reqId}, url: ${url}, headers: ${JSON.stringify(mergeHeaders)}, body: ${jsonBody}`);
|
|
8033
|
+
logger.info(`request -> Request-Id: ${reqId}, url: ${url}, headers: ${JSON.stringify(mergeHeaders)}, body: ${jsonBody}, timeout: ${this._timeout}`);
|
|
8033
8034
|
const { status, data } = yield this._runtime.httpReq({
|
|
8034
8035
|
url,
|
|
8035
8036
|
body: jsonBody,
|
|
@@ -10823,7 +10824,7 @@ class PolarisReporter {
|
|
|
10823
10824
|
* 加入房间
|
|
10824
10825
|
*/
|
|
10825
10826
|
sendR1() {
|
|
10826
|
-
const rtcVersion = "5.4.7-alpha.
|
|
10827
|
+
const rtcVersion = "5.4.7-alpha.3";
|
|
10827
10828
|
const imVersion = this._context.getCoreVersion();
|
|
10828
10829
|
const platform = 'web';
|
|
10829
10830
|
const pcName = navigator.platform;
|
|
@@ -12443,10 +12444,10 @@ class PublishCommand extends BaseCommand {
|
|
|
12443
12444
|
* 资源发布应先与 mediaserver 交换资源,建 PeerConnection 通道,后通知房间
|
|
12444
12445
|
* 资源取消发布则应先通知取消发布,后与 mediaServer 协商取消资源发布
|
|
12445
12446
|
*/
|
|
12446
|
-
tracks.
|
|
12447
|
+
for (let index = 0; index < tracks.length; index++) {
|
|
12448
|
+
const track = tracks[index];
|
|
12447
12449
|
// 向 RTCPeerConnection 添加轨道数据
|
|
12448
12450
|
const { track: localTrack, pubTiny } = track instanceof RCLocalTrack ? { pubTiny: false, track } : track;
|
|
12449
|
-
pc.addLocalTrack(localTrack);
|
|
12450
12451
|
// 拷贝生成小流并添加至 RTCPeerConnection
|
|
12451
12452
|
if (localTrack.isVideoTrack()) {
|
|
12452
12453
|
if (pubTiny) {
|
|
@@ -12457,17 +12458,18 @@ class PublishCommand extends BaseCommand {
|
|
|
12457
12458
|
const resolution = pubTiny.resolution || RCResolution.W176_H144;
|
|
12458
12459
|
const { width, height } = transResolution(resolution);
|
|
12459
12460
|
const frameRate = transFrameRate(rcFrameRate);
|
|
12460
|
-
cloneTrack.applyConstraints({ width, height, frameRate });
|
|
12461
|
+
yield cloneTrack.applyConstraints({ width, height, frameRate });
|
|
12461
12462
|
}
|
|
12462
12463
|
catch (error) {
|
|
12463
12464
|
cloneTrack === null || cloneTrack === void 0 ? void 0 : cloneTrack.stop();
|
|
12464
12465
|
logger.warn(`pubTiny failed -> id: ${localTrack.getTrackId()}, msg: ${error.message}`);
|
|
12465
|
-
|
|
12466
|
+
break;
|
|
12466
12467
|
}
|
|
12467
12468
|
pc.addLocalTrack(new RCLocalVideoTrack(localTrack.getTag(), localTrack.getUserId(), cloneTrack, true));
|
|
12468
12469
|
}
|
|
12469
12470
|
}
|
|
12470
|
-
|
|
12471
|
+
pc.addLocalTrack(localTrack);
|
|
12472
|
+
}
|
|
12471
12473
|
// 客户端主动调用 api 发请求时,清除 ice 断线重连的定时器
|
|
12472
12474
|
pc.clearReTryExchangeTimer();
|
|
12473
12475
|
// 发送 /exchange 请求
|
|
@@ -19306,7 +19308,7 @@ const installer = {
|
|
|
19306
19308
|
logger.error('Please use the https protocol or use `http://localhost` to open the page!');
|
|
19307
19309
|
return false;
|
|
19308
19310
|
}
|
|
19309
|
-
VersionManage.add('plugin-rtc', "5.4.7-alpha.
|
|
19311
|
+
VersionManage.add('plugin-rtc', "5.4.7-alpha.3");
|
|
19310
19312
|
if (!VersionManage.validEngine("5.3.4 - 5.4.5")) {
|
|
19311
19313
|
logger.error(`The current engine version '${VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"5.3.4 - 5.4.5"}'.`);
|
|
19312
19314
|
return false;
|
|
@@ -19317,7 +19319,7 @@ const installer = {
|
|
|
19317
19319
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
19318
19320
|
logger.setLogLevel(options.logLevel);
|
|
19319
19321
|
logger.setLogStdout(options.logStdout);
|
|
19320
|
-
logger.warn(`RCRTC Version: ${"5.4.7-alpha.
|
|
19322
|
+
logger.warn(`RCRTC Version: ${"5.4.7-alpha.3"}, Commit: ${"851c4005fa6dfee3d966699f4bc260b0b6cbd7ea"}`);
|
|
19321
19323
|
logger.warn(`browserInfo.browser -> ${browserInfo.browser}`);
|
|
19322
19324
|
logger.warn(`browserInfo.supportsUnifiedPlan -> ${browserInfo.supportsUnifiedPlan}`);
|
|
19323
19325
|
logger.warn(`browserInfo.version -> ${browserInfo.version}`);
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.4.7-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.4.7-alpha.3
|
|
3
|
+
* CommitId - 851c4005fa6dfee3d966699f4bc260b0b6cbd7ea
|
|
4
|
+
* Fri Sep 02 2022 09:48:41 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
@@ -7938,7 +7938,7 @@ const getCommonHeader = () => ({
|
|
|
7938
7938
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
7939
7939
|
'Cache-Control': 'no-cache',
|
|
7940
7940
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
7941
|
-
ClientVersion: "5.4.7-alpha.
|
|
7941
|
+
ClientVersion: "5.4.7-alpha.3",
|
|
7942
7942
|
'Client-Session-Id': getUUID(),
|
|
7943
7943
|
'Request-Id': Date.now().toString()
|
|
7944
7944
|
});
|
|
@@ -8028,11 +8028,12 @@ class RCMediaService {
|
|
|
8028
8028
|
path,
|
|
8029
8029
|
headers,
|
|
8030
8030
|
body,
|
|
8031
|
-
reqId
|
|
8031
|
+
reqId,
|
|
8032
|
+
timeout: this._timeout
|
|
8032
8033
|
}, {
|
|
8033
8034
|
logSource: engine.LogSource.RTC
|
|
8034
8035
|
});
|
|
8035
|
-
logger.info(`request -> Request-Id: ${reqId}, url: ${url}, headers: ${JSON.stringify(mergeHeaders)}, body: ${jsonBody}`);
|
|
8036
|
+
logger.info(`request -> Request-Id: ${reqId}, url: ${url}, headers: ${JSON.stringify(mergeHeaders)}, body: ${jsonBody}, timeout: ${this._timeout}`);
|
|
8036
8037
|
const { status, data } = yield this._runtime.httpReq({
|
|
8037
8038
|
url,
|
|
8038
8039
|
body: jsonBody,
|
|
@@ -10826,7 +10827,7 @@ class PolarisReporter {
|
|
|
10826
10827
|
* 加入房间
|
|
10827
10828
|
*/
|
|
10828
10829
|
sendR1() {
|
|
10829
|
-
const rtcVersion = "5.4.7-alpha.
|
|
10830
|
+
const rtcVersion = "5.4.7-alpha.3";
|
|
10830
10831
|
const imVersion = this._context.getCoreVersion();
|
|
10831
10832
|
const platform = 'web';
|
|
10832
10833
|
const pcName = navigator.platform;
|
|
@@ -12446,10 +12447,10 @@ class PublishCommand extends BaseCommand {
|
|
|
12446
12447
|
* 资源发布应先与 mediaserver 交换资源,建 PeerConnection 通道,后通知房间
|
|
12447
12448
|
* 资源取消发布则应先通知取消发布,后与 mediaServer 协商取消资源发布
|
|
12448
12449
|
*/
|
|
12449
|
-
tracks.
|
|
12450
|
+
for (let index = 0; index < tracks.length; index++) {
|
|
12451
|
+
const track = tracks[index];
|
|
12450
12452
|
// 向 RTCPeerConnection 添加轨道数据
|
|
12451
12453
|
const { track: localTrack, pubTiny } = track instanceof RCLocalTrack ? { pubTiny: false, track } : track;
|
|
12452
|
-
pc.addLocalTrack(localTrack);
|
|
12453
12454
|
// 拷贝生成小流并添加至 RTCPeerConnection
|
|
12454
12455
|
if (localTrack.isVideoTrack()) {
|
|
12455
12456
|
if (pubTiny) {
|
|
@@ -12460,17 +12461,18 @@ class PublishCommand extends BaseCommand {
|
|
|
12460
12461
|
const resolution = pubTiny.resolution || exports.RCResolution.W176_H144;
|
|
12461
12462
|
const { width, height } = transResolution(resolution);
|
|
12462
12463
|
const frameRate = transFrameRate(rcFrameRate);
|
|
12463
|
-
cloneTrack.applyConstraints({ width, height, frameRate });
|
|
12464
|
+
yield cloneTrack.applyConstraints({ width, height, frameRate });
|
|
12464
12465
|
}
|
|
12465
12466
|
catch (error) {
|
|
12466
12467
|
cloneTrack === null || cloneTrack === void 0 ? void 0 : cloneTrack.stop();
|
|
12467
12468
|
logger.warn(`pubTiny failed -> id: ${localTrack.getTrackId()}, msg: ${error.message}`);
|
|
12468
|
-
|
|
12469
|
+
break;
|
|
12469
12470
|
}
|
|
12470
12471
|
pc.addLocalTrack(new RCLocalVideoTrack(localTrack.getTag(), localTrack.getUserId(), cloneTrack, true));
|
|
12471
12472
|
}
|
|
12472
12473
|
}
|
|
12473
|
-
|
|
12474
|
+
pc.addLocalTrack(localTrack);
|
|
12475
|
+
}
|
|
12474
12476
|
// 客户端主动调用 api 发请求时,清除 ice 断线重连的定时器
|
|
12475
12477
|
pc.clearReTryExchangeTimer();
|
|
12476
12478
|
// 发送 /exchange 请求
|
|
@@ -19309,7 +19311,7 @@ const installer = {
|
|
|
19309
19311
|
logger.error('Please use the https protocol or use `http://localhost` to open the page!');
|
|
19310
19312
|
return false;
|
|
19311
19313
|
}
|
|
19312
|
-
engine.VersionManage.add('plugin-rtc', "5.4.7-alpha.
|
|
19314
|
+
engine.VersionManage.add('plugin-rtc', "5.4.7-alpha.3");
|
|
19313
19315
|
if (!engine.VersionManage.validEngine("5.3.4 - 5.4.5")) {
|
|
19314
19316
|
logger.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"5.3.4 - 5.4.5"}'.`);
|
|
19315
19317
|
return false;
|
|
@@ -19320,7 +19322,7 @@ const installer = {
|
|
|
19320
19322
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
19321
19323
|
logger.setLogLevel(options.logLevel);
|
|
19322
19324
|
logger.setLogStdout(options.logStdout);
|
|
19323
|
-
logger.warn(`RCRTC Version: ${"5.4.7-alpha.
|
|
19325
|
+
logger.warn(`RCRTC Version: ${"5.4.7-alpha.3"}, Commit: ${"851c4005fa6dfee3d966699f4bc260b0b6cbd7ea"}`);
|
|
19324
19326
|
logger.warn(`browserInfo.browser -> ${browserInfo.browser}`);
|
|
19325
19327
|
logger.warn(`browserInfo.supportsUnifiedPlan -> ${browserInfo.supportsUnifiedPlan}`);
|
|
19326
19328
|
logger.warn(`browserInfo.version -> ${browserInfo.version}`);
|
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.4.7-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.4.7-alpha.3
|
|
3
|
+
* CommitId - 851c4005fa6dfee3d966699f4bc260b0b6cbd7ea
|
|
4
|
+
* Fri Sep 02 2022 09:48:41 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
(function (global, factory) {
|
|
@@ -7938,7 +7938,7 @@
|
|
|
7938
7938
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
7939
7939
|
'Cache-Control': 'no-cache',
|
|
7940
7940
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
7941
|
-
ClientVersion: "5.4.7-alpha.
|
|
7941
|
+
ClientVersion: "5.4.7-alpha.3",
|
|
7942
7942
|
'Client-Session-Id': getUUID(),
|
|
7943
7943
|
'Request-Id': Date.now().toString()
|
|
7944
7944
|
});
|
|
@@ -8028,11 +8028,12 @@
|
|
|
8028
8028
|
path,
|
|
8029
8029
|
headers,
|
|
8030
8030
|
body,
|
|
8031
|
-
reqId
|
|
8031
|
+
reqId,
|
|
8032
|
+
timeout: this._timeout
|
|
8032
8033
|
}, {
|
|
8033
8034
|
logSource: engine.LogSource.RTC
|
|
8034
8035
|
});
|
|
8035
|
-
logger.info(`request -> Request-Id: ${reqId}, url: ${url}, headers: ${JSON.stringify(mergeHeaders)}, body: ${jsonBody}`);
|
|
8036
|
+
logger.info(`request -> Request-Id: ${reqId}, url: ${url}, headers: ${JSON.stringify(mergeHeaders)}, body: ${jsonBody}, timeout: ${this._timeout}`);
|
|
8036
8037
|
const { status, data } = yield this._runtime.httpReq({
|
|
8037
8038
|
url,
|
|
8038
8039
|
body: jsonBody,
|
|
@@ -10826,7 +10827,7 @@
|
|
|
10826
10827
|
* 加入房间
|
|
10827
10828
|
*/
|
|
10828
10829
|
sendR1() {
|
|
10829
|
-
const rtcVersion = "5.4.7-alpha.
|
|
10830
|
+
const rtcVersion = "5.4.7-alpha.3";
|
|
10830
10831
|
const imVersion = this._context.getCoreVersion();
|
|
10831
10832
|
const platform = 'web';
|
|
10832
10833
|
const pcName = navigator.platform;
|
|
@@ -12446,10 +12447,10 @@
|
|
|
12446
12447
|
* 资源发布应先与 mediaserver 交换资源,建 PeerConnection 通道,后通知房间
|
|
12447
12448
|
* 资源取消发布则应先通知取消发布,后与 mediaServer 协商取消资源发布
|
|
12448
12449
|
*/
|
|
12449
|
-
tracks.
|
|
12450
|
+
for (let index = 0; index < tracks.length; index++) {
|
|
12451
|
+
const track = tracks[index];
|
|
12450
12452
|
// 向 RTCPeerConnection 添加轨道数据
|
|
12451
12453
|
const { track: localTrack, pubTiny } = track instanceof RCLocalTrack ? { pubTiny: false, track } : track;
|
|
12452
|
-
pc.addLocalTrack(localTrack);
|
|
12453
12454
|
// 拷贝生成小流并添加至 RTCPeerConnection
|
|
12454
12455
|
if (localTrack.isVideoTrack()) {
|
|
12455
12456
|
if (pubTiny) {
|
|
@@ -12460,17 +12461,18 @@
|
|
|
12460
12461
|
const resolution = pubTiny.resolution || exports.RCResolution.W176_H144;
|
|
12461
12462
|
const { width, height } = transResolution(resolution);
|
|
12462
12463
|
const frameRate = transFrameRate(rcFrameRate);
|
|
12463
|
-
cloneTrack.applyConstraints({ width, height, frameRate });
|
|
12464
|
+
yield cloneTrack.applyConstraints({ width, height, frameRate });
|
|
12464
12465
|
}
|
|
12465
12466
|
catch (error) {
|
|
12466
12467
|
cloneTrack === null || cloneTrack === void 0 ? void 0 : cloneTrack.stop();
|
|
12467
12468
|
logger.warn(`pubTiny failed -> id: ${localTrack.getTrackId()}, msg: ${error.message}`);
|
|
12468
|
-
|
|
12469
|
+
break;
|
|
12469
12470
|
}
|
|
12470
12471
|
pc.addLocalTrack(new RCLocalVideoTrack(localTrack.getTag(), localTrack.getUserId(), cloneTrack, true));
|
|
12471
12472
|
}
|
|
12472
12473
|
}
|
|
12473
|
-
|
|
12474
|
+
pc.addLocalTrack(localTrack);
|
|
12475
|
+
}
|
|
12474
12476
|
// 客户端主动调用 api 发请求时,清除 ice 断线重连的定时器
|
|
12475
12477
|
pc.clearReTryExchangeTimer();
|
|
12476
12478
|
// 发送 /exchange 请求
|
|
@@ -19309,7 +19311,7 @@
|
|
|
19309
19311
|
logger.error('Please use the https protocol or use `http://localhost` to open the page!');
|
|
19310
19312
|
return false;
|
|
19311
19313
|
}
|
|
19312
|
-
engine.VersionManage.add('plugin-rtc', "5.4.7-alpha.
|
|
19314
|
+
engine.VersionManage.add('plugin-rtc', "5.4.7-alpha.3");
|
|
19313
19315
|
if (!engine.VersionManage.validEngine("5.3.4 - 5.4.5")) {
|
|
19314
19316
|
logger.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"5.3.4 - 5.4.5"}'.`);
|
|
19315
19317
|
return false;
|
|
@@ -19320,7 +19322,7 @@
|
|
|
19320
19322
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
19321
19323
|
logger.setLogLevel(options.logLevel);
|
|
19322
19324
|
logger.setLogStdout(options.logStdout);
|
|
19323
|
-
logger.warn(`RCRTC Version: ${"5.4.7-alpha.
|
|
19325
|
+
logger.warn(`RCRTC Version: ${"5.4.7-alpha.3"}, Commit: ${"851c4005fa6dfee3d966699f4bc260b0b6cbd7ea"}`);
|
|
19324
19326
|
logger.warn(`browserInfo.browser -> ${browserInfo.browser}`);
|
|
19325
19327
|
logger.warn(`browserInfo.supportsUnifiedPlan -> ${browserInfo.supportsUnifiedPlan}`);
|
|
19326
19328
|
logger.warn(`browserInfo.version -> ${browserInfo.version}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rongcloud/plugin-rtc",
|
|
3
|
-
"version": "5.4.7-alpha.
|
|
3
|
+
"version": "5.4.7-alpha.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.3.4 - 5.4.5"
|
|
35
35
|
},
|
|
36
|
-
"__commit__": "
|
|
36
|
+
"__commit__": "851c4005fa6dfee3d966699f4bc260b0b6cbd7ea"
|
|
37
37
|
}
|