Skip to content

Commit f4db407

Browse files
author
ranpeng
committed
v1.1.8
1 parent 82b8b9d commit f4db407

File tree

4 files changed

+91
-2
lines changed

4 files changed

+91
-2
lines changed

changelog.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
### [1.1.7](https://github.com/tencentyun/cloudgame-js-sdk/releases/tag/v1.1.7)@2022.08.10
1+
### [1.1.8](https://github.com/tencentyun/cloudgame-js-sdk/releases/tag/v1.1.8)@2022.11.02
2+
3+
**新增**
4+
5+
- 新增云端推流状态变化通知
6+
7+
**修复**
8+
9+
- 端游旋转屏幕情况下,deltaMove 发送不准确问题
10+
- 获取摄像头/麦克风失败,导致创建 offer 失败问题
11+
12+
### [1.1.7](https://github.com/tencentyun/cloudgame-js-sdk/releases/tag/v1.1.7)@2022.10.10
213

314
**新增**
415

dist/tcg-sdk/index.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,17 @@ export interface OnConfigurationChangeResponse {
290290
};
291291
}
292292

293+
/**
294+
* 云端屏幕分辨率发生变化
295+
* @ignore
296+
*/
297+
export interface OnRemoteScreenResolutionChangeResponse {
298+
width: number;
299+
height: number;
300+
top: number;
301+
left: number;
302+
}
303+
293304
export interface SeatsInfo {
294305
players: {
295306
name: string;
@@ -425,6 +436,15 @@ export type OnEventResponse =
425436
| OnEventNoflowcenterResponse
426437
| OnEventLatencyResponse;
427438

439+
/**
440+
* 直播推流相关
441+
*/
442+
export type StreamPushState = 'NoStreamPushing' | 'PushConnecting' | 'Pushing' | 'PushPaused' | 'PushReConnecting';
443+
444+
export type OnStreamPushStateChangeResponse = {
445+
stream_push_state: StreamPushState;
446+
};
447+
428448
/**
429449
* 调试相关设置
430450
*/
@@ -774,6 +794,10 @@ export interface InitConfig {
774794
* | 1 | 用户重复连接 |
775795
* | 2 | 用户心跳超时,webrtc服务端主动断开,这个消息有可能丢失 init + trylock |
776796
* @param {string} response.msg - message
797+
*
798+
* @description
799+
* 当出现 -1 时候,如果设置了 init 参数 `reconnect: true`(默认值 true) 不用任何操作,SDK 会主动重连,未设置需要调用 TCGSDK.reconnect()
800+
* 如果持续链接不上,可以看回调 onConnectFail 相关错误嘛,在里面完善相关逻辑
777801
*/
778802
onDisconnect?: (response: OnDisconnectResponse) => void;
779803
/**
@@ -965,6 +989,17 @@ export interface InitConfig {
965989
* @param {('landscape'|'portrait')} response.orientation - 屏幕方向
966990
*/
967991
onConfigurationChange?: (response: OnConfigurationChangeResponse) => void;
992+
/**
993+
* 云端屏幕分辨率发生变化,具体如下:
994+
*
995+
* @function
996+
* @param {Object} response - onRemoteScreenResolutionChange 回调函数的 response
997+
* @param {number} response.width
998+
* @param {number} response.height
999+
* @param {number} response.top
1000+
* @param {number} response.left
1001+
*/
1002+
onRemoteScreenResolutionChange?: (response: OnRemoteScreenResolutionChangeResponse) => void;
9681003
/**
9691004
* 连接设备发生变化,需要通过 navigator.mediaDevices.enumerateDevices() 拿到可用设备
9701005
* @function
@@ -999,6 +1034,12 @@ export interface InitConfig {
9991034
* @param {any} response.data - 根据对应 code 判断
10001035
*/
10011036
onEvent?: (response: OnEventResponse) => void;
1037+
/**
1038+
* @function
1039+
* @param {Object} response - onStreamPushStateChange 回调函数的 response
1040+
* @param {string} response.stream_push_state - 推流状态 'NoStreamPushing' | 'PushConnecting' | 'Pushing' | 'PushPaused' | 'PushReConnecting';
1041+
*/
1042+
onStreamPushStateChange?: (response: OnStreamPushStateChangeResponse) => void;
10021043
/**
10031044
* **多人云游(测试阶段)**
10041045
*

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_en.d.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,17 @@ export interface OnConfigurationChangeResponse {
290290
};
291291
}
292292

293+
/**
294+
* Cloud screen resolution changed.
295+
* @ignore
296+
*/
297+
export interface OnRemoteScreenResolutionChangeResponse {
298+
width: number;
299+
height: number;
300+
top: number;
301+
left: number;
302+
}
303+
293304
export interface SeatsInfo {
294305
players: {
295306
name: string;
@@ -425,6 +436,15 @@ export type OnEventResponse =
425436
| OnEventNoflowcenterResponse
426437
| OnEventLatencyResponse;
427438

439+
/**
440+
* Push stream
441+
*/
442+
export type StreamPushState = 'NoStreamPushing' | 'PushConnecting' | 'Pushing' | 'PushPaused' | 'PushReConnecting';
443+
444+
export type OnStreamPushStateChangeResponse = {
445+
stream_push_state: StreamPushState;
446+
};
447+
428448
/**
429449
* Debug settings
430450
*/
@@ -968,6 +988,17 @@ export interface InitConfig {
968988
* @param {('landscape'|'portrait')} response.orientation - orientation
969989
*/
970990
onConfigurationChange?: (response: OnConfigurationChangeResponse) => void;
991+
/**
992+
* Cloud screen resolution changed.
993+
*
994+
* @function
995+
* @param {Object} response - onRemoteScreenResolutionChange response
996+
* @param {number} response.width
997+
* @param {number} response.height
998+
* @param {number} response.top
999+
* @param {number} response.left
1000+
*/
1001+
onRemoteScreenResolutionChange?: (response: OnRemoteScreenResolutionChangeResponse) => void;
9711002
/**
9721003
* Connected devices have changed and can be get by `navigator.mediaDevices.enumerateDevices()`.
9731004
* @function
@@ -1002,6 +1033,12 @@ export interface InitConfig {
10021033
* @param {any} response.data
10031034
*/
10041035
onEvent?: (response: OnEventResponse) => void;
1036+
/**
1037+
* @function
1038+
* @param {Object} response - onStreamPushStateChange response
1039+
* @param {string} response.stream_push_state - Push state 'NoStreamPushing' | 'PushConnecting' | 'Pushing' | 'PushPaused' | 'PushReConnecting';
1040+
*/
1041+
onStreamPushStateChange?: (response: OnStreamPushStateChangeResponse) => void;
10051042
/**
10061043
* **Multi-player cloud game (in beta test)**
10071044
*

0 commit comments

Comments
 (0)