@rongcloud/plugin-rtc 5.2.4-beem.4 → 5.2.4-beem.5
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 +31 -22
- package/dist/index.js +31 -22
- package/dist/index.umd.js +31 -22
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.2.4-beem.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.2.4-beem.5
|
|
3
|
+
* CommitId - 13f398c4a680ab6054d831b2e76e51f68a677de9
|
|
4
|
+
* Mon May 23 2022 11:07:54 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
import { EventEmitter, LogLevel, RTCMode, IRuntime, RTCPluginContext, IServerRTCRoomEntry, IJoinRTCRoomData, IReceivedMessage, KVString, RTCJoinType, IRTCJoinedInfo, IPluginGenerator } from '@rongcloud/engine';
|
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.2.4-beem.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.2.4-beem.5
|
|
3
|
+
* CommitId - 13f398c4a680ab6054d831b2e76e51f68a677de9
|
|
4
|
+
* Mon May 23 2022 11:07:54 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
import { Logger, EventEmitter, isNumber, ErrorCode, ConnectionStatus, assert, ConversationType, RTCApiType, validate, isArray, RTCMode, isHttpUrl, isBoolean, HttpMethod, isString, notEmptyString, RTCJoinType, RTCIdentityChangeType, VersionManage } from '@rongcloud/engine';
|
|
@@ -5621,6 +5621,7 @@ var RCMediaType;
|
|
|
5621
5621
|
RCMediaType[RCMediaType["AUDIO_VIDEO"] = 2] = "AUDIO_VIDEO";
|
|
5622
5622
|
})(RCMediaType || (RCMediaType = {}));
|
|
5623
5623
|
|
|
5624
|
+
// export const RongRTCVideoBitrate: { [key: RCResolution]: BitrateConf } = {
|
|
5624
5625
|
const RongRTCVideoBitrate = {
|
|
5625
5626
|
[RCResolution.W176_H132]: { width: 176, height: 132, maxBitrate: 150, minBitrate: 80 },
|
|
5626
5627
|
[RCResolution.W176_H144]: { width: 176, height: 144, maxBitrate: 160, minBitrate: 80 },
|
|
@@ -5637,23 +5638,26 @@ const RongRTCVideoBitrate = {
|
|
|
5637
5638
|
[RCResolution.W1920_H1080]: { width: 1920, height: 1080, maxBitrate: 4000, minBitrate: 400 }
|
|
5638
5639
|
};
|
|
5639
5640
|
/**
|
|
5640
|
-
*
|
|
5641
|
+
* 向上取最接近的视频分辨率配置
|
|
5641
5642
|
* @param {number} width
|
|
5642
5643
|
* @param {number} height
|
|
5643
5644
|
*/
|
|
5644
5645
|
const getNearestResolution = (width, height) => {
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
const item = RongRTCVideoBitrate[key];
|
|
5650
|
-
const d2 = Math.abs(item.width * item.height - area);
|
|
5651
|
-
if (d2 < d) {
|
|
5652
|
-
conf = item;
|
|
5653
|
-
d = d2;
|
|
5654
|
-
}
|
|
5646
|
+
// 优先精准匹配
|
|
5647
|
+
const conf = RongRTCVideoBitrate[`W${width}_H${height}`];
|
|
5648
|
+
if (conf) {
|
|
5649
|
+
return conf;
|
|
5655
5650
|
}
|
|
5656
|
-
|
|
5651
|
+
// 不规则分辨率计算最接近的配置
|
|
5652
|
+
const area = width * height;
|
|
5653
|
+
const confs = Object.keys(RongRTCVideoBitrate)
|
|
5654
|
+
.map(key => RongRTCVideoBitrate[key])
|
|
5655
|
+
// 升序
|
|
5656
|
+
.sort((item, item2) => item.height * item.width - item2.width * item2.height)
|
|
5657
|
+
// 过滤分辨率小于 area 的配置,避免分配带宽不足
|
|
5658
|
+
.filter(item => item.height * item.width >= area);
|
|
5659
|
+
// 若 confs 长度为 0 说明分辨率远大于可支持的分辨率配置,取最大配置
|
|
5660
|
+
return confs[0] || RongRTCVideoBitrate.W1920_H1080;
|
|
5657
5661
|
};
|
|
5658
5662
|
const Multiplier = {
|
|
5659
5663
|
10: 1,
|
|
@@ -6219,13 +6223,18 @@ const getValue = (value) => {
|
|
|
6219
6223
|
* @param track
|
|
6220
6224
|
*/
|
|
6221
6225
|
const getVideoTrackInfo = (track) => {
|
|
6226
|
+
const settings = track.getSettings();
|
|
6222
6227
|
const constraints = track.getConstraints();
|
|
6223
6228
|
// firefox 平台不存在 getCapabilities 方法
|
|
6224
6229
|
// const capabilities = track.getCapabilities()
|
|
6225
6230
|
// const width = getValue(constraints.width) || getValue(capabilities.width)
|
|
6226
6231
|
// const height = getValue(constraints.height) || getValue(capabilities.height)
|
|
6227
6232
|
// const frameRate = getValue(constraints.frameRate) || getValue(capabilities.frameRate)
|
|
6228
|
-
return {
|
|
6233
|
+
return {
|
|
6234
|
+
width: settings.width || getValue(constraints.width),
|
|
6235
|
+
height: settings.height || getValue(constraints.height),
|
|
6236
|
+
frameRate: settings.frameRate || getValue(constraints.frameRate)
|
|
6237
|
+
};
|
|
6229
6238
|
};
|
|
6230
6239
|
/**
|
|
6231
6240
|
* 取视频流动态码率
|
|
@@ -6234,8 +6243,8 @@ const getVideoTrackInfo = (track) => {
|
|
|
6234
6243
|
*/
|
|
6235
6244
|
const getDynamicBitrate = (track) => {
|
|
6236
6245
|
const { width, height, frameRate } = getVideoTrackInfo(track);
|
|
6237
|
-
//
|
|
6238
|
-
const config = getNearestResolution(width, height);
|
|
6246
|
+
// 计算动态码率,若 videoTrack 的分辨率读取失败,则以 640 * 480 的默认分辨率计算码率
|
|
6247
|
+
const config = getNearestResolution(width || 640, height || 480);
|
|
6239
6248
|
const multiple = getBitrateMultiple(frameRate);
|
|
6240
6249
|
return { min: config.minBitrate * multiple, max: config.maxBitrate * multiple };
|
|
6241
6250
|
};
|
|
@@ -8447,7 +8456,7 @@ class PolarisReporter {
|
|
|
8447
8456
|
* 加入房间
|
|
8448
8457
|
*/
|
|
8449
8458
|
sendR1() {
|
|
8450
|
-
const rtcVersion = "5.2.4-beem.
|
|
8459
|
+
const rtcVersion = "5.2.4-beem.5";
|
|
8451
8460
|
const imVersion = this._context.getCoreVersion();
|
|
8452
8461
|
const platform = 'web';
|
|
8453
8462
|
const pcName = navigator.platform;
|
|
@@ -10705,7 +10714,7 @@ const getCommonHeader = () => ({
|
|
|
10705
10714
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
10706
10715
|
'Cache-Control': 'no-cache',
|
|
10707
10716
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
10708
|
-
ClientVersion: "5.2.4-beem.
|
|
10717
|
+
ClientVersion: "5.2.4-beem.5",
|
|
10709
10718
|
'Client-Session-Id': getUUID(),
|
|
10710
10719
|
'Request-Id': Date.now().toString()
|
|
10711
10720
|
});
|
|
@@ -12734,7 +12743,7 @@ const installer = {
|
|
|
12734
12743
|
logger.error('Please use the https protocol or use `http://localhost` to open the page!');
|
|
12735
12744
|
return false;
|
|
12736
12745
|
}
|
|
12737
|
-
VersionManage.add('plugin-rtc', "5.2.4-beem.
|
|
12746
|
+
VersionManage.add('plugin-rtc', "5.2.4-beem.5");
|
|
12738
12747
|
if (!VersionManage.validEngine("4.6.0-beem.5")) {
|
|
12739
12748
|
logger.error(`The current engine version '${VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"4.6.0-beem.5"}'.`);
|
|
12740
12749
|
return false;
|
|
@@ -12744,7 +12753,7 @@ const installer = {
|
|
|
12744
12753
|
setup(context, runtime, options = {}) {
|
|
12745
12754
|
logger.setLogLevel(options.logLevel);
|
|
12746
12755
|
logger.setLogStdout(options.logStdout);
|
|
12747
|
-
logger.warn(`RCRTC Version: ${"5.2.4-beem.
|
|
12756
|
+
logger.warn(`RCRTC Version: ${"5.2.4-beem.5"}, Commit: ${"13f398c4a680ab6054d831b2e76e51f68a677de9"}`);
|
|
12748
12757
|
logger.warn(`browserInfo.browser -> ${browserInfo.browser}`);
|
|
12749
12758
|
logger.warn(`browserInfo.supportsUnifiedPlan -> ${browserInfo.supportsUnifiedPlan}`);
|
|
12750
12759
|
logger.warn(`browserInfo.version -> ${browserInfo.version}`);
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.2.4-beem.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.2.4-beem.5
|
|
3
|
+
* CommitId - 13f398c4a680ab6054d831b2e76e51f68a677de9
|
|
4
|
+
* Mon May 23 2022 11:07:54 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
@@ -5624,6 +5624,7 @@ exports.RCMediaType = void 0;
|
|
|
5624
5624
|
RCMediaType[RCMediaType["AUDIO_VIDEO"] = 2] = "AUDIO_VIDEO";
|
|
5625
5625
|
})(exports.RCMediaType || (exports.RCMediaType = {}));
|
|
5626
5626
|
|
|
5627
|
+
// export const RongRTCVideoBitrate: { [key: RCResolution]: BitrateConf } = {
|
|
5627
5628
|
const RongRTCVideoBitrate = {
|
|
5628
5629
|
[exports.RCResolution.W176_H132]: { width: 176, height: 132, maxBitrate: 150, minBitrate: 80 },
|
|
5629
5630
|
[exports.RCResolution.W176_H144]: { width: 176, height: 144, maxBitrate: 160, minBitrate: 80 },
|
|
@@ -5640,23 +5641,26 @@ const RongRTCVideoBitrate = {
|
|
|
5640
5641
|
[exports.RCResolution.W1920_H1080]: { width: 1920, height: 1080, maxBitrate: 4000, minBitrate: 400 }
|
|
5641
5642
|
};
|
|
5642
5643
|
/**
|
|
5643
|
-
*
|
|
5644
|
+
* 向上取最接近的视频分辨率配置
|
|
5644
5645
|
* @param {number} width
|
|
5645
5646
|
* @param {number} height
|
|
5646
5647
|
*/
|
|
5647
5648
|
const getNearestResolution = (width, height) => {
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
const item = RongRTCVideoBitrate[key];
|
|
5653
|
-
const d2 = Math.abs(item.width * item.height - area);
|
|
5654
|
-
if (d2 < d) {
|
|
5655
|
-
conf = item;
|
|
5656
|
-
d = d2;
|
|
5657
|
-
}
|
|
5649
|
+
// 优先精准匹配
|
|
5650
|
+
const conf = RongRTCVideoBitrate[`W${width}_H${height}`];
|
|
5651
|
+
if (conf) {
|
|
5652
|
+
return conf;
|
|
5658
5653
|
}
|
|
5659
|
-
|
|
5654
|
+
// 不规则分辨率计算最接近的配置
|
|
5655
|
+
const area = width * height;
|
|
5656
|
+
const confs = Object.keys(RongRTCVideoBitrate)
|
|
5657
|
+
.map(key => RongRTCVideoBitrate[key])
|
|
5658
|
+
// 升序
|
|
5659
|
+
.sort((item, item2) => item.height * item.width - item2.width * item2.height)
|
|
5660
|
+
// 过滤分辨率小于 area 的配置,避免分配带宽不足
|
|
5661
|
+
.filter(item => item.height * item.width >= area);
|
|
5662
|
+
// 若 confs 长度为 0 说明分辨率远大于可支持的分辨率配置,取最大配置
|
|
5663
|
+
return confs[0] || RongRTCVideoBitrate.W1920_H1080;
|
|
5660
5664
|
};
|
|
5661
5665
|
const Multiplier = {
|
|
5662
5666
|
10: 1,
|
|
@@ -6222,13 +6226,18 @@ const getValue = (value) => {
|
|
|
6222
6226
|
* @param track
|
|
6223
6227
|
*/
|
|
6224
6228
|
const getVideoTrackInfo = (track) => {
|
|
6229
|
+
const settings = track.getSettings();
|
|
6225
6230
|
const constraints = track.getConstraints();
|
|
6226
6231
|
// firefox 平台不存在 getCapabilities 方法
|
|
6227
6232
|
// const capabilities = track.getCapabilities()
|
|
6228
6233
|
// const width = getValue(constraints.width) || getValue(capabilities.width)
|
|
6229
6234
|
// const height = getValue(constraints.height) || getValue(capabilities.height)
|
|
6230
6235
|
// const frameRate = getValue(constraints.frameRate) || getValue(capabilities.frameRate)
|
|
6231
|
-
return {
|
|
6236
|
+
return {
|
|
6237
|
+
width: settings.width || getValue(constraints.width),
|
|
6238
|
+
height: settings.height || getValue(constraints.height),
|
|
6239
|
+
frameRate: settings.frameRate || getValue(constraints.frameRate)
|
|
6240
|
+
};
|
|
6232
6241
|
};
|
|
6233
6242
|
/**
|
|
6234
6243
|
* 取视频流动态码率
|
|
@@ -6237,8 +6246,8 @@ const getVideoTrackInfo = (track) => {
|
|
|
6237
6246
|
*/
|
|
6238
6247
|
const getDynamicBitrate = (track) => {
|
|
6239
6248
|
const { width, height, frameRate } = getVideoTrackInfo(track);
|
|
6240
|
-
//
|
|
6241
|
-
const config = getNearestResolution(width, height);
|
|
6249
|
+
// 计算动态码率,若 videoTrack 的分辨率读取失败,则以 640 * 480 的默认分辨率计算码率
|
|
6250
|
+
const config = getNearestResolution(width || 640, height || 480);
|
|
6242
6251
|
const multiple = getBitrateMultiple(frameRate);
|
|
6243
6252
|
return { min: config.minBitrate * multiple, max: config.maxBitrate * multiple };
|
|
6244
6253
|
};
|
|
@@ -8450,7 +8459,7 @@ class PolarisReporter {
|
|
|
8450
8459
|
* 加入房间
|
|
8451
8460
|
*/
|
|
8452
8461
|
sendR1() {
|
|
8453
|
-
const rtcVersion = "5.2.4-beem.
|
|
8462
|
+
const rtcVersion = "5.2.4-beem.5";
|
|
8454
8463
|
const imVersion = this._context.getCoreVersion();
|
|
8455
8464
|
const platform = 'web';
|
|
8456
8465
|
const pcName = navigator.platform;
|
|
@@ -10708,7 +10717,7 @@ const getCommonHeader = () => ({
|
|
|
10708
10717
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
10709
10718
|
'Cache-Control': 'no-cache',
|
|
10710
10719
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
10711
|
-
ClientVersion: "5.2.4-beem.
|
|
10720
|
+
ClientVersion: "5.2.4-beem.5",
|
|
10712
10721
|
'Client-Session-Id': getUUID(),
|
|
10713
10722
|
'Request-Id': Date.now().toString()
|
|
10714
10723
|
});
|
|
@@ -12737,7 +12746,7 @@ const installer = {
|
|
|
12737
12746
|
logger.error('Please use the https protocol or use `http://localhost` to open the page!');
|
|
12738
12747
|
return false;
|
|
12739
12748
|
}
|
|
12740
|
-
engine.VersionManage.add('plugin-rtc', "5.2.4-beem.
|
|
12749
|
+
engine.VersionManage.add('plugin-rtc', "5.2.4-beem.5");
|
|
12741
12750
|
if (!engine.VersionManage.validEngine("4.6.0-beem.5")) {
|
|
12742
12751
|
logger.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"4.6.0-beem.5"}'.`);
|
|
12743
12752
|
return false;
|
|
@@ -12747,7 +12756,7 @@ const installer = {
|
|
|
12747
12756
|
setup(context, runtime, options = {}) {
|
|
12748
12757
|
logger.setLogLevel(options.logLevel);
|
|
12749
12758
|
logger.setLogStdout(options.logStdout);
|
|
12750
|
-
logger.warn(`RCRTC Version: ${"5.2.4-beem.
|
|
12759
|
+
logger.warn(`RCRTC Version: ${"5.2.4-beem.5"}, Commit: ${"13f398c4a680ab6054d831b2e76e51f68a677de9"}`);
|
|
12751
12760
|
logger.warn(`browserInfo.browser -> ${browserInfo.browser}`);
|
|
12752
12761
|
logger.warn(`browserInfo.supportsUnifiedPlan -> ${browserInfo.supportsUnifiedPlan}`);
|
|
12753
12762
|
logger.warn(`browserInfo.version -> ${browserInfo.version}`);
|
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.2.4-beem.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.2.4-beem.5
|
|
3
|
+
* CommitId - 13f398c4a680ab6054d831b2e76e51f68a677de9
|
|
4
|
+
* Mon May 23 2022 11:07:54 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
(function (global, factory) {
|
|
@@ -5624,6 +5624,7 @@
|
|
|
5624
5624
|
RCMediaType[RCMediaType["AUDIO_VIDEO"] = 2] = "AUDIO_VIDEO";
|
|
5625
5625
|
})(exports.RCMediaType || (exports.RCMediaType = {}));
|
|
5626
5626
|
|
|
5627
|
+
// export const RongRTCVideoBitrate: { [key: RCResolution]: BitrateConf } = {
|
|
5627
5628
|
const RongRTCVideoBitrate = {
|
|
5628
5629
|
[exports.RCResolution.W176_H132]: { width: 176, height: 132, maxBitrate: 150, minBitrate: 80 },
|
|
5629
5630
|
[exports.RCResolution.W176_H144]: { width: 176, height: 144, maxBitrate: 160, minBitrate: 80 },
|
|
@@ -5640,23 +5641,26 @@
|
|
|
5640
5641
|
[exports.RCResolution.W1920_H1080]: { width: 1920, height: 1080, maxBitrate: 4000, minBitrate: 400 }
|
|
5641
5642
|
};
|
|
5642
5643
|
/**
|
|
5643
|
-
*
|
|
5644
|
+
* 向上取最接近的视频分辨率配置
|
|
5644
5645
|
* @param {number} width
|
|
5645
5646
|
* @param {number} height
|
|
5646
5647
|
*/
|
|
5647
5648
|
const getNearestResolution = (width, height) => {
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
const item = RongRTCVideoBitrate[key];
|
|
5653
|
-
const d2 = Math.abs(item.width * item.height - area);
|
|
5654
|
-
if (d2 < d) {
|
|
5655
|
-
conf = item;
|
|
5656
|
-
d = d2;
|
|
5657
|
-
}
|
|
5649
|
+
// 优先精准匹配
|
|
5650
|
+
const conf = RongRTCVideoBitrate[`W${width}_H${height}`];
|
|
5651
|
+
if (conf) {
|
|
5652
|
+
return conf;
|
|
5658
5653
|
}
|
|
5659
|
-
|
|
5654
|
+
// 不规则分辨率计算最接近的配置
|
|
5655
|
+
const area = width * height;
|
|
5656
|
+
const confs = Object.keys(RongRTCVideoBitrate)
|
|
5657
|
+
.map(key => RongRTCVideoBitrate[key])
|
|
5658
|
+
// 升序
|
|
5659
|
+
.sort((item, item2) => item.height * item.width - item2.width * item2.height)
|
|
5660
|
+
// 过滤分辨率小于 area 的配置,避免分配带宽不足
|
|
5661
|
+
.filter(item => item.height * item.width >= area);
|
|
5662
|
+
// 若 confs 长度为 0 说明分辨率远大于可支持的分辨率配置,取最大配置
|
|
5663
|
+
return confs[0] || RongRTCVideoBitrate.W1920_H1080;
|
|
5660
5664
|
};
|
|
5661
5665
|
const Multiplier = {
|
|
5662
5666
|
10: 1,
|
|
@@ -6222,13 +6226,18 @@
|
|
|
6222
6226
|
* @param track
|
|
6223
6227
|
*/
|
|
6224
6228
|
const getVideoTrackInfo = (track) => {
|
|
6229
|
+
const settings = track.getSettings();
|
|
6225
6230
|
const constraints = track.getConstraints();
|
|
6226
6231
|
// firefox 平台不存在 getCapabilities 方法
|
|
6227
6232
|
// const capabilities = track.getCapabilities()
|
|
6228
6233
|
// const width = getValue(constraints.width) || getValue(capabilities.width)
|
|
6229
6234
|
// const height = getValue(constraints.height) || getValue(capabilities.height)
|
|
6230
6235
|
// const frameRate = getValue(constraints.frameRate) || getValue(capabilities.frameRate)
|
|
6231
|
-
return {
|
|
6236
|
+
return {
|
|
6237
|
+
width: settings.width || getValue(constraints.width),
|
|
6238
|
+
height: settings.height || getValue(constraints.height),
|
|
6239
|
+
frameRate: settings.frameRate || getValue(constraints.frameRate)
|
|
6240
|
+
};
|
|
6232
6241
|
};
|
|
6233
6242
|
/**
|
|
6234
6243
|
* 取视频流动态码率
|
|
@@ -6237,8 +6246,8 @@
|
|
|
6237
6246
|
*/
|
|
6238
6247
|
const getDynamicBitrate = (track) => {
|
|
6239
6248
|
const { width, height, frameRate } = getVideoTrackInfo(track);
|
|
6240
|
-
//
|
|
6241
|
-
const config = getNearestResolution(width, height);
|
|
6249
|
+
// 计算动态码率,若 videoTrack 的分辨率读取失败,则以 640 * 480 的默认分辨率计算码率
|
|
6250
|
+
const config = getNearestResolution(width || 640, height || 480);
|
|
6242
6251
|
const multiple = getBitrateMultiple(frameRate);
|
|
6243
6252
|
return { min: config.minBitrate * multiple, max: config.maxBitrate * multiple };
|
|
6244
6253
|
};
|
|
@@ -8450,7 +8459,7 @@
|
|
|
8450
8459
|
* 加入房间
|
|
8451
8460
|
*/
|
|
8452
8461
|
sendR1() {
|
|
8453
|
-
const rtcVersion = "5.2.4-beem.
|
|
8462
|
+
const rtcVersion = "5.2.4-beem.5";
|
|
8454
8463
|
const imVersion = this._context.getCoreVersion();
|
|
8455
8464
|
const platform = 'web';
|
|
8456
8465
|
const pcName = navigator.platform;
|
|
@@ -10708,7 +10717,7 @@
|
|
|
10708
10717
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
10709
10718
|
'Cache-Control': 'no-cache',
|
|
10710
10719
|
ClientType: `web|${browserInfo.browser}|${browserInfo.version}`,
|
|
10711
|
-
ClientVersion: "5.2.4-beem.
|
|
10720
|
+
ClientVersion: "5.2.4-beem.5",
|
|
10712
10721
|
'Client-Session-Id': getUUID(),
|
|
10713
10722
|
'Request-Id': Date.now().toString()
|
|
10714
10723
|
});
|
|
@@ -12737,7 +12746,7 @@
|
|
|
12737
12746
|
logger.error('Please use the https protocol or use `http://localhost` to open the page!');
|
|
12738
12747
|
return false;
|
|
12739
12748
|
}
|
|
12740
|
-
engine.VersionManage.add('plugin-rtc', "5.2.4-beem.
|
|
12749
|
+
engine.VersionManage.add('plugin-rtc', "5.2.4-beem.5");
|
|
12741
12750
|
if (!engine.VersionManage.validEngine("4.6.0-beem.5")) {
|
|
12742
12751
|
logger.error(`The current engine version '${engine.VersionManage.getInfo().engine}' error, plugin-rtc required engine version at least '${"4.6.0-beem.5"}'.`);
|
|
12743
12752
|
return false;
|
|
@@ -12747,7 +12756,7 @@
|
|
|
12747
12756
|
setup(context, runtime, options = {}) {
|
|
12748
12757
|
logger.setLogLevel(options.logLevel);
|
|
12749
12758
|
logger.setLogStdout(options.logStdout);
|
|
12750
|
-
logger.warn(`RCRTC Version: ${"5.2.4-beem.
|
|
12759
|
+
logger.warn(`RCRTC Version: ${"5.2.4-beem.5"}, Commit: ${"13f398c4a680ab6054d831b2e76e51f68a677de9"}`);
|
|
12751
12760
|
logger.warn(`browserInfo.browser -> ${browserInfo.browser}`);
|
|
12752
12761
|
logger.warn(`browserInfo.supportsUnifiedPlan -> ${browserInfo.supportsUnifiedPlan}`);
|
|
12753
12762
|
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.2.4-beem.
|
|
3
|
+
"version": "5.2.4-beem.5",
|
|
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": "4.6.0-beem.5"
|
|
35
35
|
},
|
|
36
|
-
"__commit__": "
|
|
36
|
+
"__commit__": "13f398c4a680ab6054d831b2e76e51f68a677de9"
|
|
37
37
|
}
|