@dcloudio/uni-app-x 0.7.12 → 0.7.13
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/.prettierrc +5 -5
- package/README.md +1 -1
- package/index.d.ts +1 -1
- package/options.d.ts +9 -9
- package/package.json +27 -27
- package/types/app.d.ts +843 -843
- package/types/index.d.ts +7 -7
- package/types/native/AsyncApiResult.d.ts +7 -7
- package/types/native/CSSStyleDeclaration.d.ts +25 -25
- package/types/native/DOMRect.d.ts +56 -56
- package/types/native/DrawableContext.d.ts +162 -162
- package/types/native/INavigationBar.d.ts +22 -22
- package/types/native/IUniElement.d.ts +760 -760
- package/types/native/IUniError.d.ts +20 -20
- package/types/native/IUniForm.d.ts +9 -9
- package/types/native/NativeLoadFontFaceOptions.d.ts +11 -11
- package/types/native/NodeData.d.ts +22 -22
- package/types/native/PageNode.d.ts +6 -6
- package/types/native/SnapshotOptions.d.ts +63 -63
- package/types/native/SourceError.d.ts +46 -46
- package/types/native/UTSAndroidHookProxy.d.ts +14 -14
- package/types/native/UniAggregateError.d.ts +19 -19
- package/types/native/UniApp.d.ts +79 -79
- package/types/native/UniCallbackWrapper.d.ts +7 -7
- package/types/native/UniCustomEvent.d.ts +24 -24
- package/types/native/UniDocument.d.ts +83 -83
- package/types/native/UniElement.d.ts +74 -74
- package/types/native/UniError.d.ts +70 -70
- package/types/native/UniEvent.d.ts +62 -62
- package/types/native/UniFormControl.d.ts +8 -8
- package/types/native/UniFormControlElement.d.ts +14 -14
- package/types/native/UniImageErrorEvent.d.ts +33 -33
- package/types/native/UniImageLoadEvent.d.ts +37 -37
- package/types/native/UniInputBlurEvent.d.ts +36 -36
- package/types/native/UniInputConfirmEvent.d.ts +30 -30
- package/types/native/UniInputEvent.d.ts +38 -38
- package/types/native/UniInputFocusEvent.d.ts +53 -48
- package/types/native/UniNativePage.d.ts +219 -181
- package/types/native/UniNestedPreScrollEvent.d.ts +45 -45
- package/types/native/UniPageEvent.d.ts +10 -10
- package/types/native/UniPageManager.d.ts +17 -17
- package/types/native/UniPageScrollEvent.d.ts +13 -13
- package/types/native/UniPointerEvent.d.ts +74 -74
- package/types/native/UniRefresherEvent.d.ts +18 -18
- package/types/native/UniResizeEvent.d.ts +34 -34
- package/types/native/UniResizeObserver.d.ts +184 -0
- package/types/native/UniRichTextItemClickEvent.d.ts +41 -41
- package/types/native/UniScrollEvent.d.ts +42 -42
- package/types/native/UniScrollToLowerEvent.d.ts +23 -23
- package/types/native/UniScrollToUpperEvent.d.ts +23 -23
- package/types/native/UniStartNestedScrollEvent.d.ts +33 -33
- package/types/native/UniStopNestedScrollEvent.d.ts +28 -28
- package/types/native/UniSwiperAnimationFinishEvent.d.ts +22 -22
- package/types/native/UniSwiperChangeEvent.d.ts +22 -22
- package/types/native/UniSwiperTransitionEvent.d.ts +24 -24
- package/types/native/UniTabTapEvent.d.ts +18 -18
- package/types/native/UniTabsElement.d.ts +59 -59
- package/types/native/UniTextElement.d.ts +34 -34
- package/types/native/UniTextareaFocusEvent.d.ts +54 -49
- package/types/native/UniTouchEvent.d.ts +64 -64
- package/types/native/UniVideoElement.d.ts +70 -70
- package/types/native/UniWebViewDownloadEvent.d.ts +52 -52
- package/types/native/UniWebViewElement.d.ts +10 -10
- package/types/native/UniWebViewErrorEvent.d.ts +59 -47
- package/types/native/UniWebViewLoadEvent.d.ts +41 -36
- package/types/native/UniWebViewLoadingEvent.d.ts +41 -36
- package/types/native/UniWebViewMessageEvent.d.ts +36 -36
- package/types/native/UniWebViewServiceMessageEvent.d.ts +8 -8
- package/types/native/ViewToTempFilePathOptions.d.ts +47 -47
- package/types/native/WebViewStyles.d.ts +20 -20
- package/types/native/global.d.ts +530 -519
- package/types/native/index.d.ts +66 -65
- package/types/native-global/index.d.ts +1 -1
- package/types/page.d.ts +1593 -1593
- package/types/process.d.ts +5 -5
- package/types/uni/base/index.d.ts +3 -3
- package/types/uni/env/index.d.ts +64 -64
- package/types/uni/global.d.ts +5 -5
- package/types/uni/index.d.ts +2 -2
- package/types/uni/uts-plugin-api/global.d.ts +35 -35
- package/types/uni/uts-plugin-api/index.d.ts +35 -35
- package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +18 -18
- package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +8 -8
- package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +43 -43
- package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/global.d.ts +20 -20
- package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/index.d.ts +9 -9
- package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +412 -412
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +12 -12
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +5 -5
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +129 -129
- package/types/uni/uts-plugin-api/lib/uni-event/utssdk/global.d.ts +16 -16
- package/types/uni/uts-plugin-api/lib/uni-event/utssdk/index.d.ts +7 -7
- package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +277 -277
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/global.d.ts +26 -26
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +12 -12
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +82 -82
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +136 -66
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +67 -32
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +1784 -450
- package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/global.d.ts +10 -10
- package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +4 -4
- package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts +12 -12
- package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +5 -5
- package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +113 -109
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/global.d.ts +14 -14
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +6 -6
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +398 -350
- package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/global.d.ts +14 -14
- package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +6 -6
- package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/global.d.ts +10 -10
- package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/index.d.ts +4 -4
- package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +73 -73
- package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/global.d.ts +12 -12
- package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/index.d.ts +5 -5
- package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +39 -39
- package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +20 -20
- package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +9 -9
- package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +151 -151
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +24 -24
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +11 -11
- package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/global.d.ts +22 -22
- package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/index.d.ts +10 -10
- package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +157 -157
- package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +24 -24
- package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +11 -11
- package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +84 -88
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/global.d.ts +30 -30
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +14 -14
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +26 -26
- package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/global.d.ts +12 -12
- package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +5 -5
- package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/global.d.ts +24 -24
- package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/index.d.ts +11 -11
- package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/global.d.ts +16 -16
- package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/index.d.ts +7 -7
- package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +152 -152
- package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/global.d.ts +26 -26
- package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/index.d.ts +12 -12
- package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +557 -557
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +158 -158
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +78 -78
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +926 -906
- package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/global.d.ts +44 -44
- package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/index.d.ts +21 -21
- package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +794 -794
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +78 -78
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +38 -38
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +4 -3
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +72 -72
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +35 -35
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +30 -13
- package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts +24 -24
- package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +11 -11
- package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/global.d.ts +24 -24
- package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/index.d.ts +11 -11
- package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +143 -143
- package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/global.d.ts +32 -30
- package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/index.d.ts +15 -14
- package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +2 -1
- package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +74 -74
- package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +36 -36
- package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/global.d.ts +26 -26
- package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/index.d.ts +12 -12
- package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +174 -174
- package/types/uni/uts-plugin-api/lib/uni-route/utssdk/global.d.ts +58 -58
- package/types/uni/uts-plugin-api/lib/uni-route/utssdk/index.d.ts +28 -28
- package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +2020 -2020
- package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/global.d.ts +10 -10
- package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/index.d.ts +4 -4
- package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +33 -33
- package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/global.d.ts +78 -78
- package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +38 -38
- package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +531 -531
- package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/global.d.ts +132 -132
- package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/index.d.ts +65 -65
- package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +926 -926
- package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/global.d.ts +58 -58
- package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +28 -28
- package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +52 -52
- package/types/uni/uts-plugin-biz/global.d.ts +4 -4
- package/types/uni/uts-plugin-biz/index.d.ts +4 -4
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +36 -36
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +17 -17
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +132 -132
- package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/global.d.ts +28 -28
- package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +13 -13
- package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +141 -141
- package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +56 -56
- package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +27 -27
- package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +46 -46
- package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +22 -22
- package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +203 -203
- package/types/uni/uts-plugin-component/global.d.ts +1 -1
- package/types/uni/uts-plugin-component/index.d.ts +1 -1
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +64 -64
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +31 -31
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +404 -404
- package/types/uni-cloud/index.d.ts +59 -59
- package/types/uni-cloud/interface.d.ts +848 -801
- package/types/uni-cloud/unicloud-db/index.d.ts +81 -0
- package/types/uni-cloud/unicloud-db/index.ts +313 -313
- package/types/uni-global/index.d.ts +1 -1
- package/types/vue/CheckboxGroupChangeEvent.d.ts +36 -36
- package/types/vue/LifeCycle.d.ts +55 -55
- package/types/vue/PickerViewChangeEvent.d.ts +36 -36
- package/types/vue/ProgressActiveendEvent.d.ts +30 -30
- package/types/vue/RadioGroupChangeEvent.d.ts +36 -36
- package/types/vue/SliderChangeEvent.d.ts +32 -32
- package/types/vue/SwitchChangeEvent.d.ts +30 -30
- package/types/vue/UniCanvasElement.d.ts +270 -270
- package/types/vue/UniCloudDBElement.d.ts +215 -215
- package/types/vue/UniFormElement.d.ts +51 -51
- package/types/vue/UniNavigatorElement.d.ts +7 -7
- package/types/vue/index.d.ts +11 -11
- package/uts-plugin.d.ts +27 -26
|
@@ -1,405 +1,405 @@
|
|
|
1
|
-
export type CreateVideoContext = (videoId : string.VideoIdString, component ?: ComponentPublicInstance | null) => VideoContext | null;
|
|
2
|
-
|
|
3
|
-
export type Danmu = {
|
|
4
|
-
/**
|
|
5
|
-
* 弹幕文字
|
|
6
|
-
*/
|
|
7
|
-
text ?: string | null,
|
|
8
|
-
/**
|
|
9
|
-
* 弹幕颜色
|
|
10
|
-
*/
|
|
11
|
-
color ?: string | null,
|
|
12
|
-
/**
|
|
13
|
-
* 显示时刻
|
|
14
|
-
*/
|
|
15
|
-
time ?: number | null
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export type RequestFullScreenOptions = {
|
|
19
|
-
/**
|
|
20
|
-
* direction
|
|
21
|
-
* - 0: 正常竖向
|
|
22
|
-
* - 90: 屏幕逆时针90度
|
|
23
|
-
* - -90: 屏幕顺时针90度
|
|
24
|
-
* @type 0 | 90 | -90
|
|
25
|
-
* @uniPlatform {
|
|
26
|
-
* "app": {
|
|
27
|
-
* "android": {
|
|
28
|
-
* "osVer": "4.4",
|
|
29
|
-
* "uniVer": "√",
|
|
30
|
-
* "unixVer": "3.9.0"
|
|
31
|
-
* },
|
|
32
|
-
* "
|
|
33
|
-
* "osVer": "12.0",
|
|
34
|
-
* "uniVer": "√",
|
|
35
|
-
* "unixVer": "4.11"
|
|
36
|
-
* }
|
|
37
|
-
* },
|
|
38
|
-
* "web": {
|
|
39
|
-
* "uniVer": "x",
|
|
40
|
-
* "unixVer": "x"
|
|
41
|
-
* }
|
|
42
|
-
* }
|
|
43
|
-
*/
|
|
44
|
-
direction ?: number | null
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export interface VideoContext {
|
|
48
|
-
/**
|
|
49
|
-
* @description 播放
|
|
50
|
-
* @uniPlatform {
|
|
51
|
-
* "app": {
|
|
52
|
-
* "android": {
|
|
53
|
-
* "osVer": "4.4",
|
|
54
|
-
* "uniVer": "√",
|
|
55
|
-
* "unixVer": "3.9.0"
|
|
56
|
-
* },
|
|
57
|
-
* "
|
|
58
|
-
* "osVer": "12.0",
|
|
59
|
-
* "uniVer": "√",
|
|
60
|
-
* "unixVer": "4.11"
|
|
61
|
-
* }
|
|
62
|
-
* },
|
|
63
|
-
* "web": {
|
|
64
|
-
* "uniVer": "√",
|
|
65
|
-
* "unixVer": "4.0"
|
|
66
|
-
* }
|
|
67
|
-
* }
|
|
68
|
-
* @uniVueVersion 2,3
|
|
69
|
-
*/
|
|
70
|
-
play() : void;
|
|
71
|
-
/**
|
|
72
|
-
* @description 暂停
|
|
73
|
-
* @uniPlatform {
|
|
74
|
-
* "app": {
|
|
75
|
-
* "android": {
|
|
76
|
-
* "osVer": "4.4",
|
|
77
|
-
* "uniVer": "√",
|
|
78
|
-
* "unixVer": "3.9.0"
|
|
79
|
-
* },
|
|
80
|
-
* "
|
|
81
|
-
* "osVer": "12.0",
|
|
82
|
-
* "uniVer": "√",
|
|
83
|
-
* "unixVer": "4.11"
|
|
84
|
-
* }
|
|
85
|
-
* },
|
|
86
|
-
* "web": {
|
|
87
|
-
* "uniVer": "√",
|
|
88
|
-
* "unixVer": "4.0"
|
|
89
|
-
* }
|
|
90
|
-
* }
|
|
91
|
-
* @uniVueVersion 2,3
|
|
92
|
-
*/
|
|
93
|
-
pause() : void;
|
|
94
|
-
/**
|
|
95
|
-
* @description 跳转到指定位置
|
|
96
|
-
* @param {number} position 跳转到指定位置(秒)
|
|
97
|
-
* @uniPlatform {
|
|
98
|
-
* "app": {
|
|
99
|
-
* "android": {
|
|
100
|
-
* "osVer": "4.4",
|
|
101
|
-
* "uniVer": "√",
|
|
102
|
-
* "unixVer": "3.9.0"
|
|
103
|
-
* },
|
|
104
|
-
* "
|
|
105
|
-
* "osVer": "12.0",
|
|
106
|
-
* "uniVer": "√",
|
|
107
|
-
* "unixVer": "4.11"
|
|
108
|
-
* }
|
|
109
|
-
* },
|
|
110
|
-
* "web": {
|
|
111
|
-
* "uniVer": "√",
|
|
112
|
-
* "unixVer": "4.0"
|
|
113
|
-
* }
|
|
114
|
-
* }
|
|
115
|
-
* @uniVueVersion 2,3
|
|
116
|
-
*/
|
|
117
|
-
seek(position : number) : void;
|
|
118
|
-
/**
|
|
119
|
-
* @description 停止视频
|
|
120
|
-
* @uniPlatform {
|
|
121
|
-
* "app": {
|
|
122
|
-
* "android": {
|
|
123
|
-
* "osVer": "4.4",
|
|
124
|
-
* "uniVer": "√",
|
|
125
|
-
* "unixVer": "3.9.0"
|
|
126
|
-
* },
|
|
127
|
-
* "
|
|
128
|
-
* "osVer": "12.0",
|
|
129
|
-
* "uniVer": "√",
|
|
130
|
-
* "unixVer": "4.11"
|
|
131
|
-
* }
|
|
132
|
-
* },
|
|
133
|
-
* "web": {
|
|
134
|
-
* "uniVer": "√",
|
|
135
|
-
* "unixVer": "4.0"
|
|
136
|
-
* }
|
|
137
|
-
* }
|
|
138
|
-
* @uniVueVersion 2,3
|
|
139
|
-
*/
|
|
140
|
-
stop() : void;
|
|
141
|
-
/**
|
|
142
|
-
* @description 发送弹幕
|
|
143
|
-
* @param {Danmu} 属性 text, color
|
|
144
|
-
* @uniPlatform {
|
|
145
|
-
* "app": {
|
|
146
|
-
* "android": {
|
|
147
|
-
* "osVer": "4.4",
|
|
148
|
-
* "uniVer": "√",
|
|
149
|
-
* "unixVer": "3.9.0"
|
|
150
|
-
* },
|
|
151
|
-
* "
|
|
152
|
-
* "osVer": "12.0",
|
|
153
|
-
* "uniVer": "√",
|
|
154
|
-
* "unixVer": "4.11"
|
|
155
|
-
* }
|
|
156
|
-
* },
|
|
157
|
-
* "web": {
|
|
158
|
-
* "uniVer": "√",
|
|
159
|
-
* "unixVer": "4.0"
|
|
160
|
-
* }
|
|
161
|
-
* }
|
|
162
|
-
* @uniVueVersion 2,3
|
|
163
|
-
*/
|
|
164
|
-
sendDanmu(danmu : Danmu) : void;
|
|
165
|
-
/**
|
|
166
|
-
* @description 设置倍速播放
|
|
167
|
-
* @param {number} rate, 支持倍率 0.5/0.8/1.0/1.25/1.5
|
|
168
|
-
* @uniPlatform {
|
|
169
|
-
* "app": {
|
|
170
|
-
* "android": {
|
|
171
|
-
* "osVer": "4.4",
|
|
172
|
-
* "uniVer": "√",
|
|
173
|
-
* "unixVer": "3.9.0"
|
|
174
|
-
* },
|
|
175
|
-
* "
|
|
176
|
-
* "osVer": "12.0",
|
|
177
|
-
* "uniVer": "√",
|
|
178
|
-
* "unixVer": "4.11"
|
|
179
|
-
* }
|
|
180
|
-
* },
|
|
181
|
-
* "web": {
|
|
182
|
-
* "uniVer": "√",
|
|
183
|
-
* "unixVer": "4.0"
|
|
184
|
-
* }
|
|
185
|
-
* }
|
|
186
|
-
* @uniVueVersion 2,3
|
|
187
|
-
*/
|
|
188
|
-
playbackRate(rate : number) : void;
|
|
189
|
-
/**
|
|
190
|
-
* @description 进入全屏
|
|
191
|
-
* @param {RequestFullScreenOptions} direction, 0|正常竖向, 90|屏幕逆时针90度, -90|屏幕顺时针90度
|
|
192
|
-
* @uniPlatform {
|
|
193
|
-
* "app": {
|
|
194
|
-
* "android": {
|
|
195
|
-
* "osVer": "4.4",
|
|
196
|
-
* "uniVer": "√",
|
|
197
|
-
* "unixVer": "3.9.0"
|
|
198
|
-
* },
|
|
199
|
-
* "
|
|
200
|
-
* "osVer": "12.0",
|
|
201
|
-
* "uniVer": "√",
|
|
202
|
-
* "unixVer": "4.11"
|
|
203
|
-
* }
|
|
204
|
-
* },
|
|
205
|
-
* "web": {
|
|
206
|
-
* "uniVer": "√",
|
|
207
|
-
* "unixVer": "4.0"
|
|
208
|
-
* }
|
|
209
|
-
* }
|
|
210
|
-
* @uniVueVersion 2,3
|
|
211
|
-
*/
|
|
212
|
-
requestFullScreen(direction ?: RequestFullScreenOptions | null) : void;
|
|
213
|
-
/**
|
|
214
|
-
* 退出全屏
|
|
215
|
-
* @description 退出全屏
|
|
216
|
-
* @uniPlatform {
|
|
217
|
-
* "app": {
|
|
218
|
-
* "android": {
|
|
219
|
-
* "osVer": "4.4",
|
|
220
|
-
* "uniVer": "√",
|
|
221
|
-
* "unixVer": "3.9.0"
|
|
222
|
-
* },
|
|
223
|
-
* "
|
|
224
|
-
* "osVer": "12.0",
|
|
225
|
-
* "uniVer": "√",
|
|
226
|
-
* "unixVer": "4.11"
|
|
227
|
-
* }
|
|
228
|
-
* },
|
|
229
|
-
* "web": {
|
|
230
|
-
* "uniVer": "√",
|
|
231
|
-
* "unixVer": "4.0"
|
|
232
|
-
* }
|
|
233
|
-
* }
|
|
234
|
-
* @uniVueVersion 2,3
|
|
235
|
-
*/
|
|
236
|
-
exitFullScreen() : void;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export interface Uni {
|
|
240
|
-
/**
|
|
241
|
-
* 创建并返回 video 上下文 videoContext 对象
|
|
242
|
-
* @description 创建并返回 video 上下文 videoContext 对象
|
|
243
|
-
* @uniPlatform {
|
|
244
|
-
* "app": {
|
|
245
|
-
* "android": {
|
|
246
|
-
* "osVer": "4.4",
|
|
247
|
-
* "uniVer": "√",
|
|
248
|
-
* "unixVer": "√"
|
|
249
|
-
* },
|
|
250
|
-
* "
|
|
251
|
-
* "osVer": "12.0",
|
|
252
|
-
* "uniVer": "√",
|
|
253
|
-
* "unixVer": "4.11"
|
|
254
|
-
* }
|
|
255
|
-
* },
|
|
256
|
-
* "web": {
|
|
257
|
-
* "uniVer": "√",
|
|
258
|
-
* "unixVer": "4.0"
|
|
259
|
-
* }
|
|
260
|
-
* }
|
|
261
|
-
* @uniVueVersion 2,3
|
|
262
|
-
* @return {VideoContext} video组件上下文对象
|
|
263
|
-
*
|
|
264
|
-
* @tutorial http://uniapp.dcloud.io/api/media/video-context?id=createVideoContext
|
|
265
|
-
*
|
|
266
|
-
*/
|
|
267
|
-
createVideoContext : CreateVideoContext
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* 通用事件
|
|
272
|
-
*/
|
|
273
|
-
interface UniVideoEvent {
|
|
274
|
-
type : string
|
|
275
|
-
target : Element | null
|
|
276
|
-
currentTarget : Element | null
|
|
277
|
-
timeStamp : Long
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* timeupdate 事件
|
|
282
|
-
* 播放进度变化时触发
|
|
283
|
-
*/
|
|
284
|
-
export interface UniVideoTimeUpdateEvent extends UniVideoEvent {
|
|
285
|
-
detail : UniVideoTimeUpdateEventDetail
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export type UniVideoTimeUpdateEventDetail = {
|
|
289
|
-
/**
|
|
290
|
-
* 当前进度
|
|
291
|
-
*/
|
|
292
|
-
currentTime : number,
|
|
293
|
-
/**
|
|
294
|
-
* 总进度
|
|
295
|
-
*/
|
|
296
|
-
duration : number
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* fullscreenchange 事件
|
|
301
|
-
* 当视频进入和退出全屏是触发
|
|
302
|
-
*/
|
|
303
|
-
export interface UniVideoFullScreenChangeEvent extends UniVideoEvent {
|
|
304
|
-
detail : UniVideoFullScreenChangeEventDetail
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export type UniVideoFullScreenChangeEventDetail = {
|
|
308
|
-
/**
|
|
309
|
-
* 是否全屏
|
|
310
|
-
*/
|
|
311
|
-
fullScreen : boolean,
|
|
312
|
-
/**
|
|
313
|
-
* 横竖屏,取值 vertical 或 horizontal
|
|
314
|
-
*/
|
|
315
|
-
direction : string
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* error 事件
|
|
320
|
-
* 视频播放出错时触发
|
|
321
|
-
*/
|
|
322
|
-
export interface UniVideoErrorEvent extends UniVideoEvent {
|
|
323
|
-
detail : VideoError
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* 统一错误码
|
|
328
|
-
* 100001 网络错误
|
|
329
|
-
* 200001 内部错误
|
|
330
|
-
* 300001 SDK错误
|
|
331
|
-
*/
|
|
332
|
-
export type VideoErrorCode = 100001 | 200001 | 300001
|
|
333
|
-
|
|
334
|
-
export interface VideoError extends IUniError {
|
|
335
|
-
errCode : VideoErrorCode
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* progress 事件
|
|
340
|
-
* 加载进度变化时触发
|
|
341
|
-
*/
|
|
342
|
-
export interface UniVideoProgressEvent extends UniVideoEvent {
|
|
343
|
-
detail : UniVideoProgressEventDetail
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
export type UniVideoProgressEventDetail = {
|
|
347
|
-
/**
|
|
348
|
-
* 加载进度百分比
|
|
349
|
-
*/
|
|
350
|
-
buffered : number
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* fullscreenclick 事件
|
|
355
|
-
* 视频播放全屏播放时点击事件
|
|
356
|
-
*/
|
|
357
|
-
export interface UniVideoFullScreenClickEvent extends UniVideoEvent {
|
|
358
|
-
detail : UniVideoFullScreenClickEventDetail
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
export type UniVideoFullScreenClickEventDetail = {
|
|
362
|
-
/**
|
|
363
|
-
* 点击点相对于屏幕左侧边缘的 X 轴坐标
|
|
364
|
-
*/
|
|
365
|
-
screenX : number,
|
|
366
|
-
/**
|
|
367
|
-
* 点击点相对于屏幕顶部边缘的 Y 轴坐标
|
|
368
|
-
*/
|
|
369
|
-
screenY : number,
|
|
370
|
-
/**
|
|
371
|
-
* 屏幕总宽度
|
|
372
|
-
*/
|
|
373
|
-
screenWidth : number,
|
|
374
|
-
/**
|
|
375
|
-
* 屏幕总高度
|
|
376
|
-
*/
|
|
377
|
-
screenHeight : number
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* controlstoggle 事件
|
|
382
|
-
* 切换播放控件显示隐藏时触发
|
|
383
|
-
*/
|
|
384
|
-
export interface UniVideoControlsToggleEvent extends UniVideoEvent {
|
|
385
|
-
detail : UniVideoControlsToggleEventDetail
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export type UniVideoControlsToggleEventDetail = {
|
|
389
|
-
/**
|
|
390
|
-
* 是否显示
|
|
391
|
-
*/
|
|
392
|
-
show : boolean
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
export type VideoTimeUpdateEvent = UniVideoTimeUpdateEvent
|
|
396
|
-
export type VideoTimeUpdateEventDetail = UniVideoTimeUpdateEventDetail
|
|
397
|
-
export type VideoFullScreenChangeEvent = UniVideoFullScreenChangeEvent
|
|
398
|
-
export type VideoFullScreenChangeEventDetail = UniVideoFullScreenChangeEventDetail
|
|
399
|
-
export type VideoErrorEvent = UniVideoErrorEvent
|
|
400
|
-
export type VideoProgressEvent = UniVideoProgressEvent
|
|
401
|
-
export type VideoProgressEventDetail = UniVideoProgressEventDetail
|
|
402
|
-
export type VideoFullScreenClickEvent = UniVideoFullScreenClickEvent
|
|
403
|
-
export type VideoFullScreenClickEventDetail = UniVideoFullScreenClickEventDetail
|
|
404
|
-
export type VideoControlsToggleEvent = UniVideoControlsToggleEvent
|
|
1
|
+
export type CreateVideoContext = (videoId : string.VideoIdString, component ?: ComponentPublicInstance | null) => VideoContext | null;
|
|
2
|
+
|
|
3
|
+
export type Danmu = {
|
|
4
|
+
/**
|
|
5
|
+
* 弹幕文字
|
|
6
|
+
*/
|
|
7
|
+
text ?: string | null,
|
|
8
|
+
/**
|
|
9
|
+
* 弹幕颜色
|
|
10
|
+
*/
|
|
11
|
+
color ?: string | null,
|
|
12
|
+
/**
|
|
13
|
+
* 显示时刻
|
|
14
|
+
*/
|
|
15
|
+
time ?: number | null
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type RequestFullScreenOptions = {
|
|
19
|
+
/**
|
|
20
|
+
* direction
|
|
21
|
+
* - 0: 正常竖向
|
|
22
|
+
* - 90: 屏幕逆时针90度
|
|
23
|
+
* - -90: 屏幕顺时针90度
|
|
24
|
+
* @type 0 | 90 | -90
|
|
25
|
+
* @uniPlatform {
|
|
26
|
+
* "app": {
|
|
27
|
+
* "android": {
|
|
28
|
+
* "osVer": "4.4",
|
|
29
|
+
* "uniVer": "√",
|
|
30
|
+
* "unixVer": "3.9.0"
|
|
31
|
+
* },
|
|
32
|
+
* "ios": {
|
|
33
|
+
* "osVer": "12.0",
|
|
34
|
+
* "uniVer": "√",
|
|
35
|
+
* "unixVer": "4.11"
|
|
36
|
+
* }
|
|
37
|
+
* },
|
|
38
|
+
* "web": {
|
|
39
|
+
* "uniVer": "x",
|
|
40
|
+
* "unixVer": "x"
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
*/
|
|
44
|
+
direction ?: number | null
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export interface VideoContext {
|
|
48
|
+
/**
|
|
49
|
+
* @description 播放
|
|
50
|
+
* @uniPlatform {
|
|
51
|
+
* "app": {
|
|
52
|
+
* "android": {
|
|
53
|
+
* "osVer": "4.4",
|
|
54
|
+
* "uniVer": "√",
|
|
55
|
+
* "unixVer": "3.9.0"
|
|
56
|
+
* },
|
|
57
|
+
* "ios": {
|
|
58
|
+
* "osVer": "12.0",
|
|
59
|
+
* "uniVer": "√",
|
|
60
|
+
* "unixVer": "4.11"
|
|
61
|
+
* }
|
|
62
|
+
* },
|
|
63
|
+
* "web": {
|
|
64
|
+
* "uniVer": "√",
|
|
65
|
+
* "unixVer": "4.0"
|
|
66
|
+
* }
|
|
67
|
+
* }
|
|
68
|
+
* @uniVueVersion 2,3
|
|
69
|
+
*/
|
|
70
|
+
play() : void;
|
|
71
|
+
/**
|
|
72
|
+
* @description 暂停
|
|
73
|
+
* @uniPlatform {
|
|
74
|
+
* "app": {
|
|
75
|
+
* "android": {
|
|
76
|
+
* "osVer": "4.4",
|
|
77
|
+
* "uniVer": "√",
|
|
78
|
+
* "unixVer": "3.9.0"
|
|
79
|
+
* },
|
|
80
|
+
* "ios": {
|
|
81
|
+
* "osVer": "12.0",
|
|
82
|
+
* "uniVer": "√",
|
|
83
|
+
* "unixVer": "4.11"
|
|
84
|
+
* }
|
|
85
|
+
* },
|
|
86
|
+
* "web": {
|
|
87
|
+
* "uniVer": "√",
|
|
88
|
+
* "unixVer": "4.0"
|
|
89
|
+
* }
|
|
90
|
+
* }
|
|
91
|
+
* @uniVueVersion 2,3
|
|
92
|
+
*/
|
|
93
|
+
pause() : void;
|
|
94
|
+
/**
|
|
95
|
+
* @description 跳转到指定位置
|
|
96
|
+
* @param {number} position 跳转到指定位置(秒)
|
|
97
|
+
* @uniPlatform {
|
|
98
|
+
* "app": {
|
|
99
|
+
* "android": {
|
|
100
|
+
* "osVer": "4.4",
|
|
101
|
+
* "uniVer": "√",
|
|
102
|
+
* "unixVer": "3.9.0"
|
|
103
|
+
* },
|
|
104
|
+
* "ios": {
|
|
105
|
+
* "osVer": "12.0",
|
|
106
|
+
* "uniVer": "√",
|
|
107
|
+
* "unixVer": "4.11"
|
|
108
|
+
* }
|
|
109
|
+
* },
|
|
110
|
+
* "web": {
|
|
111
|
+
* "uniVer": "√",
|
|
112
|
+
* "unixVer": "4.0"
|
|
113
|
+
* }
|
|
114
|
+
* }
|
|
115
|
+
* @uniVueVersion 2,3
|
|
116
|
+
*/
|
|
117
|
+
seek(position : number) : void;
|
|
118
|
+
/**
|
|
119
|
+
* @description 停止视频
|
|
120
|
+
* @uniPlatform {
|
|
121
|
+
* "app": {
|
|
122
|
+
* "android": {
|
|
123
|
+
* "osVer": "4.4",
|
|
124
|
+
* "uniVer": "√",
|
|
125
|
+
* "unixVer": "3.9.0"
|
|
126
|
+
* },
|
|
127
|
+
* "ios": {
|
|
128
|
+
* "osVer": "12.0",
|
|
129
|
+
* "uniVer": "√",
|
|
130
|
+
* "unixVer": "4.11"
|
|
131
|
+
* }
|
|
132
|
+
* },
|
|
133
|
+
* "web": {
|
|
134
|
+
* "uniVer": "√",
|
|
135
|
+
* "unixVer": "4.0"
|
|
136
|
+
* }
|
|
137
|
+
* }
|
|
138
|
+
* @uniVueVersion 2,3
|
|
139
|
+
*/
|
|
140
|
+
stop() : void;
|
|
141
|
+
/**
|
|
142
|
+
* @description 发送弹幕
|
|
143
|
+
* @param {Danmu} 属性 text, color
|
|
144
|
+
* @uniPlatform {
|
|
145
|
+
* "app": {
|
|
146
|
+
* "android": {
|
|
147
|
+
* "osVer": "4.4",
|
|
148
|
+
* "uniVer": "√",
|
|
149
|
+
* "unixVer": "3.9.0"
|
|
150
|
+
* },
|
|
151
|
+
* "ios": {
|
|
152
|
+
* "osVer": "12.0",
|
|
153
|
+
* "uniVer": "√",
|
|
154
|
+
* "unixVer": "4.11"
|
|
155
|
+
* }
|
|
156
|
+
* },
|
|
157
|
+
* "web": {
|
|
158
|
+
* "uniVer": "√",
|
|
159
|
+
* "unixVer": "4.0"
|
|
160
|
+
* }
|
|
161
|
+
* }
|
|
162
|
+
* @uniVueVersion 2,3
|
|
163
|
+
*/
|
|
164
|
+
sendDanmu(danmu : Danmu) : void;
|
|
165
|
+
/**
|
|
166
|
+
* @description 设置倍速播放
|
|
167
|
+
* @param {number} rate, 支持倍率 0.5/0.8/1.0/1.25/1.5
|
|
168
|
+
* @uniPlatform {
|
|
169
|
+
* "app": {
|
|
170
|
+
* "android": {
|
|
171
|
+
* "osVer": "4.4",
|
|
172
|
+
* "uniVer": "√",
|
|
173
|
+
* "unixVer": "3.9.0"
|
|
174
|
+
* },
|
|
175
|
+
* "ios": {
|
|
176
|
+
* "osVer": "12.0",
|
|
177
|
+
* "uniVer": "√",
|
|
178
|
+
* "unixVer": "4.11"
|
|
179
|
+
* }
|
|
180
|
+
* },
|
|
181
|
+
* "web": {
|
|
182
|
+
* "uniVer": "√",
|
|
183
|
+
* "unixVer": "4.0"
|
|
184
|
+
* }
|
|
185
|
+
* }
|
|
186
|
+
* @uniVueVersion 2,3
|
|
187
|
+
*/
|
|
188
|
+
playbackRate(rate : number) : void;
|
|
189
|
+
/**
|
|
190
|
+
* @description 进入全屏
|
|
191
|
+
* @param {RequestFullScreenOptions} direction, 0|正常竖向, 90|屏幕逆时针90度, -90|屏幕顺时针90度
|
|
192
|
+
* @uniPlatform {
|
|
193
|
+
* "app": {
|
|
194
|
+
* "android": {
|
|
195
|
+
* "osVer": "4.4",
|
|
196
|
+
* "uniVer": "√",
|
|
197
|
+
* "unixVer": "3.9.0"
|
|
198
|
+
* },
|
|
199
|
+
* "ios": {
|
|
200
|
+
* "osVer": "12.0",
|
|
201
|
+
* "uniVer": "√",
|
|
202
|
+
* "unixVer": "4.11"
|
|
203
|
+
* }
|
|
204
|
+
* },
|
|
205
|
+
* "web": {
|
|
206
|
+
* "uniVer": "√",
|
|
207
|
+
* "unixVer": "4.0"
|
|
208
|
+
* }
|
|
209
|
+
* }
|
|
210
|
+
* @uniVueVersion 2,3
|
|
211
|
+
*/
|
|
212
|
+
requestFullScreen(direction ?: RequestFullScreenOptions | null) : void;
|
|
213
|
+
/**
|
|
214
|
+
* 退出全屏
|
|
215
|
+
* @description 退出全屏
|
|
216
|
+
* @uniPlatform {
|
|
217
|
+
* "app": {
|
|
218
|
+
* "android": {
|
|
219
|
+
* "osVer": "4.4",
|
|
220
|
+
* "uniVer": "√",
|
|
221
|
+
* "unixVer": "3.9.0"
|
|
222
|
+
* },
|
|
223
|
+
* "ios": {
|
|
224
|
+
* "osVer": "12.0",
|
|
225
|
+
* "uniVer": "√",
|
|
226
|
+
* "unixVer": "4.11"
|
|
227
|
+
* }
|
|
228
|
+
* },
|
|
229
|
+
* "web": {
|
|
230
|
+
* "uniVer": "√",
|
|
231
|
+
* "unixVer": "4.0"
|
|
232
|
+
* }
|
|
233
|
+
* }
|
|
234
|
+
* @uniVueVersion 2,3
|
|
235
|
+
*/
|
|
236
|
+
exitFullScreen() : void;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export interface Uni {
|
|
240
|
+
/**
|
|
241
|
+
* 创建并返回 video 上下文 videoContext 对象
|
|
242
|
+
* @description 创建并返回 video 上下文 videoContext 对象
|
|
243
|
+
* @uniPlatform {
|
|
244
|
+
* "app": {
|
|
245
|
+
* "android": {
|
|
246
|
+
* "osVer": "4.4",
|
|
247
|
+
* "uniVer": "√",
|
|
248
|
+
* "unixVer": "√"
|
|
249
|
+
* },
|
|
250
|
+
* "ios": {
|
|
251
|
+
* "osVer": "12.0",
|
|
252
|
+
* "uniVer": "√",
|
|
253
|
+
* "unixVer": "4.11"
|
|
254
|
+
* }
|
|
255
|
+
* },
|
|
256
|
+
* "web": {
|
|
257
|
+
* "uniVer": "√",
|
|
258
|
+
* "unixVer": "4.0"
|
|
259
|
+
* }
|
|
260
|
+
* }
|
|
261
|
+
* @uniVueVersion 2,3
|
|
262
|
+
* @return {VideoContext} video组件上下文对象
|
|
263
|
+
*
|
|
264
|
+
* @tutorial http://uniapp.dcloud.io/api/media/video-context?id=createVideoContext
|
|
265
|
+
*
|
|
266
|
+
*/
|
|
267
|
+
createVideoContext : CreateVideoContext
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* 通用事件
|
|
272
|
+
*/
|
|
273
|
+
interface UniVideoEvent {
|
|
274
|
+
type : string
|
|
275
|
+
target : Element | null
|
|
276
|
+
currentTarget : Element | null
|
|
277
|
+
timeStamp : Long
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* timeupdate 事件
|
|
282
|
+
* 播放进度变化时触发
|
|
283
|
+
*/
|
|
284
|
+
export interface UniVideoTimeUpdateEvent extends UniVideoEvent {
|
|
285
|
+
detail : UniVideoTimeUpdateEventDetail
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export type UniVideoTimeUpdateEventDetail = {
|
|
289
|
+
/**
|
|
290
|
+
* 当前进度
|
|
291
|
+
*/
|
|
292
|
+
currentTime : number,
|
|
293
|
+
/**
|
|
294
|
+
* 总进度
|
|
295
|
+
*/
|
|
296
|
+
duration : number
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* fullscreenchange 事件
|
|
301
|
+
* 当视频进入和退出全屏是触发
|
|
302
|
+
*/
|
|
303
|
+
export interface UniVideoFullScreenChangeEvent extends UniVideoEvent {
|
|
304
|
+
detail : UniVideoFullScreenChangeEventDetail
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export type UniVideoFullScreenChangeEventDetail = {
|
|
308
|
+
/**
|
|
309
|
+
* 是否全屏
|
|
310
|
+
*/
|
|
311
|
+
fullScreen : boolean,
|
|
312
|
+
/**
|
|
313
|
+
* 横竖屏,取值 vertical 或 horizontal
|
|
314
|
+
*/
|
|
315
|
+
direction : string
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* error 事件
|
|
320
|
+
* 视频播放出错时触发
|
|
321
|
+
*/
|
|
322
|
+
export interface UniVideoErrorEvent extends UniVideoEvent {
|
|
323
|
+
detail : VideoError
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* 统一错误码
|
|
328
|
+
* 100001 网络错误
|
|
329
|
+
* 200001 内部错误
|
|
330
|
+
* 300001 SDK错误
|
|
331
|
+
*/
|
|
332
|
+
export type VideoErrorCode = 100001 | 200001 | 300001
|
|
333
|
+
|
|
334
|
+
export interface VideoError extends IUniError {
|
|
335
|
+
errCode : VideoErrorCode
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* progress 事件
|
|
340
|
+
* 加载进度变化时触发
|
|
341
|
+
*/
|
|
342
|
+
export interface UniVideoProgressEvent extends UniVideoEvent {
|
|
343
|
+
detail : UniVideoProgressEventDetail
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export type UniVideoProgressEventDetail = {
|
|
347
|
+
/**
|
|
348
|
+
* 加载进度百分比
|
|
349
|
+
*/
|
|
350
|
+
buffered : number
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* fullscreenclick 事件
|
|
355
|
+
* 视频播放全屏播放时点击事件
|
|
356
|
+
*/
|
|
357
|
+
export interface UniVideoFullScreenClickEvent extends UniVideoEvent {
|
|
358
|
+
detail : UniVideoFullScreenClickEventDetail
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export type UniVideoFullScreenClickEventDetail = {
|
|
362
|
+
/**
|
|
363
|
+
* 点击点相对于屏幕左侧边缘的 X 轴坐标
|
|
364
|
+
*/
|
|
365
|
+
screenX : number,
|
|
366
|
+
/**
|
|
367
|
+
* 点击点相对于屏幕顶部边缘的 Y 轴坐标
|
|
368
|
+
*/
|
|
369
|
+
screenY : number,
|
|
370
|
+
/**
|
|
371
|
+
* 屏幕总宽度
|
|
372
|
+
*/
|
|
373
|
+
screenWidth : number,
|
|
374
|
+
/**
|
|
375
|
+
* 屏幕总高度
|
|
376
|
+
*/
|
|
377
|
+
screenHeight : number
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* controlstoggle 事件
|
|
382
|
+
* 切换播放控件显示隐藏时触发
|
|
383
|
+
*/
|
|
384
|
+
export interface UniVideoControlsToggleEvent extends UniVideoEvent {
|
|
385
|
+
detail : UniVideoControlsToggleEventDetail
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export type UniVideoControlsToggleEventDetail = {
|
|
389
|
+
/**
|
|
390
|
+
* 是否显示
|
|
391
|
+
*/
|
|
392
|
+
show : boolean
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export type VideoTimeUpdateEvent = UniVideoTimeUpdateEvent
|
|
396
|
+
export type VideoTimeUpdateEventDetail = UniVideoTimeUpdateEventDetail
|
|
397
|
+
export type VideoFullScreenChangeEvent = UniVideoFullScreenChangeEvent
|
|
398
|
+
export type VideoFullScreenChangeEventDetail = UniVideoFullScreenChangeEventDetail
|
|
399
|
+
export type VideoErrorEvent = UniVideoErrorEvent
|
|
400
|
+
export type VideoProgressEvent = UniVideoProgressEvent
|
|
401
|
+
export type VideoProgressEventDetail = UniVideoProgressEventDetail
|
|
402
|
+
export type VideoFullScreenClickEvent = UniVideoFullScreenClickEvent
|
|
403
|
+
export type VideoFullScreenClickEventDetail = UniVideoFullScreenClickEventDetail
|
|
404
|
+
export type VideoControlsToggleEvent = UniVideoControlsToggleEvent
|
|
405
405
|
export type VideoControlsToggleEventDetail = UniVideoControlsToggleEventDetail
|