@xylink/xy-rtc-sdk 2.0.9 → 2.0.10-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.
@@ -4,7 +4,7 @@
4
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
5
5
  * @date 2019-10-24 14:06:05
6
6
  */
7
- export declare const version = "2.0.9 - build on 2023-06-21 14:30";
7
+ export declare const version = "2.0.10-beta.1 - build on 2023-11-21 11:12";
8
8
  export declare const proxy: {
9
9
  wssHost: string;
10
10
  restHost: string;
@@ -44,12 +44,12 @@ declare class HttpClient {
44
44
  setHeader(params: ISignParams): any;
45
45
  setLoginInfo(loginInfo: IToken | null): void;
46
46
  getLoginInfo(): any;
47
- assignOptions: (option?: AxiosRequestConfig | undefined) => AxiosRequestConfig & {
47
+ assignOptions: (option?: AxiosRequestConfig) => AxiosRequestConfig & {
48
48
  params: any;
49
49
  };
50
- get: (url: string, option?: IAxiosRequestConfig | undefined) => any;
51
- put: (url: string, data?: any, option?: AxiosRequestConfig | undefined) => any;
52
- post: (url: string, data?: any, option?: AxiosRequestConfig | undefined) => any;
53
- delete: (url: string, option?: AxiosRequestConfig | undefined) => any;
50
+ get: (url: string, option?: IAxiosRequestConfig) => any;
51
+ put: (url: string, data?: any, option?: AxiosRequestConfig) => any;
52
+ post: (url: string, data?: any, option?: AxiosRequestConfig) => any;
53
+ delete: (url: string, option?: AxiosRequestConfig) => any;
54
54
  }
55
55
  export default HttpClient;
@@ -11,7 +11,7 @@
11
11
  * @value ERROR 所有错误信息
12
12
  * @value NONE 不打印任何信息
13
13
  */
14
- declare type TypeLogLevel = 'INFO' | 'DEBUG' | 'WARNING' | 'ERROR' | 'NONE';
14
+ type TypeLogLevel = 'INFO' | 'DEBUG' | 'WARNING' | 'ERROR' | 'NONE';
15
15
  interface ILogLevel {
16
16
  INFO: 'INFO';
17
17
  DEBUG: 'DEBUG';
@@ -14,7 +14,7 @@ export interface IStatus {
14
14
  * 国际化,目前只支持 英文、中文、繁体
15
15
  *
16
16
  */
17
- export declare type TLocale = 'en_US' | 'zh_CN' | 'zh_TW';
17
+ export type TLocale = 'en_US' | 'zh_CN' | 'zh_TW';
18
18
  /**
19
19
  * 是否支持入会
20
20
  */
@@ -6,14 +6,14 @@ import { IToken } from './base';
6
6
  * @value All 所有音视频数据
7
7
  * @value CONTENT 分享内容视频数据
8
8
  */
9
- export declare type IPushType = 'ALL' | 'CONTENT';
9
+ export type IPushType = 'ALL' | 'CONTENT';
10
10
  /**
11
11
  * 画面布局模式
12
12
  *
13
13
  * @value AUTO 自动布局,按照宫格/演讲者布局模式返回画面数据
14
14
  * @value CUSTOM 自定义布局,第三方自由控制人员数量,分辨率,大小,位置
15
15
  */
16
- export declare type IClientLayout = 'AUTO' | 'CUSTOM' | 'auto' | 'custom';
16
+ export type IClientLayout = 'AUTO' | 'CUSTOM' | 'auto' | 'custom';
17
17
  /**
18
18
  * 分享Content内容的状态
19
19
  *
@@ -21,7 +21,7 @@ export declare type IClientLayout = 'AUTO' | 'CUSTOM' | 'auto' | 'custom';
21
21
  * @value STARTING 分享中
22
22
  * @value PENDING 等待
23
23
  */
24
- export declare type ISahreContentStatus = 'ENDED' | 'STARTING' | 'PENDING';
24
+ export type ISahreContentStatus = 'ENDED' | 'STARTING' | 'PENDING';
25
25
  /**
26
26
  * VIDEO事件回调状态状态
27
27
  *
@@ -29,7 +29,7 @@ export declare type ISahreContentStatus = 'ENDED' | 'STARTING' | 'PENDING';
29
29
  * @value CANPLAY 可以播放
30
30
  * @value ERROR 遇到错误
31
31
  */
32
- export declare type IVideoLoadStatus = 'LOAD_START' | 'CANPLAY' | 'ERROR';
32
+ export type IVideoLoadStatus = 'LOAD_START' | 'CANPLAY' | 'ERROR';
33
33
  /**
34
34
  * 视频画面状态
35
35
  *
@@ -37,14 +37,14 @@ export declare type IVideoLoadStatus = 'LOAD_START' | 'CANPLAY' | 'ERROR';
37
37
  * @value ENDED 已结束
38
38
  * @value REQUEST 视频请求中
39
39
  */
40
- export declare type IVideoManagerState = '' | 'CANPLAY' | 'ENDED' | 'REQUEST';
40
+ export type IVideoManagerState = '' | 'CANPLAY' | 'ENDED' | 'REQUEST';
41
41
  /**
42
42
  * Layout布局方式
43
43
  *
44
44
  * @value SPEAKER 默认值,演讲者模式,即 1大N小 画面模式
45
45
  * @value GALLERY 另一种是画廊模式,即 宫格布局
46
46
  */
47
- export declare type ITemplateMode = 'SPEAKER' | 'GALLERY';
47
+ export type ITemplateMode = 'SPEAKER' | 'GALLERY';
48
48
  /**
49
49
  * 主画面/Content布局模式
50
50
  *
@@ -54,11 +54,11 @@ export declare type ITemplateMode = 'SPEAKER' | 'GALLERY';
54
54
  * @value CONTENT_ONLY 只显示Content
55
55
  * @value TWO_PIC_SYMMETRIC 对称显示content和speker(side by side)
56
56
  */
57
- export declare type IContentTemplateMode = 'MULTI_PIC_CONTENT_HIGH_PRIORITY' | 'MULTI_PIC_ACTIVE_HIGH_PRIORITY' | 'TWO_PIC_PIP' | 'CONTENT_ONLY' | 'TWO_PIC_SYMMETRIC';
57
+ export type IContentTemplateMode = 'MULTI_PIC_CONTENT_HIGH_PRIORITY' | 'MULTI_PIC_ACTIVE_HIGH_PRIORITY' | 'TWO_PIC_PIP' | 'CONTENT_ONLY' | 'TWO_PIC_SYMMETRIC';
58
58
  /**
59
59
  * 布局模式
60
60
  */
61
- export declare type IMode = ITemplateMode | IContentTemplateMode;
61
+ export type IMode = ITemplateMode | IContentTemplateMode;
62
62
  /**
63
63
  * 客户端状态
64
64
  *
@@ -67,21 +67,21 @@ export declare type IMode = ITemplateMode | IContentTemplateMode;
67
67
  * @value WS_CLOSE wss链接关闭
68
68
  * @value WS_ERROR wss链接错误
69
69
  */
70
- export declare type IClientErrorState = 'NONE' | 'PUBLISH_ERROR' | 'WS_CLOSE' | 'WS_ERROR';
70
+ export type IClientErrorState = 'NONE' | 'PUBLISH_ERROR' | 'WS_CLOSE' | 'WS_ERROR';
71
71
  /**
72
72
  * 视频状态
73
73
  *
74
74
  * @value muteVideo 关闭摄像头
75
75
  * @value unmuteVideo:开启摄像头
76
76
  */
77
- export declare type IVideoType = 'muteVideo' | 'unmuteVideo';
77
+ export type IVideoType = 'muteVideo' | 'unmuteVideo';
78
78
  /**
79
79
  * 音频状态
80
80
  *
81
81
  * @valule muteAudio 关闭麦克风
82
82
  * @valule unmuteAudio 开启麦克风
83
83
  */
84
- export declare type IAudioType = 'muteAudio' | 'unmuteAudio';
84
+ export type IAudioType = 'muteAudio' | 'unmuteAudio';
85
85
  /**
86
86
  * 视频/音频状态
87
87
  *
@@ -90,15 +90,15 @@ export declare type IAudioType = 'muteAudio' | 'unmuteAudio';
90
90
  * @value muteVideo 关闭摄像头
91
91
  * @value unmuteVideo:开启摄像头
92
92
  */
93
- export declare type IVideoAudioType = 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo';
93
+ export type IVideoAudioType = 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo';
94
94
  /**
95
95
  * 画面内容类型
96
96
  *
97
97
  * @value 0 People画面
98
98
  * @value 1 Content共享内容
99
99
  */
100
- export declare type IMediagroupid = 0 | 1;
101
- export declare type IVideoAudioMessageType = 'AUDIO_MUTE' | 'VIDEO_MUTE' | 'AUDIO_UN_MUTE' | 'VIDEO_UN_MUTE';
100
+ export type IMediagroupid = 0 | 1;
101
+ export type IVideoAudioMessageType = 'AUDIO_MUTE' | 'VIDEO_MUTE' | 'AUDIO_UN_MUTE' | 'VIDEO_UN_MUTE';
102
102
  /**
103
103
  * 布局画面状态
104
104
  *
@@ -110,7 +110,7 @@ export declare type IVideoAudioMessageType = 'AUDIO_MUTE' | 'VIDEO_MUTE' | 'AUDI
110
110
  * @value AUDIO_ONLY 仅音频入会模式
111
111
  * @value AUDIO_CONTENT 仅音频共享
112
112
  */
113
- export declare type ILayoutState = 'MUTE' | 'REQUEST' | 'NORMAL' | 'INVALID' | 'AUDIO_TEL' | 'AUDIO_ONLY' | 'AUDIO_CONTENT';
113
+ export type ILayoutState = 'MUTE' | 'REQUEST' | 'NORMAL' | 'INVALID' | 'AUDIO_TEL' | 'AUDIO_ONLY' | 'AUDIO_CONTENT';
114
114
  /**
115
115
  * 分享content类型
116
116
  *
@@ -119,7 +119,7 @@ export declare type ILayoutState = 'MUTE' | 'REQUEST' | 'NORMAL' | 'INVALID' | '
119
119
  * @value VIDEO 只分享video
120
120
  * @value BOTH 分享video + audio
121
121
  */
122
- export declare type IContentMode = 'NONE' | 'AUDIO' | 'VIDEO' | 'BOTH';
122
+ export type IContentMode = 'NONE' | 'AUDIO' | 'VIDEO' | 'BOTH';
123
123
  /**
124
124
  * 埋点数据上报类型
125
125
  *
@@ -128,15 +128,15 @@ export declare type IContentMode = 'NONE' | 'AUDIO' | 'VIDEO' | 'BOTH';
128
128
  * @value server server消息
129
129
  * @value trigger 触发事件类型
130
130
  */
131
- export declare type TStateAction = 'click' | 'msgCallback' | 'server' | 'trigger';
131
+ export type TStateAction = 'click' | 'msgCallback' | 'server' | 'trigger';
132
132
  /**
133
133
  * 埋点数据上报
134
134
  */
135
- export declare type TCategory = 'sta-confStatus' | 'oper-confOperation' | 'sta-msgCallback' | 'oper-setting';
135
+ export type TCategory = 'sta-confStatus' | 'oper-confOperation' | 'sta-msgCallback' | 'oper-setting';
136
136
  /**
137
137
  * 事件名称
138
138
  */
139
- export declare type TEventName = 'callIn' | 'layout' | 'content' | 'audioMute' | 'audioUnmute' | 'videoMute' | 'videoUnmute' | 'udioUnmute' | 'audioMute' | 'subtitle' | string;
139
+ export type TEventName = 'callIn' | 'layout' | 'content' | 'audioMute' | 'audioUnmute' | 'videoMute' | 'videoUnmute' | 'udioUnmute' | 'audioMute' | 'subtitle' | string;
140
140
  /**
141
141
  * 轮询多画面状态
142
142
  *
@@ -145,11 +145,11 @@ export declare type TEventName = 'callIn' | 'layout' | 'content' | 'audioMute' |
145
145
  * @value 2 暂停
146
146
  * @value 3 恢复
147
147
  */
148
- export declare type TCommand = 0 | 1 | 2 | 3;
148
+ export type TCommand = 0 | 1 | 2 | 3;
149
149
  /**
150
150
  * 设备类型
151
151
  */
152
- declare type IDeviceType = 'webrtc' | 'soft' | 'hard' | 'nemono' | 'virtualnemo' | 'nemo' | 'tvbox' | 'h323' | 'record' | 'bruce' | 'tel' | 'pstngw' | 'desk';
152
+ type IDeviceType = 'webrtc' | 'soft' | 'hard' | 'nemono' | 'virtualnemo' | 'nemo' | 'tvbox' | 'h323' | 'record' | 'bruce' | 'tel' | 'pstngw' | 'desk';
153
153
  /**
154
154
  * 请求画面分辨率
155
155
  *
@@ -159,7 +159,7 @@ declare type IDeviceType = 'webrtc' | 'soft' | 'hard' | 'nemono' | 'virtualnemo'
159
159
  * @value 3 720P
160
160
  * @value 4 1080P
161
161
  */
162
- export declare type IResolutionType = 0 | 1 | 2 | 3 | 4 | 5;
162
+ export type IResolutionType = 0 | 1 | 2 | 3 | 4 | 5;
163
163
  /**
164
164
  * 请求画面质量
165
165
  *
@@ -167,7 +167,7 @@ export declare type IResolutionType = 0 | 1 | 2 | 3 | 4 | 5;
167
167
  * @value 1 200
168
168
  * @value 3 300
169
169
  */
170
- export declare type IQualityType = 0 | 1 | 2;
170
+ export type IQualityType = 0 | 1 | 2;
171
171
  /**
172
172
  * client配置参数
173
173
  *
@@ -213,6 +213,7 @@ export interface IClientConfig {
213
213
  __monitorMode?: string;
214
214
  isThird?: boolean;
215
215
  isSupportHybridCloud?: boolean;
216
+ checkSSL?: boolean;
216
217
  }
217
218
  export interface ILayoutParams {
218
219
  rosters: IRoster[];
@@ -223,7 +224,7 @@ export interface ILayoutParams {
223
224
  contentSenderPid: number;
224
225
  localHide: boolean;
225
226
  }
226
- export declare type ITemplateObj = {
227
+ export type ITemplateObj = {
227
228
  position: number[];
228
229
  resolution: IResolutionType;
229
230
  zIndex?: number;
@@ -338,7 +339,7 @@ export interface IMUTE_MAP {
338
339
  * @property { boolean } isContent 是否是共享内容,NewLayout版本无此参数,使用mediagroupid配置参数;
339
340
  * @property { string } callUri NewLayout版本无此参数
340
341
  */
341
- export declare type IReqInfo = {
342
+ export type IReqInfo = {
342
343
  calluri: string;
343
344
  resolution: IResolutionType;
344
345
  quality: IQualityType;
@@ -896,12 +897,12 @@ export interface ISubTitleContent {
896
897
  content: string;
897
898
  backgroundRGB?: string;
898
899
  }
899
- export declare type IAudioRenders = {
900
+ export type IAudioRenders = {
900
901
  [key: string]: {
901
902
  ele: any;
902
903
  };
903
904
  };
904
- export declare type IVideoRenders = {
905
+ export type IVideoRenders = {
905
906
  [key: string]: VideoManager & {
906
907
  match?: boolean;
907
908
  };
@@ -7,7 +7,7 @@
7
7
  * @value unknow 未知
8
8
  * @value '' 默认
9
9
  */
10
- export declare type TPermissionType = 'granted' | 'denied' | 'prompt' | 'unknow' | 'failed' | '';
10
+ export type TPermissionType = 'granted' | 'denied' | 'prompt' | 'unknow' | 'failed' | '';
11
11
  /**
12
12
  * 获取设备信息
13
13
  *
@@ -23,7 +23,7 @@ export declare type TPermissionType = 'granted' | 'denied' | 'prompt' | 'unknow'
23
23
  * @value videoinput 摄像头输入
24
24
  * @property { string } type 设备采集流类型:video/audio
25
25
  */
26
- export declare type IDeviceInfo = {
26
+ export type IDeviceInfo = {
27
27
  deviceId: string;
28
28
  label: string;
29
29
  groupId?: string;
@@ -38,7 +38,7 @@ export declare type IDeviceInfo = {
38
38
  * @property { IDeviceInfo[] } audioOutputList 扬声器列表
39
39
  * @property { IDeviceInfo[] } videoInList 摄像头列表
40
40
  */
41
- export declare type IDeviceList = {
41
+ export type IDeviceList = {
42
42
  audioInputList: IDeviceInfo[];
43
43
  audioOutputList: IDeviceInfo[];
44
44
  videoInList: IDeviceInfo[];
@@ -50,7 +50,7 @@ export declare type IDeviceList = {
50
50
  * @property { IDeviceInfo | undefined } audioOutput 扬声器设备
51
51
  * @property { IDeviceInfo | undefined } videoInput 摄像头设备
52
52
  */
53
- export declare type ISelectedDevice = {
53
+ export type ISelectedDevice = {
54
54
  audioInput: IDeviceInfo | undefined;
55
55
  videoInput: IDeviceInfo | undefined;
56
56
  audioOutput: IDeviceInfo | undefined;
@@ -61,7 +61,7 @@ export declare type ISelectedDevice = {
61
61
  * @property { ISelectedDevice } nextDevice 最新的设备
62
62
  * @property { IDeviceList } detail 最新设备详细信息
63
63
  */
64
- export declare type IDeviceManagerChangeValue = {
64
+ export type IDeviceManagerChangeValue = {
65
65
  nextDevice: ISelectedDevice;
66
66
  detail: IDeviceList;
67
67
  };
@@ -6,13 +6,13 @@ import { IStatus } from './base';
6
6
  * @value MUTE 流正在请求中
7
7
  * @value ENDED 流已关闭
8
8
  */
9
- export declare type IStreamTrackStatus = 'ENABLED' | 'MUTE' | 'ENDED';
9
+ export type IStreamTrackStatus = 'ENABLED' | 'MUTE' | 'ENDED';
10
10
  /**
11
11
  * 自定义流类型
12
12
  *
13
13
  * @property { 'video' | 'audio' } kind 流类型,分video和audio
14
14
  */
15
- export declare type TCustomStream = {
15
+ export type TCustomStream = {
16
16
  kind: 'video' | 'audio';
17
17
  };
18
18
  /**
@@ -22,7 +22,7 @@ export declare type TCustomStream = {
22
22
  * @value DOMSTRING 创建协商通道流
23
23
  * @value INVALID 失效
24
24
  */
25
- export declare type IStreamStatus = 'NORMAL' | 'DOMSTRING' | 'INVALID';
25
+ export type IStreamStatus = 'NORMAL' | 'DOMSTRING' | 'INVALID';
26
26
  /**
27
27
  * 自定义采集流时产生的状态
28
28
  *
@@ -32,7 +32,7 @@ export declare type IStreamStatus = 'NORMAL' | 'DOMSTRING' | 'INVALID';
32
32
  * @value VIDEO_ONLY 仅采集摄像头流,麦克风转仅接收模式
33
33
  * @value FAILED 其他异常,无法入会
34
34
  */
35
- export declare type IStreamCurrentType = 'NORMAL' | 'SEND_ONLY' | 'AUDIO_ONLY' | 'VIDEO_ONLY' | 'FAILED';
35
+ export type IStreamCurrentType = 'NORMAL' | 'SEND_ONLY' | 'AUDIO_ONLY' | 'VIDEO_ONLY' | 'FAILED';
36
36
  /**
37
37
  * 自定义流类型
38
38
  *
@@ -41,14 +41,14 @@ export declare type IStreamCurrentType = 'NORMAL' | 'SEND_ONLY' | 'AUDIO_ONLY' |
41
41
  * @value pipelineStream 建立通道流
42
42
  * @value remoteStream 仅接收远端画面流
43
43
  */
44
- export declare type IStreamObjType = 'contentStream' | 'previewStream' | 'pipelineStream' | 'remoteStream';
44
+ export type IStreamObjType = 'contentStream' | 'previewStream' | 'pipelineStream' | 'remoteStream';
45
45
  /**
46
46
  * 请流时,控制流的帧率
47
47
  *
48
48
  * @value 100 低帧率
49
49
  * @value 200 高帧率
50
50
  */
51
- export declare type IMediaQualityType = 0 | 100 | 200;
51
+ export type IMediaQualityType = 0 | 100 | 200;
52
52
  /**
53
53
  * 自定义流数据
54
54
  *
@@ -143,7 +143,7 @@ export interface ISource {
143
143
  * @value { string } devices.videoInValue 视频输入
144
144
  * @value { string } devices.audioOutputValue 音频输出
145
145
  */
146
- export declare type IStreamInitConfog = {
146
+ export type IStreamInitConfog = {
147
147
  devices: {
148
148
  audioInputValue?: string;
149
149
  videoInValue?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylink/xy-rtc-sdk",
3
- "version": "2.0.9",
3
+ "version": "2.0.10-beta.1",
4
4
  "description": "XYRTC SDK(小鱼易连web音视频 sdk)",
5
5
  "keywords": [
6
6
  "webrtc",
@@ -84,8 +84,7 @@
84
84
  "vconsole": "^3.3.4",
85
85
  "vite": "^2.1.5",
86
86
  "vite-plugin-imp": "^2.0.7",
87
- "vite-plugin-importer": "^0.2.1",
88
- "xytools": "1.5.2-beta.4"
87
+ "vite-plugin-importer": "^0.2.1"
89
88
  },
90
89
  "dependencies": {
91
90
  "crypto-browserify": "^3.12.0",