Skip to content

Commit 53de813

Browse files
author
ranpeng
committed
v2.1.5
1 parent 2a7f18c commit 53de813

File tree

5 files changed

+50
-15
lines changed

5 files changed

+50
-15
lines changed

changelog.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
### [2.1.5](https://github.com/tencentyun/cloudgame-js-sdk/releases/tag/v2.1.5)@2025.12.05
2+
3+
**新增**
4+
5+
- 新增首帧检测逻辑
6+
- 新增 init 参数 autoFocusVideo
7+
- 新增移动端自动适配 mount 节点 size
8+
- 新增 init 参数 statsInterval
9+
10+
**修复**
11+
12+
- 重连音频播放失败
13+
14+
**变更**
15+
16+
- 取消自动 focus video element
17+
18+
**优化**
19+
20+
- instanceId 去重
21+
22+
23+
124
### [2.1.4](https://github.com/tencentyun/cloudgame-js-sdk/releases/tag/v2.1.4)@2025.11.19
225

326
**新增**

dist/tcg-sdk/index.d.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export interface OnInitSuccessResponse {
1515
* 通常重连时间超过两分钟(例如连接断开/移动端切后台,两分钟后触发重连)
1616
* 系统会自动回收实例,表现为返回 code > 0,建议该情况下 重新init + createSession
1717
*
18+
* code=-6 模式禁用
1819
* code=-3 超出重试次数,需重新init + createSession
1920
* code=-2 自动重连中
2021
* code=-1 连接失败,触发了限频操作 5s,可稍后再连接
@@ -953,19 +954,6 @@ export interface InitConfig {
953954
* Group Control 配置
954955
*/
955956
groupControl?: {
956-
/**
957-
* 串流 clients
958-
*/
959-
clients?: {
960-
/**
961-
* client label
962-
*/
963-
label: string;
964-
/**
965-
* 页面挂载点的 HTML 元素 ID
966-
*/
967-
mount: string;
968-
}[];
969957
/**
970958
* 截图相关配置
971959
*/
@@ -1098,6 +1086,12 @@ export interface InitConfig {
10981086
* @default 300
10991087
*/
11001088
idleThreshold?: number;
1089+
/**
1090+
* WebRTC stats / Media stats 统计间隔,默认 1s 一次回调
1091+
*
1092+
* @default 1
1093+
*/
1094+
statsInterval?: number;
11011095
/**
11021096
* 断开的时候是否保留最后一帧画面。
11031097
*
@@ -1158,6 +1152,12 @@ export interface InitConfig {
11581152
* @default true
11591153
*/
11601154
fullVideoToScreen?: boolean;
1155+
/**
1156+
* Auto focus to video element
1157+
*
1158+
* @default false
1159+
*/
1160+
autoFocusVideo?: boolean;
11611161
/**
11621162
* debugSetting 会在控制台打印出对应的日志 有如下配置
11631163
*/

dist/tcg-sdk/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tcg-sdk/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/tcg-sdk/index_en.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,12 @@ export interface InitConfig {
10921092
* @default 300
10931093
*/
10941094
idleThreshold?: number;
1095+
/**
1096+
* WebRTC stats / Media stats interval, default 1s
1097+
*
1098+
* @default 1
1099+
*/
1100+
statsInterval?: number;
10951101
/**
10961102
* Keep last frame image when destroy. Mac safari/ios webview does not work.
10971103
*
@@ -1146,6 +1152,12 @@ export interface InitConfig {
11461152
* @default true
11471153
*/
11481154
fullVideoToScreen?: boolean;
1155+
/**
1156+
* Auto focus to video element
1157+
*
1158+
* @default false
1159+
*/
1160+
autoFocusVideo?: boolean;
11491161
/**
11501162
* Enables/Disables the debugging mode. If it is enabled, logs will be printed in the console.
11511163
*/

0 commit comments

Comments
 (0)