diff --git a/sdk/demo/demo.html b/sdk/demo/demo.html
index 818362c4b63ceedcdd2b7d465a26bbc1ea4dbb86..a4839e4ce72d4bf42cae1dee459dc75d1cb7b5c6 100644
--- a/sdk/demo/demo.html
+++ b/sdk/demo/demo.html
@@ -372,7 +372,11 @@ Copyright 2022 Huawei Cloud Computing Technology Co., Ltd.
auto_rotate: true,
libPath: commonLibPath, // 配置库文件地址
decoder_type: 'H264', // H265\H264
- microPhoneOutputType: 'OPUS' // PCM或OPUS
+ microPhoneOutputType: 'OPUS', // PCM或OPUS
+ media_config: {
+ bitrate: 3000000, // [100000, 1000000]
+ fps: 10 // [10, 60] 10的整数倍
+ }
};
try {
diff --git a/sdk/index.html b/sdk/index.html
index 1993dccbd1f25ee3e59efc85f464af2e3dbf72a2..365cf6d45cc8fac825f193d8a786ab79e463a5c0 100644
--- a/sdk/index.html
+++ b/sdk/index.html
@@ -372,7 +372,11 @@ Copyright 2022 Huawei Cloud Computing Technology Co., Ltd.
auto_rotate: true,
libPath: commonLibPath, // 配置库文件地址
decoder_type: 'H264', // H265\H264
- microPhoneOutputType: 'OPUS' // PCM或OPUS
+ microPhoneOutputType: 'OPUS', // PCM或OPUS
+ media_config: {
+ bitrate: 3000000, // [100000, 1000000]
+ fps: 10 // [10, 60] 10的整数倍
+ }
};
try {
if (CloudApp.isSupport()) {
diff --git a/sdk/src/AppController.js b/sdk/src/AppController.js
index 330004748c666d000e0fa0a4cee4370c9ea6d969..918dec3f2c95a511fe9391214a888478199cd66c 100644
--- a/sdk/src/AppController.js
+++ b/sdk/src/AppController.js
@@ -922,6 +922,7 @@ class AppController {
protocol_version: 'v2',
client_type: '3',
media_config: {
+ ...this.options.mediaConfig,
frame_type: FRAME_TYPE_MAP.TYPE265
}
};
@@ -1176,6 +1177,10 @@ class AppController {
const frameType = this.recMediaConfig.frame_type.toUpperCase();
const allMediaConfig = PROTOCOL_CONFIG[frameType];
const config = allMediaConfig[`${mediaWidth}P`][clarityVal];
+ if (this.startParams.media_config && this.startParams.media_config.bitrate) {
+ config.bitrate = this.startParams.media_config.bitrate;
+ }
+
this.setMediaConfig(config);
}
}
diff --git a/sdk/src/CloudApp.js b/sdk/src/CloudApp.js
index 60e24569aef363915c684809affb31fe870d2d69..2438e5cb9377229a9b61d32cddf9a8598bcfb0bc 100644
--- a/sdk/src/CloudApp.js
+++ b/sdk/src/CloudApp.js
@@ -226,7 +226,7 @@ class CloudApp {
}
let schema = {
- frame_rate: [{
+ fps: [{
type: 'number',
min: 10,
max: 60