@dcloudio/uni-app-x 0.7.60 → 0.7.61
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/package.json +2 -2
- package/types/app.d.ts +14 -7
- package/types/native/IUniElement.d.ts +1 -1
- package/types/native/UniCustomElement.d.ts +2 -2
- package/types/native/UniInputChangeEvent.d.ts +31 -0
- package/types/native/UniPage.d.ts +10 -2
- package/types/native/global.d.ts +12 -0
- package/types/native/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/global.d.ts +1 -0
- package/types/uni/uts-plugin-api/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/interface.d.ts +77 -433
- package/types/uni/uts-plugin-api/lib/uni-chooseLocation/utssdk/interface.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/global.d.ts +16 -0
- package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/index.d.ts +8 -0
- package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +561 -131
- package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +17 -34
- package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +4 -8
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +1 -2
- package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +5 -0
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +8 -4
- package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +3 -1
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +29 -58
- package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +36 -72
- package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +3 -1
- package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +9 -7
- package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +8 -7
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +4 -4
- package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +84 -0
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +47 -0
- package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-location/utssdk/global.d.ts +38 -0
- package/types/uni/uts-plugin-api/lib/uni-location/utssdk/index.d.ts +19 -0
- package/types/uni/uts-plugin-api/lib/uni-location/utssdk/interface.d.ts +1783 -107
- package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +13 -18
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +68 -208
- package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/interface.d.ts +2 -4
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +105 -107
- package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +359 -66
- package/types/uni/uts-plugin-api/lib/uni-oauth-weixin/utssdk/global.d.ts +16 -0
- package/types/uni/uts-plugin-api/lib/uni-oauth-weixin/utssdk/index.d.ts +8 -0
- package/types/uni/uts-plugin-api/lib/uni-oauth-weixin/utssdk/interface.d.ts +40 -0
- package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +10 -15
- package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +86 -94
- package/types/uni/uts-plugin-api/lib/uni-privacy/utssdk/interface.d.ts +25 -26
- package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +30 -60
- package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/interface.d.ts +32 -64
- package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +298 -4
- package/types/uni/uts-plugin-api/lib/uni-share/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-share/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-share/utssdk/interface.d.ts +347 -10
- package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/interface.d.ts +3 -1
- package/types/uni/uts-plugin-api/lib/uni-shareWithSystem/utssdk/interface.d.ts +3 -1
- package/types/uni/uts-plugin-api/lib/uni-sse/utssdk/interface.d.ts +25 -33
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +0 -2
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +0 -1
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +21 -33
- package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +23 -46
- package/types/uni/uts-plugin-biz/global.d.ts +11 -0
- package/types/uni/uts-plugin-biz/index.d.ts +11 -0
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +60 -3
- package/types/uni/uts-plugin-biz/lib/uni-facialVerify/utssdk/interface.d.ts +6 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/global.d.ts +52 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/index.d.ts +25 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/interface.d.ts +445 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/global.d.ts +48 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/index.d.ts +23 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/interface.d.ts +138 -0
- package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +28 -12
- package/types/uni/uts-plugin-biz/lib/uni-push-fcm/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-fcm/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-fcm/utssdk/interface.d.ts +0 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-gp/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-gp/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-gp/utssdk/interface.d.ts +0 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-hms/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-hms/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-hms/utssdk/interface.d.ts +0 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-honor/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-honor/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-honor/utssdk/interface.d.ts +0 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-mainland/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-mainland/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-mainland/utssdk/interface.d.ts +0 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-meizu/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-meizu/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-meizu/utssdk/interface.d.ts +0 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-oppo/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-oppo/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-oppo/utssdk/interface.d.ts +0 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-vivo/utssdk/global.d.ts +18 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-vivo/utssdk/index.d.ts +9 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-vivo/utssdk/interface.d.ts +45 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-xiaomi/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-xiaomi/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-push-xiaomi/utssdk/interface.d.ts +0 -0
- package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +7 -2
- package/types/uni/uts-plugin-component/lib/uni-canvas/utssdk/interface.d.ts +37 -44
- package/types/uni/uts-plugin-extend/global.d.ts +0 -2
- package/types/uni/uts-plugin-extend/index.d.ts +0 -2
- package/types/vue/LifeCycle.d.ts +723 -1
- package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/global.d.ts +0 -14
- package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/index.d.ts +0 -1
- package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +0 -1670
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
import { LivePlayerErrorCode } from './unierror.uts'
|
|
2
|
+
|
|
3
|
+
export type StreamingContextListener = {
|
|
4
|
+
play: () => void
|
|
5
|
+
pause: () => void
|
|
6
|
+
replay: () => void
|
|
7
|
+
requestFullScreen: (callback?: LivePlayerOptions) => void
|
|
8
|
+
exitFullScreen: (callback?: LivePlayerOptions) => void
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type StreamingBufferingListener = {
|
|
12
|
+
onBufferingStart : () => void
|
|
13
|
+
onBufferingEnd : () => void
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type StreamingMuteChangedListener = (isMute : boolean) => void
|
|
17
|
+
|
|
18
|
+
export type StreamingProgressListener = (progress : number, duration : number) => void
|
|
19
|
+
|
|
20
|
+
export type LivePlayerStreamingStateListener = (info : UniLivePlayerStatechangeEvent) => void
|
|
21
|
+
|
|
22
|
+
export type LivePlayerStreamingErrorListener = (info : UniLivePlayerErrorEvent) => void
|
|
23
|
+
|
|
24
|
+
export type StreamingFullScreenChangedListener = (info: UniLivePlayerFullscreenchangeEvent) => void
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// 对外暴露接口 ------------------------------------------------
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 通用事件
|
|
31
|
+
*/
|
|
32
|
+
interface LivePlayerEvent {
|
|
33
|
+
bubbles : boolean
|
|
34
|
+
cancelable : boolean
|
|
35
|
+
type : string
|
|
36
|
+
target ?: UniElement | null
|
|
37
|
+
currentTarget ?: UniElement | null
|
|
38
|
+
// #ifdef APP-ANDROID
|
|
39
|
+
timeStamp : Long
|
|
40
|
+
// #endif
|
|
41
|
+
// #ifdef APP-IOS
|
|
42
|
+
timeStamp : number
|
|
43
|
+
// #endif
|
|
44
|
+
stopPropagation() : void
|
|
45
|
+
preventDefault() : void
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 播放状态变化事件
|
|
50
|
+
*/
|
|
51
|
+
export interface UniLivePlayerStatechangeEvent extends LivePlayerEvent {
|
|
52
|
+
detail : UniLivePlayerStatechangeEventDetail
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type UniLivePlayerStatechangeEventDetail = {
|
|
56
|
+
code : number
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 全屏事件
|
|
61
|
+
*/
|
|
62
|
+
export interface UniLivePlayerFullscreenchangeEvent extends LivePlayerEvent {
|
|
63
|
+
detail: UniLivePlayerFullscreenchangeEventDetail
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type UniLivePlayerFullscreenchangeEventDetail = {
|
|
67
|
+
direction : string
|
|
68
|
+
fullScreen: boolean
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 错误事件
|
|
73
|
+
*/
|
|
74
|
+
export interface UniLivePlayerErrorEvent extends LivePlayerEvent {
|
|
75
|
+
detail : UniLivePlayerError
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type UniLivePlayerError = {
|
|
79
|
+
errCode : LivePlayerErrorCode
|
|
80
|
+
errMsg : string
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type LivePlayerSuccess = UTSJSONObject;
|
|
84
|
+
export type LivePlayerSuccessCallback = (res : LivePlayerSuccess) => void;
|
|
85
|
+
export type LivePlayerFail = UTSJSONObject;
|
|
86
|
+
export type LivePlayerFailCallback = (res : LivePlayerFail) => void;
|
|
87
|
+
export type LivePlayerComplete = any;
|
|
88
|
+
export type LivePlayerCompleteCallback = (res : LivePlayerComplete) => void;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 方法调用参数
|
|
92
|
+
*/
|
|
93
|
+
export type LivePlayerOptions = {
|
|
94
|
+
success?: LivePlayerSuccessCallback | null,
|
|
95
|
+
fail?: LivePlayerFailCallback | null,
|
|
96
|
+
complete?: LivePlayerCompleteCallback | null
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface LivePlayerContext {
|
|
100
|
+
/**
|
|
101
|
+
* 播放
|
|
102
|
+
* @uniPlatform {
|
|
103
|
+
* "mp": {
|
|
104
|
+
* "weixin": {
|
|
105
|
+
* "hostVer": "√",
|
|
106
|
+
* "uniVer": "√",
|
|
107
|
+
* "unixVer": "4.41"
|
|
108
|
+
* },
|
|
109
|
+
* "alipay": {
|
|
110
|
+
* "hostVer": "-",
|
|
111
|
+
* "uniVer": "-",
|
|
112
|
+
* "unixVer": "-"
|
|
113
|
+
* },
|
|
114
|
+
* "baidu": {
|
|
115
|
+
* "hostVer": "-",
|
|
116
|
+
* "uniVer": "-",
|
|
117
|
+
* "unixVer": "-"
|
|
118
|
+
* },
|
|
119
|
+
* "toutiao": {
|
|
120
|
+
* "hostVer": "-",
|
|
121
|
+
* "uniVer": "-",
|
|
122
|
+
* "unixVer": "-"
|
|
123
|
+
* },
|
|
124
|
+
* "lark": {
|
|
125
|
+
* "hostVer": "-",
|
|
126
|
+
* "uniVer": "-",
|
|
127
|
+
* "unixVer": "-"
|
|
128
|
+
* },
|
|
129
|
+
* "qq": {
|
|
130
|
+
* "hostVer": "-",
|
|
131
|
+
* "uniVer": "-",
|
|
132
|
+
* "unixVer": "-"
|
|
133
|
+
* },
|
|
134
|
+
* "kuaishou": {
|
|
135
|
+
* "hostVer": "-",
|
|
136
|
+
* "uniVer": "-",
|
|
137
|
+
* "unixVer": "-"
|
|
138
|
+
* },
|
|
139
|
+
* "jd": {
|
|
140
|
+
* "hostVer": "-",
|
|
141
|
+
* "uniVer": "-",
|
|
142
|
+
* "unixVer": "-"
|
|
143
|
+
* }
|
|
144
|
+
* }
|
|
145
|
+
* }
|
|
146
|
+
*/
|
|
147
|
+
play(options?: LivePlayerOptions) : void
|
|
148
|
+
/**
|
|
149
|
+
* 暂停
|
|
150
|
+
* @uniPlatform {
|
|
151
|
+
* "mp": {
|
|
152
|
+
* "weixin": {
|
|
153
|
+
* "hostVer": "√",
|
|
154
|
+
* "uniVer": "√",
|
|
155
|
+
* "unixVer": "4.41"
|
|
156
|
+
* },
|
|
157
|
+
* "alipay": {
|
|
158
|
+
* "hostVer": "-",
|
|
159
|
+
* "uniVer": "-",
|
|
160
|
+
* "unixVer": "-"
|
|
161
|
+
* },
|
|
162
|
+
* "baidu": {
|
|
163
|
+
* "hostVer": "-",
|
|
164
|
+
* "uniVer": "-",
|
|
165
|
+
* "unixVer": "-"
|
|
166
|
+
* },
|
|
167
|
+
* "toutiao": {
|
|
168
|
+
* "hostVer": "-",
|
|
169
|
+
* "uniVer": "-",
|
|
170
|
+
* "unixVer": "-"
|
|
171
|
+
* },
|
|
172
|
+
* "lark": {
|
|
173
|
+
* "hostVer": "-",
|
|
174
|
+
* "uniVer": "-",
|
|
175
|
+
* "unixVer": "-"
|
|
176
|
+
* },
|
|
177
|
+
* "qq": {
|
|
178
|
+
* "hostVer": "-",
|
|
179
|
+
* "uniVer": "-",
|
|
180
|
+
* "unixVer": "-"
|
|
181
|
+
* },
|
|
182
|
+
* "kuaishou": {
|
|
183
|
+
* "hostVer": "-",
|
|
184
|
+
* "uniVer": "-",
|
|
185
|
+
* "unixVer": "-"
|
|
186
|
+
* },
|
|
187
|
+
* "jd": {
|
|
188
|
+
* "hostVer": "-",
|
|
189
|
+
* "uniVer": "-",
|
|
190
|
+
* "unixVer": "-"
|
|
191
|
+
* }
|
|
192
|
+
* }
|
|
193
|
+
* }
|
|
194
|
+
*/
|
|
195
|
+
pause(options?: LivePlayerOptions) : void
|
|
196
|
+
/**
|
|
197
|
+
* 停止
|
|
198
|
+
* @uniPlatform {
|
|
199
|
+
* "mp": {
|
|
200
|
+
* "weixin": {
|
|
201
|
+
* "hostVer": "√",
|
|
202
|
+
* "uniVer": "√",
|
|
203
|
+
* "unixVer": "4.41"
|
|
204
|
+
* },
|
|
205
|
+
* "alipay": {
|
|
206
|
+
* "hostVer": "-",
|
|
207
|
+
* "uniVer": "-",
|
|
208
|
+
* "unixVer": "-"
|
|
209
|
+
* },
|
|
210
|
+
* "baidu": {
|
|
211
|
+
* "hostVer": "-",
|
|
212
|
+
* "uniVer": "-",
|
|
213
|
+
* "unixVer": "-"
|
|
214
|
+
* },
|
|
215
|
+
* "toutiao": {
|
|
216
|
+
* "hostVer": "-",
|
|
217
|
+
* "uniVer": "-",
|
|
218
|
+
* "unixVer": "-"
|
|
219
|
+
* },
|
|
220
|
+
* "lark": {
|
|
221
|
+
* "hostVer": "-",
|
|
222
|
+
* "uniVer": "-",
|
|
223
|
+
* "unixVer": "-"
|
|
224
|
+
* },
|
|
225
|
+
* "qq": {
|
|
226
|
+
* "hostVer": "-",
|
|
227
|
+
* "uniVer": "-",
|
|
228
|
+
* "unixVer": "-"
|
|
229
|
+
* },
|
|
230
|
+
* "kuaishou": {
|
|
231
|
+
* "hostVer": "-",
|
|
232
|
+
* "uniVer": "-",
|
|
233
|
+
* "unixVer": "-"
|
|
234
|
+
* },
|
|
235
|
+
* "jd": {
|
|
236
|
+
* "hostVer": "-",
|
|
237
|
+
* "uniVer": "-",
|
|
238
|
+
* "unixVer": "-"
|
|
239
|
+
* }
|
|
240
|
+
* }
|
|
241
|
+
* }
|
|
242
|
+
*/
|
|
243
|
+
stop(options?: LivePlayerOptions) : void
|
|
244
|
+
/**
|
|
245
|
+
* 恢复
|
|
246
|
+
* @uniPlatform {
|
|
247
|
+
* "mp": {
|
|
248
|
+
* "weixin": {
|
|
249
|
+
* "hostVer": "√",
|
|
250
|
+
* "uniVer": "√",
|
|
251
|
+
* "unixVer": "4.41"
|
|
252
|
+
* },
|
|
253
|
+
* "alipay": {
|
|
254
|
+
* "hostVer": "-",
|
|
255
|
+
* "uniVer": "-",
|
|
256
|
+
* "unixVer": "-"
|
|
257
|
+
* },
|
|
258
|
+
* "baidu": {
|
|
259
|
+
* "hostVer": "-",
|
|
260
|
+
* "uniVer": "-",
|
|
261
|
+
* "unixVer": "-"
|
|
262
|
+
* },
|
|
263
|
+
* "toutiao": {
|
|
264
|
+
* "hostVer": "-",
|
|
265
|
+
* "uniVer": "-",
|
|
266
|
+
* "unixVer": "-"
|
|
267
|
+
* },
|
|
268
|
+
* "lark": {
|
|
269
|
+
* "hostVer": "-",
|
|
270
|
+
* "uniVer": "-",
|
|
271
|
+
* "unixVer": "-"
|
|
272
|
+
* },
|
|
273
|
+
* "qq": {
|
|
274
|
+
* "hostVer": "-",
|
|
275
|
+
* "uniVer": "-",
|
|
276
|
+
* "unixVer": "-"
|
|
277
|
+
* },
|
|
278
|
+
* "kuaishou": {
|
|
279
|
+
* "hostVer": "-",
|
|
280
|
+
* "uniVer": "-",
|
|
281
|
+
* "unixVer": "-"
|
|
282
|
+
* },
|
|
283
|
+
* "jd": {
|
|
284
|
+
* "hostVer": "-",
|
|
285
|
+
* "uniVer": "-",
|
|
286
|
+
* "unixVer": "-"
|
|
287
|
+
* }
|
|
288
|
+
* }
|
|
289
|
+
* }
|
|
290
|
+
*/
|
|
291
|
+
resume(options?: LivePlayerOptions) : void
|
|
292
|
+
/**
|
|
293
|
+
* 静音
|
|
294
|
+
* @uniPlatform {
|
|
295
|
+
* "mp": {
|
|
296
|
+
* "weixin": {
|
|
297
|
+
* "hostVer": "√",
|
|
298
|
+
* "uniVer": "√",
|
|
299
|
+
* "unixVer": "4.41"
|
|
300
|
+
* },
|
|
301
|
+
* "alipay": {
|
|
302
|
+
* "hostVer": "-",
|
|
303
|
+
* "uniVer": "-",
|
|
304
|
+
* "unixVer": "-"
|
|
305
|
+
* },
|
|
306
|
+
* "baidu": {
|
|
307
|
+
* "hostVer": "-",
|
|
308
|
+
* "uniVer": "-",
|
|
309
|
+
* "unixVer": "-"
|
|
310
|
+
* },
|
|
311
|
+
* "toutiao": {
|
|
312
|
+
* "hostVer": "-",
|
|
313
|
+
* "uniVer": "-",
|
|
314
|
+
* "unixVer": "-"
|
|
315
|
+
* },
|
|
316
|
+
* "lark": {
|
|
317
|
+
* "hostVer": "-",
|
|
318
|
+
* "uniVer": "-",
|
|
319
|
+
* "unixVer": "-"
|
|
320
|
+
* },
|
|
321
|
+
* "qq": {
|
|
322
|
+
* "hostVer": "-",
|
|
323
|
+
* "uniVer": "-",
|
|
324
|
+
* "unixVer": "-"
|
|
325
|
+
* },
|
|
326
|
+
* "kuaishou": {
|
|
327
|
+
* "hostVer": "-",
|
|
328
|
+
* "uniVer": "-",
|
|
329
|
+
* "unixVer": "-"
|
|
330
|
+
* },
|
|
331
|
+
* "jd": {
|
|
332
|
+
* "hostVer": "-",
|
|
333
|
+
* "uniVer": "-",
|
|
334
|
+
* "unixVer": "-"
|
|
335
|
+
* }
|
|
336
|
+
* }
|
|
337
|
+
* }
|
|
338
|
+
*/
|
|
339
|
+
mute(options?: LivePlayerOptions): void
|
|
340
|
+
/**
|
|
341
|
+
* 全屏
|
|
342
|
+
* @uniPlatform {
|
|
343
|
+
* "mp": {
|
|
344
|
+
* "weixin": {
|
|
345
|
+
* "hostVer": "√",
|
|
346
|
+
* "uniVer": "√",
|
|
347
|
+
* "unixVer": "4.41"
|
|
348
|
+
* },
|
|
349
|
+
* "alipay": {
|
|
350
|
+
* "hostVer": "-",
|
|
351
|
+
* "uniVer": "-",
|
|
352
|
+
* "unixVer": "-"
|
|
353
|
+
* },
|
|
354
|
+
* "baidu": {
|
|
355
|
+
* "hostVer": "-",
|
|
356
|
+
* "uniVer": "-",
|
|
357
|
+
* "unixVer": "-"
|
|
358
|
+
* },
|
|
359
|
+
* "toutiao": {
|
|
360
|
+
* "hostVer": "-",
|
|
361
|
+
* "uniVer": "-",
|
|
362
|
+
* "unixVer": "-"
|
|
363
|
+
* },
|
|
364
|
+
* "lark": {
|
|
365
|
+
* "hostVer": "-",
|
|
366
|
+
* "uniVer": "-",
|
|
367
|
+
* "unixVer": "-"
|
|
368
|
+
* },
|
|
369
|
+
* "qq": {
|
|
370
|
+
* "hostVer": "-",
|
|
371
|
+
* "uniVer": "-",
|
|
372
|
+
* "unixVer": "-"
|
|
373
|
+
* },
|
|
374
|
+
* "kuaishou": {
|
|
375
|
+
* "hostVer": "-",
|
|
376
|
+
* "uniVer": "-",
|
|
377
|
+
* "unixVer": "-"
|
|
378
|
+
* },
|
|
379
|
+
* "jd": {
|
|
380
|
+
* "hostVer": "-",
|
|
381
|
+
* "uniVer": "-",
|
|
382
|
+
* "unixVer": "-"
|
|
383
|
+
* }
|
|
384
|
+
* }
|
|
385
|
+
* }
|
|
386
|
+
*/
|
|
387
|
+
requestFullScreen(options?: LivePlayerOptions): void
|
|
388
|
+
/**
|
|
389
|
+
* 退出全屏
|
|
390
|
+
* @uniPlatform {
|
|
391
|
+
* "mp": {
|
|
392
|
+
* "weixin": {
|
|
393
|
+
* "hostVer": "√",
|
|
394
|
+
* "uniVer": "√",
|
|
395
|
+
* "unixVer": "4.41"
|
|
396
|
+
* },
|
|
397
|
+
* "alipay": {
|
|
398
|
+
* "hostVer": "-",
|
|
399
|
+
* "uniVer": "-",
|
|
400
|
+
* "unixVer": "-"
|
|
401
|
+
* },
|
|
402
|
+
* "baidu": {
|
|
403
|
+
* "hostVer": "-",
|
|
404
|
+
* "uniVer": "-",
|
|
405
|
+
* "unixVer": "-"
|
|
406
|
+
* },
|
|
407
|
+
* "toutiao": {
|
|
408
|
+
* "hostVer": "-",
|
|
409
|
+
* "uniVer": "-",
|
|
410
|
+
* "unixVer": "-"
|
|
411
|
+
* },
|
|
412
|
+
* "lark": {
|
|
413
|
+
* "hostVer": "-",
|
|
414
|
+
* "uniVer": "-",
|
|
415
|
+
* "unixVer": "-"
|
|
416
|
+
* },
|
|
417
|
+
* "qq": {
|
|
418
|
+
* "hostVer": "-",
|
|
419
|
+
* "uniVer": "-",
|
|
420
|
+
* "unixVer": "-"
|
|
421
|
+
* },
|
|
422
|
+
* "kuaishou": {
|
|
423
|
+
* "hostVer": "-",
|
|
424
|
+
* "uniVer": "-",
|
|
425
|
+
* "unixVer": "-"
|
|
426
|
+
* },
|
|
427
|
+
* "jd": {
|
|
428
|
+
* "hostVer": "-",
|
|
429
|
+
* "uniVer": "-",
|
|
430
|
+
* "unixVer": "-"
|
|
431
|
+
* }
|
|
432
|
+
* }
|
|
433
|
+
* }
|
|
434
|
+
*/
|
|
435
|
+
exitFullScreen(options?: LivePlayerOptions): void
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* 创建 liveplayer context
|
|
440
|
+
*/
|
|
441
|
+
export type CreateLivePlayerContext = (livePlayerId : string, component ?: ComponentPublicInstance | null) => LivePlayerContext | null
|
|
442
|
+
|
|
443
|
+
export interface Uni {
|
|
444
|
+
createLivePlayerContext : (livePlayerId : string, component ?: ComponentPublicInstance | null) => LivePlayerContext | null;
|
|
445
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// 本文件为自动构建生成
|
|
2
|
+
import {
|
|
3
|
+
UniLivePusherStatechangeEvent as UniLivePusherStatechangeEventOrigin,
|
|
4
|
+
UniLivePusherStatechangeEventDetail as UniLivePusherStatechangeEventDetailOrigin,
|
|
5
|
+
UniLivePusherNetstatusEvent as UniLivePusherNetstatusEventOrigin,
|
|
6
|
+
UniLivePusherNetstatusEventDetail as UniLivePusherNetstatusEventDetailOrigin,
|
|
7
|
+
UniLivePusherErrorEvent as UniLivePusherErrorEventOrigin,
|
|
8
|
+
UniLivePusherError as UniLivePusherErrorOrigin,
|
|
9
|
+
LivePusherContextSettings as LivePusherContextSettingsOrigin,
|
|
10
|
+
StreamingStateListener as StreamingStateListenerOrigin,
|
|
11
|
+
StreamingStatusListener as StreamingStatusListenerOrigin,
|
|
12
|
+
StreamingErrorListener as StreamingErrorListenerOrigin,
|
|
13
|
+
SnapCallbackMessage as SnapCallbackMessageOrigin,
|
|
14
|
+
LivePusherSuccess as LivePusherSuccessOrigin,
|
|
15
|
+
LivePusherSuccessCallback as LivePusherSuccessCallbackOrigin,
|
|
16
|
+
LivePusherFail as LivePusherFailOrigin,
|
|
17
|
+
LivePusherFailCallback as LivePusherFailCallbackOrigin,
|
|
18
|
+
LivePusherComplete as LivePusherCompleteOrigin,
|
|
19
|
+
LivePusherCompleteCallback as LivePusherCompleteCallbackOrigin,
|
|
20
|
+
LivePusherOptions as LivePusherOptionsOrigin,
|
|
21
|
+
LivePusherContext as LivePusherContextOrigin,
|
|
22
|
+
CreateLivePusherContext as CreateLivePusherContextOrigin,
|
|
23
|
+
Uni as UniOrigin
|
|
24
|
+
} from './interface'
|
|
25
|
+
|
|
26
|
+
declare global {
|
|
27
|
+
type UniLivePusherStatechangeEvent = UniLivePusherStatechangeEventOrigin
|
|
28
|
+
type UniLivePusherStatechangeEventDetail = UniLivePusherStatechangeEventDetailOrigin
|
|
29
|
+
type UniLivePusherNetstatusEvent = UniLivePusherNetstatusEventOrigin
|
|
30
|
+
type UniLivePusherNetstatusEventDetail = UniLivePusherNetstatusEventDetailOrigin
|
|
31
|
+
type UniLivePusherErrorEvent = UniLivePusherErrorEventOrigin
|
|
32
|
+
type UniLivePusherError = UniLivePusherErrorOrigin
|
|
33
|
+
type LivePusherContextSettings = LivePusherContextSettingsOrigin
|
|
34
|
+
type StreamingStateListener = StreamingStateListenerOrigin
|
|
35
|
+
type StreamingStatusListener = StreamingStatusListenerOrigin
|
|
36
|
+
type StreamingErrorListener = StreamingErrorListenerOrigin
|
|
37
|
+
type SnapCallbackMessage = SnapCallbackMessageOrigin
|
|
38
|
+
type LivePusherSuccess = LivePusherSuccessOrigin
|
|
39
|
+
type LivePusherSuccessCallback = LivePusherSuccessCallbackOrigin
|
|
40
|
+
type LivePusherFail = LivePusherFailOrigin
|
|
41
|
+
type LivePusherFailCallback = LivePusherFailCallbackOrigin
|
|
42
|
+
type LivePusherComplete = LivePusherCompleteOrigin
|
|
43
|
+
type LivePusherCompleteCallback = LivePusherCompleteCallbackOrigin
|
|
44
|
+
type LivePusherOptions = LivePusherOptionsOrigin
|
|
45
|
+
type LivePusherContext = LivePusherContextOrigin
|
|
46
|
+
type CreateLivePusherContext = CreateLivePusherContextOrigin
|
|
47
|
+
interface Uni extends UniOrigin { }
|
|
48
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// 本文件为自动构建生成
|
|
2
|
+
export {
|
|
3
|
+
UniLivePusherStatechangeEvent,
|
|
4
|
+
UniLivePusherStatechangeEventDetail,
|
|
5
|
+
UniLivePusherNetstatusEvent,
|
|
6
|
+
UniLivePusherNetstatusEventDetail,
|
|
7
|
+
UniLivePusherErrorEvent,
|
|
8
|
+
UniLivePusherError,
|
|
9
|
+
LivePusherContextSettings,
|
|
10
|
+
StreamingStateListener,
|
|
11
|
+
StreamingStatusListener,
|
|
12
|
+
StreamingErrorListener,
|
|
13
|
+
SnapCallbackMessage,
|
|
14
|
+
LivePusherSuccess,
|
|
15
|
+
LivePusherSuccessCallback,
|
|
16
|
+
LivePusherFail,
|
|
17
|
+
LivePusherFailCallback,
|
|
18
|
+
LivePusherComplete,
|
|
19
|
+
LivePusherCompleteCallback,
|
|
20
|
+
LivePusherOptions,
|
|
21
|
+
LivePusherContext,
|
|
22
|
+
CreateLivePusherContext,
|
|
23
|
+
} from './interface'
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { LivePusherErrorCode } from './unierror.uts'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 通用事件
|
|
5
|
+
*/
|
|
6
|
+
interface LivePusherEvent {
|
|
7
|
+
bubbles : boolean
|
|
8
|
+
cancelable : boolean
|
|
9
|
+
type : string
|
|
10
|
+
target ?: UniElement | null
|
|
11
|
+
currentTarget ?: UniElement | null
|
|
12
|
+
// #ifdef APP-ANDROID
|
|
13
|
+
timeStamp : Long
|
|
14
|
+
// #endif
|
|
15
|
+
// #ifdef APP-IOS
|
|
16
|
+
timeStamp : number
|
|
17
|
+
// #endif
|
|
18
|
+
stopPropagation() : void
|
|
19
|
+
preventDefault() : void
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 推流状态变化事件
|
|
24
|
+
*/
|
|
25
|
+
export interface UniLivePusherStatechangeEvent extends LivePusherEvent {
|
|
26
|
+
detail : UniLivePusherStatechangeEventDetail
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type UniLivePusherStatechangeEventDetail = {
|
|
30
|
+
code : number,
|
|
31
|
+
message : string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 推流网络状态事件
|
|
36
|
+
*/
|
|
37
|
+
export interface UniLivePusherNetstatusEvent extends LivePusherEvent {
|
|
38
|
+
detail : UniLivePusherNetstatusEventDetail
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type UniLivePusherNetstatusEventDetail = {
|
|
42
|
+
videoBitrate : number,
|
|
43
|
+
audioBitrate : number,
|
|
44
|
+
videoFPS : number,
|
|
45
|
+
videoGOP : number,
|
|
46
|
+
netSpeed : number,
|
|
47
|
+
videoWidth : number,
|
|
48
|
+
videoHeight : number
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 错误事件
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
export interface UniLivePusherErrorEvent extends LivePusherEvent {
|
|
56
|
+
detail : UniLivePusherError
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type UniLivePusherError = {
|
|
60
|
+
errCode : LivePusherErrorCode
|
|
61
|
+
errMsg : string
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* LivePusherContext
|
|
66
|
+
*/
|
|
67
|
+
export type LivePusherContextSettings = {
|
|
68
|
+
url : string
|
|
69
|
+
devicePosition : string
|
|
70
|
+
mode : string
|
|
71
|
+
localMirror : string
|
|
72
|
+
remoteMirror : boolean
|
|
73
|
+
autoFocus : boolean
|
|
74
|
+
muted : boolean
|
|
75
|
+
orientation : string
|
|
76
|
+
beauty : number
|
|
77
|
+
whiten : number
|
|
78
|
+
enableCamera : boolean
|
|
79
|
+
enableMic : boolean
|
|
80
|
+
audioQuality : string
|
|
81
|
+
minBitrate : number
|
|
82
|
+
maxBitrate : number
|
|
83
|
+
audioVolumeType : string
|
|
84
|
+
aspect : string
|
|
85
|
+
backgroundMute : boolean
|
|
86
|
+
waitingImage : string
|
|
87
|
+
zoom : number
|
|
88
|
+
videoWidth : number
|
|
89
|
+
videoHeight : number
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type StreamingStateListener = (info : UniLivePusherStatechangeEvent) => void
|
|
93
|
+
|
|
94
|
+
export type StreamingStatusListener = (info : UniLivePusherNetstatusEvent) => void
|
|
95
|
+
|
|
96
|
+
export type StreamingErrorListener = (info : UniLivePusherErrorEvent) => void
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
export type SnapCallbackMessage = {
|
|
101
|
+
width : number,
|
|
102
|
+
height : number,
|
|
103
|
+
tempImagePath : string
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type LivePusherSuccess = UTSJSONObject;
|
|
107
|
+
export type LivePusherSuccessCallback = (res : LivePusherSuccess) => void;
|
|
108
|
+
export type LivePusherFail = UTSJSONObject;
|
|
109
|
+
export type LivePusherFailCallback = (res : LivePusherFail) => void;
|
|
110
|
+
export type LivePusherComplete = any;
|
|
111
|
+
export type LivePusherCompleteCallback = (res : LivePusherComplete) => void;
|
|
112
|
+
|
|
113
|
+
export type LivePusherOptions = {
|
|
114
|
+
success?: LivePusherSuccessCallback | null,
|
|
115
|
+
fail?: LivePusherFailCallback | null,
|
|
116
|
+
complete?: LivePusherCompleteCallback | null
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface LivePusherContext {
|
|
120
|
+
start(options? : LivePusherOptions) : void
|
|
121
|
+
stop(options? : LivePusherOptions) : void
|
|
122
|
+
switchCamera(options? : LivePusherOptions) : void
|
|
123
|
+
toggleTorch(options? : LivePusherOptions) : void
|
|
124
|
+
pause(options? : LivePusherOptions) : void
|
|
125
|
+
resume(options? : LivePusherOptions) : void
|
|
126
|
+
getMaxZoom(options? : LivePusherOptions) : void
|
|
127
|
+
setZoom(zoom : number, options? : LivePusherOptions) : void
|
|
128
|
+
startPreview(options? : LivePusherOptions) : void
|
|
129
|
+
stopPreview(options? : LivePusherOptions) : void
|
|
130
|
+
snapshot(options? : LivePusherOptions) : void
|
|
131
|
+
sendMessage(message : string, options? : LivePusherOptions) : void
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type CreateLivePusherContext = (livePusherId : string, component ?: ComponentPublicInstance | null) => LivePusherContext | null
|
|
135
|
+
|
|
136
|
+
export interface Uni {
|
|
137
|
+
createLivePusherContext : (livePusherId : string, component ?: ComponentPublicInstance | null) => LivePusherContext | null;
|
|
138
|
+
}
|