@tarojs/taro 3.6.6 → 3.6.7
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 +4 -4
- package/types/api/media/live.d.ts +52 -0
- package/types/api/taro.extend.d.ts +0 -3
- package/types/global.d.ts +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.7",
|
|
4
4
|
"description": "Taro framework",
|
|
5
5
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"author": "O2Team",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tarojs/api": "3.6.
|
|
25
|
-
"@tarojs/runtime": "3.6.
|
|
24
|
+
"@tarojs/api": "3.6.7",
|
|
25
|
+
"@tarojs/runtime": "3.6.7"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tarojs/helper": "3.6.
|
|
28
|
+
"@tarojs/helper": "3.6.7"
|
|
29
29
|
},
|
|
30
30
|
"peerDependenciesMeta": {
|
|
31
31
|
"@types/react": {
|
|
@@ -227,6 +227,14 @@ declare module '../../index' {
|
|
|
227
227
|
toggleTorch(option?: LivePusherContext.ToggleTorchOption): void
|
|
228
228
|
}
|
|
229
229
|
namespace LivePlayerContext {
|
|
230
|
+
interface ExitCastingOption {
|
|
231
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
232
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
233
|
+
/** 接口调用失败的回调函数 */
|
|
234
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
235
|
+
/** 接口调用成功的回调函数 */
|
|
236
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
237
|
+
}
|
|
230
238
|
interface ExitFullScreenOption {
|
|
231
239
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
232
240
|
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
@@ -267,6 +275,14 @@ declare module '../../index' {
|
|
|
267
275
|
/** 接口调用成功的回调函数 */
|
|
268
276
|
success?: (res: TaroGeneral.CallbackResult) => void
|
|
269
277
|
}
|
|
278
|
+
interface ReconnectCastingOption {
|
|
279
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
280
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
281
|
+
/** 接口调用失败的回调函数 */
|
|
282
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
283
|
+
/** 接口调用成功的回调函数 */
|
|
284
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
285
|
+
}
|
|
270
286
|
interface RequestFullScreenOption {
|
|
271
287
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
272
288
|
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
@@ -316,6 +332,14 @@ declare module '../../index' {
|
|
|
316
332
|
/** 调用结果 */
|
|
317
333
|
errMsg: string
|
|
318
334
|
}
|
|
335
|
+
interface StartCastingOption {
|
|
336
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
337
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
338
|
+
/** 接口调用失败的回调函数 */
|
|
339
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
340
|
+
/** 接口调用成功的回调函数 */
|
|
341
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
342
|
+
}
|
|
319
343
|
interface StopOption {
|
|
320
344
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
321
345
|
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
@@ -324,6 +348,14 @@ declare module '../../index' {
|
|
|
324
348
|
/** 接口调用成功的回调函数 */
|
|
325
349
|
success?: (res: TaroGeneral.CallbackResult) => void
|
|
326
350
|
}
|
|
351
|
+
interface SwitchCastingOption {
|
|
352
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
353
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
354
|
+
/** 接口调用失败的回调函数 */
|
|
355
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
356
|
+
/** 接口调用成功的回调函数 */
|
|
357
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
358
|
+
}
|
|
327
359
|
}
|
|
328
360
|
|
|
329
361
|
/** `LivePlayerContext` 实例,可通过 `Taro.createLivePlayerContext` 获取。
|
|
@@ -332,6 +364,11 @@ declare module '../../index' {
|
|
|
332
364
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.html
|
|
333
365
|
*/
|
|
334
366
|
interface LivePlayerContext {
|
|
367
|
+
/** 退出投屏。仅支持在 tap 事件回调内调用。
|
|
368
|
+
* @supported weapp
|
|
369
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.exitCasting.html
|
|
370
|
+
*/
|
|
371
|
+
exitCasting(option?: LivePlayerContext.ExitCastingOption): void
|
|
335
372
|
/** 退出全屏
|
|
336
373
|
* @supported weapp
|
|
337
374
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.exitFullScreen.html
|
|
@@ -357,6 +394,11 @@ declare module '../../index' {
|
|
|
357
394
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.play.html
|
|
358
395
|
*/
|
|
359
396
|
play(option?: LivePlayerContext.PlayOption): void
|
|
397
|
+
/** 重连投屏设备。仅支持在 tap 事件回调内调用。
|
|
398
|
+
* @supported weapp
|
|
399
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.reconnectCasting.html
|
|
400
|
+
*/
|
|
401
|
+
reconnectCasting(option?: LivePlayerContext.ReconnectCastingOption): void
|
|
360
402
|
/** 进入全屏
|
|
361
403
|
* @supported weapp
|
|
362
404
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.requestFullScreen.html
|
|
@@ -381,11 +423,21 @@ declare module '../../index' {
|
|
|
381
423
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.snapshot.html
|
|
382
424
|
*/
|
|
383
425
|
snapshot(option?: LivePlayerContext.SnapshotOption): void
|
|
426
|
+
/** 开始投屏, 拉起半屏搜索设备。仅支持在 tap 事件回调内调用
|
|
427
|
+
* @supported weapp
|
|
428
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.startCasting.html
|
|
429
|
+
*/
|
|
430
|
+
startCasting(option?: LivePlayerContext.StartCastingOption): void
|
|
384
431
|
/** 停止
|
|
385
432
|
* @supported weapp
|
|
386
433
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.stop.html
|
|
387
434
|
*/
|
|
388
435
|
stop(option?: LivePlayerContext.StopOption): void
|
|
436
|
+
/** 切换投屏设备。仅支持在 tap 事件回调内调用。
|
|
437
|
+
* @supported weapp
|
|
438
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.switchCasting.html
|
|
439
|
+
*/
|
|
440
|
+
switchCasting(option?: LivePlayerContext.SwitchCastingOption): void
|
|
389
441
|
}
|
|
390
442
|
|
|
391
443
|
interface TaroStatic {
|
package/types/global.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare namespace TaroGeneral {
|
|
|
6
6
|
type EventCallback = (
|
|
7
7
|
/** 触发事件参数 */
|
|
8
8
|
...args: any
|
|
9
|
-
|
|
9
|
+
) => void
|
|
10
10
|
/** 通用错误 */
|
|
11
11
|
interface CallbackResult {
|
|
12
12
|
/** 错误信息 */
|
|
@@ -35,7 +35,7 @@ declare namespace TaroGeneral {
|
|
|
35
35
|
/** 阻止事件冒泡到父元素,阻止任何父事件处理程序被执行 */
|
|
36
36
|
stopPropagation: () => void
|
|
37
37
|
}
|
|
38
|
-
interface currentTarget extends Target {}
|
|
38
|
+
interface currentTarget extends Target { }
|
|
39
39
|
interface Target {
|
|
40
40
|
/** 事件源组件的id */
|
|
41
41
|
id: string
|
|
@@ -378,33 +378,33 @@ declare namespace TaroGeneral {
|
|
|
378
378
|
*/
|
|
379
379
|
13024
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
type EventName = string | symbol
|
|
382
382
|
// Events
|
|
383
383
|
class Events {
|
|
384
384
|
/**
|
|
385
385
|
* 监听一个事件,接受参数
|
|
386
386
|
*/
|
|
387
|
-
on(eventName:
|
|
387
|
+
on (eventName: EventName, listener: (...args: any[]) => void): this
|
|
388
388
|
|
|
389
389
|
/**
|
|
390
390
|
* 添加一个事件监听,并在事件触发完成之后移除Callbacks链
|
|
391
391
|
*/
|
|
392
|
-
once(eventName:
|
|
392
|
+
once (eventName: EventName, listener: (...args: any[]) => void): this
|
|
393
393
|
|
|
394
394
|
/**
|
|
395
395
|
* 取消监听一个事件
|
|
396
396
|
*/
|
|
397
|
-
off(eventName:
|
|
397
|
+
off (eventName: EventName, listener?: (...args: any[]) => void): this
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
400
|
* 取消监听的所有事件
|
|
401
401
|
*/
|
|
402
|
-
off(): this
|
|
402
|
+
off (): this
|
|
403
403
|
|
|
404
404
|
/**
|
|
405
405
|
* 触发一个事件,传参
|
|
406
406
|
*/
|
|
407
|
-
trigger(eventName:
|
|
407
|
+
trigger (eventName: EventName, ...args: any[]): this
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
// ENV_TYPE
|