@realsee/live 0.4.0-alpha.3 → 0.4.0-beta.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.
- package/README.md +74 -54
- package/dist/realsee-live.cjs.development.js +51 -5
- package/dist/realsee-live.cjs.development.js.map +1 -1
- package/dist/realsee-live.cjs.production.js +1 -1
- package/dist/realsee-live.cjs.production.js.map +1 -1
- package/dist/realsee-live.esm.js +51 -6
- package/dist/realsee-live.esm.js.map +1 -1
- package/dist/realsee-live.umd.development.js +1803 -36
- package/dist/realsee-live.umd.development.js.map +1 -1
- package/dist/realsee-live.umd.production.js +1 -1
- package/dist/realsee-live.umd.production.js.map +1 -1
- package/dist/typings/live/Live.d.ts +6 -1
- package/dist/typings/live/LiveOptions.d.ts +14 -1
- package/dist/typings/react/LiveReact.d.ts +2 -0
- package/dist/typings/rtc/type.d.ts +4 -0
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ import { WebSocketState } from './WebSocket';
|
|
|
5
5
|
import { BuiltinActionType, BuiltinEventType, MicroStatus } from './LiveMsg';
|
|
6
6
|
import { Subscribe } from '../../utils/subscribe';
|
|
7
7
|
import { RTCProtocol } from '../rtc/protocol';
|
|
8
|
+
import { JSBridgeProtocol } from '@realsee/jsbridge-x';
|
|
8
9
|
/**
|
|
9
10
|
* Live 实例。
|
|
10
11
|
*/
|
|
@@ -38,9 +39,13 @@ export interface Live<Snapshot extends Record<string, any>> extends Subscribe<Ev
|
|
|
38
39
|
*/
|
|
39
40
|
get url(): string;
|
|
40
41
|
/**
|
|
41
|
-
*
|
|
42
|
+
* 获取当前live使用的RTC实例
|
|
42
43
|
*/
|
|
43
44
|
get $RTC(): RTCProtocol;
|
|
45
|
+
/**
|
|
46
|
+
* 获取当前live使用的jsBridge实例
|
|
47
|
+
*/
|
|
48
|
+
get jsBridge(): JSBridgeProtocol;
|
|
44
49
|
/**
|
|
45
50
|
* 帧数据监听
|
|
46
51
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSBridgeProtocol } from '@realsee/jsbridge-x';
|
|
2
2
|
import { RTCProtocol } from '../rtc/protocol';
|
|
3
|
-
import { RTCType } from '../rtc/type';
|
|
3
|
+
import { BuiltInRTCType, RTCType } from '../rtc/type';
|
|
4
4
|
import { GetVoiceSign } from './GetVoiceSign';
|
|
5
5
|
/**
|
|
6
6
|
* 依赖配置。
|
|
@@ -34,6 +34,19 @@ export interface LiveOptions {
|
|
|
34
34
|
* 使用内置rtc时提供给rtc实例使用
|
|
35
35
|
*/
|
|
36
36
|
getVoiceSign?: GetVoiceSign;
|
|
37
|
+
/**
|
|
38
|
+
* 使用内置的rtc实例
|
|
39
|
+
*/
|
|
40
|
+
useBuiltInRTC?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 内置的rtc通道类型
|
|
43
|
+
* trtc or chime , default trtc
|
|
44
|
+
*/
|
|
45
|
+
builtInRTCType?: BuiltInRTCType;
|
|
46
|
+
/**
|
|
47
|
+
* 使用内置的jsBridge实例
|
|
48
|
+
*/
|
|
49
|
+
useBuiltInJsBridge?: boolean;
|
|
37
50
|
/**
|
|
38
51
|
* 初始化自动连接,false 需手动执行 live.connect() 方法
|
|
39
52
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSBridgeProtocol } from '@realsee/jsbridge-x';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { KeyframeTypes, LiveEventType, WebSocketEventType } from '../live/EventType';
|
|
3
4
|
import { Live, LiveActionReactCallback } from '../live/Live';
|
|
@@ -25,6 +26,7 @@ export declare type LiveProviderPropTypes<Snapshot> = {
|
|
|
25
26
|
*/
|
|
26
27
|
export interface LiveReact</* 帧数据 */ Snapshot> {
|
|
27
28
|
live: Live<Snapshot>;
|
|
29
|
+
jsBridge: JSBridgeProtocol;
|
|
28
30
|
/**
|
|
29
31
|
* @description **LiveProvider** 基于 [React Context](https://reactjs.org/docs/context.html) 对 {@link Live }进行封装,你可以以 [React Hooks](https://reactjs.org/docs/hooks-intro.html) 的方式对 {@link Live } 实例进行操作、数据监听等。
|
|
30
32
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realsee/live",
|
|
3
|
-
"version": "0.4.0-
|
|
3
|
+
"version": "0.4.0-beta.1",
|
|
4
4
|
"description": "如视 Live SDK:基于如视 WebSocket 长链双工通信能力的前端封装,借助此 SDK 您可以快捷地实现具备同屏连线、实时语音的 VR 带看业务能力。",
|
|
5
5
|
"main": "dist/realsee-live.cjs.js",
|
|
6
6
|
"module": "dist/realsee-live.esm.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"amazon-chime-sdk-js": "^2.26.1",
|
|
21
21
|
"trtc-js-sdk": "^4.12.5",
|
|
22
22
|
"react": "^17.0.2",
|
|
23
|
-
"@realsee/jsbridge-x": "0.2.1-alpha.
|
|
23
|
+
"@realsee/jsbridge-x": "0.2.1-alpha.2"
|
|
24
24
|
},
|
|
25
25
|
"author": "BEIKE REALSEE TECHNOLOGY (HK) LIMITED",
|
|
26
26
|
"license": "SEE LICENSE IN TERMS.txt",
|