@realsee/live 0.5.2-dev.8 → 0.5.4-alpha.1

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.
@@ -4,7 +4,7 @@ import { UserInfo } from './UserInfo';
4
4
  /**
5
5
  * 带看事件列表
6
6
  */
7
- export type LiveEventType<KeyframesSnapshot> = {
7
+ export declare type LiveEventType<KeyframesSnapshot> = {
8
8
  /**
9
9
  * 带看状态变化
10
10
  * @param state
@@ -65,10 +65,10 @@ export type LiveEventType<KeyframesSnapshot> = {
65
65
  /**
66
66
  * 帧数据类型
67
67
  */
68
- export type KeyframeTypes<Type> = {
68
+ export declare type KeyframeTypes<Type> = {
69
69
  [Property in keyof Type as Property]: (nextKeyframes: Type[Property], prevKeyframes: Type[Property], frontRequestId: string) => void;
70
70
  };
71
71
  /**
72
72
  * 事件解析
73
73
  */
74
- export type EventType<KeyframesSnapshot> = LiveEventType<KeyframesSnapshot>;
74
+ export declare type EventType<KeyframesSnapshot> = LiveEventType<KeyframesSnapshot>;
@@ -10,7 +10,7 @@ export interface GetVoiceSignReturnType {
10
10
  /**
11
11
  * 获取用户语音签名
12
12
  */
13
- export type GetVoiceSign = ({ voiceId, userId, roomId, }: {
13
+ export declare type GetVoiceSign = ({ voiceId, userId, roomId, }: {
14
14
  voiceId: string;
15
15
  userId: string;
16
16
  roomId: string | number;
@@ -1,5 +1,5 @@
1
1
  import { MicroStatus } from "./LiveMsg";
2
- export type LiveConnectOptions = {
2
+ export declare type LiveConnectOptions = {
3
3
  url?: string;
4
4
  force?: boolean;
5
5
  getTicket?: () => Promise<string>;
@@ -16,7 +16,7 @@ export declare enum Command {
16
16
  /**
17
17
  * 向服务端请求数据时的数据格式。
18
18
  */
19
- export type ReqLiveMsg = {
19
+ export declare type ReqLiveMsg = {
20
20
  /**
21
21
  * 请求指令。
22
22
  */
@@ -81,7 +81,7 @@ export declare enum BuiltinActionType {
81
81
  /**
82
82
  * 内置事件数据结构体。
83
83
  */
84
- export type BuiltinMsg = {
84
+ export declare type BuiltinMsg = {
85
85
  event_type: BuiltinEventType;
86
86
  action: BuiltinActionType;
87
87
  to_user_ids: string[];
@@ -100,7 +100,7 @@ export declare enum MicroStatus {
100
100
  /**
101
101
  * 响应的信息结构体。
102
102
  */
103
- export type LiveMsg = {
103
+ export declare type LiveMsg = {
104
104
  code: string;
105
105
  message: string;
106
106
  command: Command;
@@ -1,4 +1,4 @@
1
- export type RoomInfo = {
1
+ export declare type RoomInfo = {
2
2
  info: {
3
3
  id: string | number;
4
4
  status: string | number;
@@ -26,7 +26,7 @@ export declare enum MemUserStatus {
26
26
  /**
27
27
  * 用户信息扩展字段:比如提供用户画像相关的数据。
28
28
  */
29
- export type UserInfoExt = {
29
+ export declare type UserInfoExt = {
30
30
  /**
31
31
  * 用户昵称。
32
32
  */
@@ -43,7 +43,7 @@ export type UserInfoExt = {
43
43
  /**
44
44
  * 带看会话房间用户的信息格式。
45
45
  */
46
- export type UserInfo = {
46
+ export declare type UserInfo = {
47
47
  /**
48
48
  * 用户唯一标识ID。
49
49
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 用户的音量信息。
3
3
  */
4
- export type UserVolume = {
4
+ export declare type UserVolume = {
5
5
  userId: string;
6
6
  audioVolume: number;
7
7
  };
@@ -23,7 +23,7 @@ export declare enum WebSocketState {
23
23
  */
24
24
  CLOSED = 3
25
25
  }
26
- export type WebSocketError = {
26
+ export declare type WebSocketError = {
27
27
  type: WebSocketErrorType;
28
28
  closeError?: WebSocketCloseError;
29
29
  target?: Event | CloseEvent;
@@ -1,2 +1,2 @@
1
1
  import { RTCProtocol } from '../rtc/protocol';
2
- export type RTCActionReactCallback = Pick<RTCProtocol, 'join' | 'quit' | 'shock' | 'toggleMicro' | 'detectMicro'>;
2
+ export declare type RTCActionReactCallback = Pick<RTCProtocol, 'join' | 'quit' | 'shock' | 'toggleMicro' | 'detectMicro'>;
@@ -3,7 +3,7 @@ import { RTCJoinedInfo } from './joinedInfo';
3
3
  /**
4
4
  * RTC 异步事件类型。
5
5
  */
6
- export type RTCEventType = {
6
+ export declare type RTCEventType = {
7
7
  /**
8
8
  * 错误\异常
9
9
  * @param error
@@ -2,7 +2,7 @@ import { Subscribe } from './subscribe';
2
2
  /**
3
3
  * 鲁棒ws的配置参数
4
4
  */
5
- export type RobustWebSocketConstructorOptions = {
5
+ export declare type RobustWebSocketConstructorOptions = {
6
6
  url: string | ((ws: RobustWebSocket) => string);
7
7
  protocols?: string[];
8
8
  robustOptions?: RobustOptions;
@@ -10,21 +10,21 @@ export type RobustWebSocketConstructorOptions = {
10
10
  /**
11
11
  * ws 鲁棒性的配置
12
12
  */
13
- export type RobustOptions = {
13
+ export declare type RobustOptions = {
14
14
  timeout?: number;
15
15
  shouldReconnect?: (event: CloseEvent, ws: RobustWebSocket) => undefined | number;
16
16
  should1000Reconnect?: boolean;
17
17
  ignoreConnectivityEvents?: boolean;
18
18
  automaticOpen?: boolean;
19
19
  };
20
- export type RobustWebSocketEventDetail = {
20
+ export declare type RobustWebSocketEventDetail = {
21
21
  reconnects: number;
22
22
  attempts: number;
23
23
  };
24
- export type RobustWebSocketEvent<T> = Event & {
24
+ export declare type RobustWebSocketEvent<T> = Event & {
25
25
  detail: T;
26
26
  };
27
- export type RobustWebSocketEventMap = {
27
+ export declare type RobustWebSocketEventMap = {
28
28
  connecting: (event: RobustWebSocketEvent<RobustWebSocketEventDetail>) => void;
29
29
  timeout: (event: RobustWebSocketEvent<RobustWebSocketEventDetail>) => void;
30
30
  open: (event: RobustWebSocketEvent<RobustWebSocketEventDetail>) => void;
@@ -1,4 +1,4 @@
1
- export type EventMap = {
1
+ export declare type EventMap = {
2
2
  [name: string]: (...args: any[]) => void | boolean;
3
3
  };
4
4
  /**
@@ -10,7 +10,7 @@
10
10
  <p>语音房间ID</p>
11
11
  </div></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="_initDom" class="tsd-anchor"></a><h3 class="tsd-anchor-link">_init<wbr/>Dom<a href="#_initDom" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">_init<wbr/>Dom<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in rtc/BrowserRTC4Chime.ts:61</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
12
12
  <p>对audio标签初始化</p>
13
- </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="_registerRtcEvent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">_register<wbr/>Rtc<wbr/>Event<a href="#_registerRtcEvent" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">_register<wbr/>Rtc<wbr/>Event<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in rtc/BrowserRTC4Chime.ts:225</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
13
+ </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="_registerRtcEvent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">_register<wbr/>Rtc<wbr/>Event<a href="#_registerRtcEvent" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">_register<wbr/>Rtc<wbr/>Event<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in rtc/BrowserRTC4Chime.ts:224</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
14
14
  <p>注册rtc事件</p>
15
15
  </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="detectMicro" class="tsd-anchor"></a><h3 class="tsd-anchor-link">detect<wbr/>Micro<a href="#detectMicro" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">detect<wbr/>Micro<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="CoreRTC.html">CoreRTC</a>.<a href="CoreRTC.html#detectMicro">detectMicro</a></p><ul><li>Defined in rtc/BrowserRTC4Chime.ts:332</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
16
16
  <p>监测麦克风授权。</p>
@@ -67,7 +67,7 @@
67
67
  </div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"><div class="lead">
68
68
  <p>注册事件(是否只执行一次)</p>
69
69
  </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div><p>解除事件</p>
70
- </div></li></ul></li></ul></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="quit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">quit<a href="#quit" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">quit<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="CoreRTC.html">CoreRTC</a>.<a href="CoreRTC.html#quit">quit</a></p><ul><li>Defined in rtc/BrowserRTC4Chime.ts:305</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
70
+ </div></li></ul></li></ul></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="quit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">quit<a href="#quit" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">quit<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="CoreRTC.html">CoreRTC</a>.<a href="CoreRTC.html#quit">quit</a></p><ul><li>Defined in rtc/BrowserRTC4Chime.ts:304</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
71
71
  <p>离开房间。</p>
72
72
  </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="shock" class="tsd-anchor"></a><h3 class="tsd-anchor-link">shock<a href="#shock" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">shock<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="CoreRTC.html">CoreRTC</a>.<a href="CoreRTC.html#shock">shock</a></p><ul><li>Defined in rtc/BrowserRTC4Chime.ts:361</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
73
73
  <p>震动。</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/live",
3
- "version": "0.5.2-dev.8",
3
+ "version": "0.5.4-alpha.1",
4
4
  "description": "如视 Live SDK:基于如视 WebSocket 长链双工通信能力的前端封装,借助此 SDK 您可以快捷地实现具备同屏连线、实时语音的 VR 带看业务能力。",
5
5
  "scripts": {
6
6
  "build": "npx rollpkg build --addUmdBuild",
@@ -23,18 +23,18 @@
23
23
  "TERMS.txt"
24
24
  ],
25
25
  "devDependencies": {
26
- "@realsee/jsbridge-x": "0.2.5-dev.2",
26
+ "@realsee/jsbridge-x": "0.2.6",
27
27
  "@types/react": "^17.0.2",
28
- "@types/trtc-js-sdk": "^4.9.0",
28
+ "@types/trtc-js-sdk": "4.9.0",
29
29
  "rollpkg": "^0.5.7",
30
30
  "tslib": "^2.4.0",
31
31
  "typedoc": "^0.22.17",
32
32
  "typescript": "^4.7.2"
33
33
  },
34
34
  "dependencies": {
35
- "amazon-chime-sdk-js": "^2.26.1",
35
+ "amazon-chime-sdk-js": "3.11.0",
36
36
  "react": "17.0.2",
37
- "trtc-js-sdk": "4.15.2"
37
+ "trtc-js-sdk": "4.15.3"
38
38
  },
39
39
  "author": "BEIKE REALSEE TECHNOLOGY (HK) LIMITED",
40
40
  "license": "SEE LICENSE IN TERMS.txt"