@doubao-dev/framework 0.7.2 → 0.8.0-canary-99e80cd87-20261106061422
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/dist/api.d.ts +1 -1
- package/dist/components.d.ts +11 -1101
- package/package.json +2 -2
package/dist/api.d.ts
CHANGED
|
@@ -6754,7 +6754,7 @@ export declare const navigateTo: (params: NavigateToParams) => Promise<object>;
|
|
|
6754
6754
|
* });
|
|
6755
6755
|
* ```
|
|
6756
6756
|
*
|
|
6757
|
-
* @since 0.7.
|
|
6757
|
+
* @since 0.7.1
|
|
6758
6758
|
* @containerSupport Page | supported
|
|
6759
6759
|
* @containerSupport Widget | supported
|
|
6760
6760
|
* @platformSupport Android | supported | 内部路由
|
package/dist/components.d.ts
CHANGED
|
@@ -4,9 +4,7 @@ import { CameraDevicePosition } from '../camera';
|
|
|
4
4
|
import { CameraError } from '../camera';
|
|
5
5
|
import { ContentSizeChangedEvent } from '@lynx-js/types';
|
|
6
6
|
import type { CSSProperties } from '@lynx-js/types';
|
|
7
|
-
import type { CSSProperties as CSSProperties_2 } from '@byted-lynx/type-lynx';
|
|
8
7
|
import type { ErrorEvent as ErrorEvent_2 } from '@lynx-js/types';
|
|
9
|
-
import type { ForwardedRef } from '@byted-lynx/react';
|
|
10
8
|
import type { ForwardRefExoticComponent } from 'react';
|
|
11
9
|
import type { InputBlurEvent } from '@lynx-js/types';
|
|
12
10
|
import type { InputConfirmEvent } from '@lynx-js/types';
|
|
@@ -30,11 +28,11 @@ import { ListScrollToUpperEvent } from '@lynx-js/types';
|
|
|
30
28
|
import { ListSnapEvent } from '@lynx-js/types';
|
|
31
29
|
import { ListSnapInfo } from '@lynx-js/types';
|
|
32
30
|
import type { LoadEvent } from '@lynx-js/types';
|
|
33
|
-
import type { MainThread } from '@lynx-js/types';
|
|
34
31
|
import type { NodesRef } from '@lynx-js/types';
|
|
35
32
|
import type { OpenAppResult } from '@byted-doubao-apps/bridge-api';
|
|
36
|
-
import
|
|
37
|
-
import
|
|
33
|
+
import { PopupProps } from '@byted-lynx/lynx-ui-popup';
|
|
34
|
+
import { PopupRef } from '@byted-lynx/lynx-ui-popup';
|
|
35
|
+
import type { ReactElement } from 'react';
|
|
38
36
|
import type { ReactNode } from 'react';
|
|
39
37
|
import type { Ref } from 'react';
|
|
40
38
|
import type { RefAttributes } from 'react';
|
|
@@ -50,7 +48,8 @@ import type { TextAreaInputEvent } from '@lynx-js/types';
|
|
|
50
48
|
import type { TextAreaSelectionChangeEvent } from '@lynx-js/types';
|
|
51
49
|
import type { TouchEvent as TouchEvent_2 } from '@lynx-js/types';
|
|
52
50
|
import type { UIAppearanceEvent } from '@lynx-js/types';
|
|
53
|
-
import
|
|
51
|
+
import { VideoEngineProps } from '@byted-lynx/lynx-ui-video-engine';
|
|
52
|
+
import { VideoEngineRef } from '@byted-lynx/lynx-ui-video-engine';
|
|
54
53
|
|
|
55
54
|
export declare interface AgreePrivacyResult {
|
|
56
55
|
/**
|
|
@@ -97,59 +96,6 @@ export declare interface AudioProps extends Omit<VideoEngineProps, 'as' | 'style
|
|
|
97
96
|
|
|
98
97
|
export declare type AudioRef = VideoEngineRef;
|
|
99
98
|
|
|
100
|
-
declare abstract class BaseGesture<TConfig extends BaseGestureConfig = BaseGestureConfig, TEvent extends GestureChangeEvent = GestureChangeEvent> implements GestureKind {
|
|
101
|
-
abstract type: GestureTypeInner;
|
|
102
|
-
config: TConfig;
|
|
103
|
-
id: number;
|
|
104
|
-
simultaneousWith: BaseGesture<BaseGestureConfig, GestureChangeEvent>[];
|
|
105
|
-
waitFor: BaseGesture<BaseGestureConfig, GestureChangeEvent>[];
|
|
106
|
-
continueWith: BaseGesture<BaseGestureConfig, GestureChangeEvent>[];
|
|
107
|
-
execId: number;
|
|
108
|
-
callbacks: BaseGestureCallbacks<TEvent>;
|
|
109
|
-
__isGesture: true;
|
|
110
|
-
constructor(gesture?: BaseGesture<TConfig, TEvent>);
|
|
111
|
-
updateConfig: (k: string, v: unknown) => this;
|
|
112
|
-
updateCallback: (k: keyof typeof BaseGesture.callbacks, cb: GestureCallback<TEvent>) => this;
|
|
113
|
-
enabled: (enabled: boolean) => this;
|
|
114
|
-
onBegin: (cb: GestureCallback<TEvent>) => this;
|
|
115
|
-
onStart: (cb: GestureCallback<TEvent>) => this;
|
|
116
|
-
onEnd: (cb: GestureCallback<TEvent>) => this;
|
|
117
|
-
onTouchesDown: (cb: GestureCallback<TEvent>) => this;
|
|
118
|
-
onTouchesMove: (cb: GestureCallback<TEvent>) => this;
|
|
119
|
-
onTouchesUp: (cb: GestureCallback<TEvent>) => this;
|
|
120
|
-
onTouchesCancel: (cb: GestureCallback<TEvent>) => this;
|
|
121
|
-
externalWaitFor: (gesture: GestureKind) => this;
|
|
122
|
-
externalSimultaneous: (gesture: GestureKind) => this;
|
|
123
|
-
externalContinueWith: (gesture: GestureKind) => this;
|
|
124
|
-
toGestureArray: () => BaseGesture<BaseGestureConfig, GestureChangeEvent>[];
|
|
125
|
-
serialize: () => Record<string, unknown>;
|
|
126
|
-
toJSON: () => Record<string, unknown>;
|
|
127
|
-
clone: () => this;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Generic base gesture callbacks interface.
|
|
132
|
-
* @template TEvent - The specific gesture event type
|
|
133
|
-
*/
|
|
134
|
-
declare interface BaseGestureCallbacks<TEvent extends GestureChangeEvent = GestureChangeEvent> {
|
|
135
|
-
onBegin?: GestureCallback<TEvent>;
|
|
136
|
-
onStart?: GestureCallback<TEvent>;
|
|
137
|
-
onEnd?: GestureCallback<TEvent>;
|
|
138
|
-
onTouchesDown?: GestureCallback<TEvent>;
|
|
139
|
-
onTouchesMove?: GestureCallback<TEvent>;
|
|
140
|
-
onTouchesUp?: GestureCallback<TEvent>;
|
|
141
|
-
onTouchesCancel?: GestureCallback<TEvent>;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Base configuration interface for all gestures.
|
|
146
|
-
* All gesture-specific configurations extend this interface.
|
|
147
|
-
*/
|
|
148
|
-
declare interface BaseGestureConfig extends Record<string, unknown> {
|
|
149
|
-
/** Whether the gesture is enabled. Defaults to true. */
|
|
150
|
-
enabled?: boolean;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
99
|
declare interface BounceConfig {
|
|
154
100
|
/**
|
|
155
101
|
* 是否启用回弹效果,当 loop 为 true 时忽略此设置
|
|
@@ -159,11 +105,11 @@ declare interface BounceConfig {
|
|
|
159
105
|
/**
|
|
160
106
|
* 左侧回弹项(水平方向时)
|
|
161
107
|
*/
|
|
162
|
-
startBounceItem?:
|
|
108
|
+
startBounceItem?: ReactElement;
|
|
163
109
|
/**
|
|
164
110
|
* 右侧回弹项(水平方向时)
|
|
165
111
|
*/
|
|
166
|
-
endBounceItem?:
|
|
112
|
+
endBounceItem?: ReactElement;
|
|
167
113
|
/**
|
|
168
114
|
* 当 startBounceItem 处于回弹状态时,释放手指将调用此函数
|
|
169
115
|
*/
|
|
@@ -850,53 +796,6 @@ declare interface DoubaoPaymentResultPayload_2 {
|
|
|
850
796
|
|
|
851
797
|
declare type DrawImageSource = CanvasImageSource | CanvasImage | OffscreenCanvas_2;
|
|
852
798
|
|
|
853
|
-
/**
|
|
854
|
-
* Generic gesture callback type that receives typed events.
|
|
855
|
-
* @template TEvent - The specific gesture event type
|
|
856
|
-
*/
|
|
857
|
-
declare type GestureCallback<TEvent extends GestureChangeEvent = GestureChangeEvent> = (event: TEvent, stateManager: StateManager) => void;
|
|
858
|
-
|
|
859
|
-
/**
|
|
860
|
-
* Base gesture change event interface.
|
|
861
|
-
* All gesture-specific events extend this interface.
|
|
862
|
-
*/
|
|
863
|
-
declare interface GestureChangeEvent {
|
|
864
|
-
target: MainThread.Element;
|
|
865
|
-
currentTarget: MainThread.Element;
|
|
866
|
-
params: {
|
|
867
|
-
pageX: number;
|
|
868
|
-
pageY: number;
|
|
869
|
-
timestamp: number;
|
|
870
|
-
type: string;
|
|
871
|
-
clientX: number;
|
|
872
|
-
y: number;
|
|
873
|
-
x: number;
|
|
874
|
-
clientY: number;
|
|
875
|
-
};
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
declare interface GestureKind {
|
|
879
|
-
__isGesture: true;
|
|
880
|
-
type: GestureTypeInner;
|
|
881
|
-
waitFor: GestureKind[];
|
|
882
|
-
continueWith: GestureKind[];
|
|
883
|
-
simultaneousWith: GestureKind[];
|
|
884
|
-
toGestureArray: () => BaseGesture[];
|
|
885
|
-
serialize: () => Record<string, unknown>;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
declare enum GestureTypeInner {
|
|
889
|
-
COMPOSED = -1,
|
|
890
|
-
PAN = 0,
|
|
891
|
-
FLING = 1,
|
|
892
|
-
DEFAULT = 2,
|
|
893
|
-
TAP = 3,
|
|
894
|
-
LONGPRESS = 4,
|
|
895
|
-
ROTATION = 5,
|
|
896
|
-
PINCH = 6,
|
|
897
|
-
NATIVE = 7
|
|
898
|
-
}
|
|
899
|
-
|
|
900
799
|
export declare type GetDoubaoPaymentOrderId = (mode?: DoubaoPaymentMode_2) => string | Promise<string>;
|
|
901
800
|
|
|
902
801
|
declare type GetDoubaoPaymentOrderId_2 = (mode?: DoubaoPaymentMode) => string | Promise<string>;
|
|
@@ -912,53 +811,6 @@ export declare interface GetPhoneNumberResult {
|
|
|
912
811
|
message?: string;
|
|
913
812
|
}
|
|
914
813
|
|
|
915
|
-
declare interface HeightPercent {
|
|
916
|
-
/**
|
|
917
|
-
* The init offset percentage or absolute value (e.g. "200px") that the popup, base line is maxHeight
|
|
918
|
-
* @zh 弹窗的初始偏移百分比或绝对值(例如 "200px"),基准线是 maxHeight * @defaultValue 60
|
|
919
|
-
* @Android
|
|
920
|
-
* @iOS
|
|
921
|
-
* @Harmony
|
|
922
|
-
*/
|
|
923
|
-
init: number | `${number}px` | `${number}%` | `${number}rpx`;
|
|
924
|
-
/**
|
|
925
|
-
* The maximum offset percentage or absolute value (e.g. "400px") that the popup can drag, base line is maxHeight
|
|
926
|
-
* @zh 弹窗可拖动的最大偏移百分比或绝对值(例如 "400px"),基准线是 maxHeight
|
|
927
|
-
* @defaultValue 100
|
|
928
|
-
* @Android
|
|
929
|
-
* @iOS
|
|
930
|
-
* @Harmony
|
|
931
|
-
*/
|
|
932
|
-
top: number | `${number}px` | `${number}%` | `${number}rpx`;
|
|
933
|
-
/**
|
|
934
|
-
* The minimum offset percentage or absolute value (e.g. "0px") that the popup can drag, base line is maxHeight
|
|
935
|
-
* @zh 弹窗可拖动的最小偏移百分比或绝对值(例如 "0px"),基准线是 maxHeight
|
|
936
|
-
* @defaultValue 0
|
|
937
|
-
* @Android
|
|
938
|
-
* @iOS
|
|
939
|
-
* @Harmony
|
|
940
|
-
*/
|
|
941
|
-
bottom?: number | `${number}px` | `${number}%` | `${number}rpx`;
|
|
942
|
-
/**
|
|
943
|
-
* The boundary offset percentage or absolute value (e.g., "20px") for the popup's non-inertial slide release rebound. When the non-inertial slide release rebound area is within position - boundaryArea to + boundaryArea, it will trigger a rebound back to the current position; otherwise, it will move to the next position. The baseline is maxHeight.
|
|
944
|
-
* @zh 弹窗无惯性滑动的松手回弹的边界偏移百分比或绝对值(例如 "20px"),当无惯性滑动松手回弹的区域在position - boundaryArea / + boundaryArea 之间时,会触发回弹到当前的position为止,否则会进入下一个位置,基准线是 maxHeight
|
|
945
|
-
* @defaultValue 10
|
|
946
|
-
* @Android
|
|
947
|
-
* @iOS
|
|
948
|
-
* @Harmony
|
|
949
|
-
*/
|
|
950
|
-
boundaryArea?: number | `${number}px` | `${number}%` | `${number}rpx`;
|
|
951
|
-
/**
|
|
952
|
-
* The speed threshold for inertial sliding rebound. When the release speed is greater than this value, it will slide to the next position; when less than this value, it will rebound to the current position
|
|
953
|
-
* @zh 惯性滑动回弹阈值:弹窗有惯性滑动时的速度阈值,当松手大于该速度时会滑动到下一个position,当小于该速度时会回弹至当前的position
|
|
954
|
-
* @defaultValue 5(px/s)
|
|
955
|
-
* @Android
|
|
956
|
-
* @iOS
|
|
957
|
-
* @Harmony
|
|
958
|
-
*/
|
|
959
|
-
flingThreshold?: number;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
814
|
/**
|
|
963
815
|
* 图片展示组件,支持加载本地或网络图片资源,提供多种裁剪和缩放模式。
|
|
964
816
|
*/
|
|
@@ -2911,24 +2763,6 @@ declare interface onBounceParams {
|
|
|
2911
2763
|
offset: number;
|
|
2912
2764
|
}
|
|
2913
2765
|
|
|
2914
|
-
declare interface OnDragCallback {
|
|
2915
|
-
/**
|
|
2916
|
-
* 0 - begin 1 - drag 2 - end
|
|
2917
|
-
* @zh 0 - 开始 1 - 拖动 2 - 结束
|
|
2918
|
-
*/
|
|
2919
|
-
state: number;
|
|
2920
|
-
/**
|
|
2921
|
-
* x and y coordinate
|
|
2922
|
-
* @zh x 和 y 坐标
|
|
2923
|
-
*/
|
|
2924
|
-
touchEvent: TouchEvent_3;
|
|
2925
|
-
/**
|
|
2926
|
-
* The top of popup
|
|
2927
|
-
* @zh 弹窗的顶部位置
|
|
2928
|
-
*/
|
|
2929
|
-
top: number;
|
|
2930
|
-
}
|
|
2931
|
-
|
|
2932
2766
|
/**
|
|
2933
2767
|
* button 通过 `openType="openSetting"` 打开授权设置页后的回调事件。
|
|
2934
2768
|
*/
|
|
@@ -3206,324 +3040,9 @@ export declare interface PolylineEdgeTexture {
|
|
|
3206
3040
|
url: string;
|
|
3207
3041
|
}
|
|
3208
3042
|
|
|
3209
|
-
export
|
|
3210
|
-
ref?: ForwardedRef<PopupRef>;
|
|
3211
|
-
/**
|
|
3212
|
-
* The id of root scroll container(required)
|
|
3213
|
-
* @zh 根节点滚动容器的 ID(必需)
|
|
3214
|
-
* @Android
|
|
3215
|
-
* @iOS
|
|
3216
|
-
* @Harmony
|
|
3217
|
-
*/
|
|
3218
|
-
scrollContainerId: string;
|
|
3219
|
-
/**
|
|
3220
|
-
* children of popup.
|
|
3221
|
-
* @zh 弹窗的子元素
|
|
3222
|
-
* @Android
|
|
3223
|
-
* @iOS
|
|
3224
|
-
* @Harmony
|
|
3225
|
-
*/
|
|
3226
|
-
children: (prop: RenderFunction) => ReactElement;
|
|
3227
|
-
/**
|
|
3228
|
-
* The ID of the popup content, which needs to be set when autoHeight is true, to get the content height
|
|
3229
|
-
* @zh 弹窗内容的 ID, 在 autoHeight 为 true 时需要设置,用于获取内容高度
|
|
3230
|
-
* @Android
|
|
3231
|
-
* @iOS
|
|
3232
|
-
* @Harmony
|
|
3233
|
-
*/
|
|
3234
|
-
contentId?: string;
|
|
3235
|
-
/**
|
|
3236
|
-
* Auto height of popup, when set to true, you need to specified contentId prop, the height of popup will be the height of content, The drag area is between bottom and the current height, initHeight and maxHeight are no longer valid
|
|
3237
|
-
* @zh 自动弹窗高度,设置为 true 时,需要指定 contentId 属性,弹窗高度会根据内容高度动态变化,拖动区域在底部和当前高度之间,initHeight 和 maxHeight 不再有效
|
|
3238
|
-
* @Android
|
|
3239
|
-
* @iOS
|
|
3240
|
-
* @Harmony
|
|
3241
|
-
*/
|
|
3242
|
-
autoHeight?: boolean;
|
|
3243
|
-
/**
|
|
3244
|
-
* Style for mask
|
|
3245
|
-
* @zh 遮罩的样式
|
|
3246
|
-
* @Android
|
|
3247
|
-
* @iOS
|
|
3248
|
-
* @Harmony
|
|
3249
|
-
*/
|
|
3250
|
-
maskStyle?: CSSProperties_2;
|
|
3251
|
-
/**
|
|
3252
|
-
* Style for popup content
|
|
3253
|
-
* @zh 弹窗内容的样式
|
|
3254
|
-
* @Android
|
|
3255
|
-
* @iOS
|
|
3256
|
-
* @Harmony
|
|
3257
|
-
*/
|
|
3258
|
-
contentStyle?: CSSProperties_2;
|
|
3259
|
-
/**
|
|
3260
|
-
* Preload when popup is create, it will speed up shown when visible is true
|
|
3261
|
-
* @zh 弹窗创建时预加载,这样在 visible 为 true 时会加快显示速度
|
|
3262
|
-
* @defaultValue true
|
|
3263
|
-
* @Android
|
|
3264
|
-
* @iOS
|
|
3265
|
-
* @Harmony
|
|
3266
|
-
*/
|
|
3267
|
-
preload?: boolean;
|
|
3268
|
-
/**
|
|
3269
|
-
* When set to true, click mask will dismiss popup.
|
|
3270
|
-
* @zh 设置为 true 时,点击遮罩会关闭弹窗
|
|
3271
|
-
* @defaultValue true
|
|
3272
|
-
* @Android
|
|
3273
|
-
* @iOS
|
|
3274
|
-
* @Harmony
|
|
3275
|
-
*/
|
|
3276
|
-
closeOnMaskClick?: boolean;
|
|
3277
|
-
/**
|
|
3278
|
-
* When set to true, mask event will through to children
|
|
3279
|
-
* @zh 当设置为true的时候,遮罩事件会传递到子元素
|
|
3280
|
-
* @defaultValue false
|
|
3281
|
-
* @Android
|
|
3282
|
-
* @iOS
|
|
3283
|
-
* @Harmony
|
|
3284
|
-
*/
|
|
3285
|
-
maskEventThrough?: boolean;
|
|
3286
|
-
/**
|
|
3287
|
-
* if enable drag or not
|
|
3288
|
-
* @zh 是否启用拖动
|
|
3289
|
-
* @defaultValue true
|
|
3290
|
-
* @Android
|
|
3291
|
-
* @iOS
|
|
3292
|
-
* @Harmony
|
|
3293
|
-
*/
|
|
3294
|
-
enableDrag?: boolean;
|
|
3295
|
-
/**
|
|
3296
|
-
* if enable bounces or not when touch up
|
|
3297
|
-
* @zh 是否需要松手回弹
|
|
3298
|
-
* @defaultValue true
|
|
3299
|
-
* @Android
|
|
3300
|
-
* @iOS
|
|
3301
|
-
* @Harmony
|
|
3302
|
-
*/
|
|
3303
|
-
enableBounces?: boolean;
|
|
3304
|
-
/**
|
|
3305
|
-
* If true, allows the component to overflow the bottom boundary when dragged.
|
|
3306
|
-
* @zh 如果为 true,则允许组件在拖动时超出底部边界。
|
|
3307
|
-
* @defaultValue false
|
|
3308
|
-
* @Android
|
|
3309
|
-
* @iOS
|
|
3310
|
-
* @Harmony
|
|
3311
|
-
*/
|
|
3312
|
-
allowDragBeyondBottom?: boolean;
|
|
3313
|
-
/**
|
|
3314
|
-
* Stops the propagation of gesture events when the scroll container is at the top.
|
|
3315
|
-
* @zh 当滚动容器滚动到顶部时,停止滚动容器的手势事件传播。
|
|
3316
|
-
* @defaultValue false
|
|
3317
|
-
* @Android
|
|
3318
|
-
* @iOS
|
|
3319
|
-
* @Harmony
|
|
3320
|
-
*/
|
|
3321
|
-
stopGesturePropagationWhenScrollAtTop?: boolean;
|
|
3322
|
-
/**
|
|
3323
|
-
* Dynamically adjusts the exit animation based on the content height. When enabled, the on-screen animation duration remains constant. As a result, the greater the content height, the faster the exit velocity to ensure the animation completes within the fixed time
|
|
3324
|
-
* @zh 根据内容高度动态调整退出动画。启用后,屏幕上的动画持续时间保持不变。因此,内容高度越大,退出速度越快,以确保动画在固定时间内完成。
|
|
3325
|
-
* @defaultValue false
|
|
3326
|
-
* @Android
|
|
3327
|
-
* @iOS
|
|
3328
|
-
* @Harmony
|
|
3329
|
-
*/
|
|
3330
|
-
adjustExitTransitionByContentHeight?: boolean;
|
|
3331
|
-
/**
|
|
3332
|
-
* Theoretically, this is the maximum height that can be dragged to. When using overlayMode, the screen height needs to be passed in. When not using overlayMode, the height of the current LynxView needs to be passed in.
|
|
3333
|
-
* @zh 理论上能拖拽到的最大高度,当使用overlayMode时需要传入屏幕高度,当不使用overlayMode时,需要传入当前LynxView的高度
|
|
3334
|
-
* @defaultValue screenHeight
|
|
3335
|
-
* @Android
|
|
3336
|
-
* @iOS
|
|
3337
|
-
* @Harmony
|
|
3338
|
-
*/
|
|
3339
|
-
maxHeight: number;
|
|
3340
|
-
/**
|
|
3341
|
-
* Nodes fixed at the bottom of the popup will not be affected by dragging
|
|
3342
|
-
* @zh 固定在弹窗底部的节点,不会受到拖动影响
|
|
3343
|
-
* @Android
|
|
3344
|
-
* @iOS
|
|
3345
|
-
* @Harmony
|
|
3346
|
-
*/
|
|
3347
|
-
bottomNode?: ReactElement;
|
|
3348
|
-
/**
|
|
3349
|
-
* Whether to allow dragging the Popup when touching the internal scroll container area
|
|
3350
|
-
* @zh 是否允许触摸在内部滚动容器区域时可拖拽Popup
|
|
3351
|
-
* @defaultValue true
|
|
3352
|
-
* @Android
|
|
3353
|
-
* @iOS
|
|
3354
|
-
* @Harmony
|
|
3355
|
-
*/
|
|
3356
|
-
enableScrollContainerDraggable?: boolean;
|
|
3357
|
-
/**
|
|
3358
|
-
* It is recommended to use a full-screen transparent container for the popup, as it offers better performance. Alternatively, you can also choose to use the popup through an overlay
|
|
3359
|
-
* @zh 建议为弹窗使用全屏透明容器,因为这样性能更好。或者,你也可以选择通过overlay使用弹窗,请参考overlay-ng mode官网描述
|
|
3360
|
-
* @Android
|
|
3361
|
-
* @iOS
|
|
3362
|
-
* @Harmony
|
|
3363
|
-
* @docTypeFallback 'spark' | 'bullet' | 'bulletPopup' | (string & {})
|
|
3364
|
-
*/
|
|
3365
|
-
bytedanceOverlayMode?: 'spark' | 'bullet' | 'bulletPopup' | (string & {});
|
|
3366
|
-
/**
|
|
3367
|
-
* Whether to enable the debug log
|
|
3368
|
-
* @zh 是否启用调试日志
|
|
3369
|
-
* @defaultValue false
|
|
3370
|
-
* @Android
|
|
3371
|
-
* @iOS
|
|
3372
|
-
* @Harmony
|
|
3373
|
-
*/
|
|
3374
|
-
internalDebugLog?: boolean;
|
|
3375
|
-
/**
|
|
3376
|
-
* show animation transition
|
|
3377
|
-
* @zh 显示动画过渡效果
|
|
3378
|
-
* @defaultValue 'all ease-out'
|
|
3379
|
-
* @Android
|
|
3380
|
-
* @iOS
|
|
3381
|
-
* @Harmony
|
|
3382
|
-
*/
|
|
3383
|
-
enterEasingFunction?: string;
|
|
3384
|
-
/**
|
|
3385
|
-
* hide animation transition
|
|
3386
|
-
* @zh 隐藏动画过渡效果
|
|
3387
|
-
* @defaultValue 'all ease-out'
|
|
3388
|
-
* @Android
|
|
3389
|
-
* @iOS
|
|
3390
|
-
* @Harmony
|
|
3391
|
-
*/
|
|
3392
|
-
exitEasingFunction?: string;
|
|
3393
|
-
/**
|
|
3394
|
-
* enter animation duration(ms)
|
|
3395
|
-
* @zh 进入动画持续时间(毫秒)
|
|
3396
|
-
* @defaultValue 300
|
|
3397
|
-
* @Android
|
|
3398
|
-
* @iOS
|
|
3399
|
-
* @Harmony
|
|
3400
|
-
*/
|
|
3401
|
-
enterDuration?: number;
|
|
3402
|
-
/**
|
|
3403
|
-
* exit animation duration(ms)
|
|
3404
|
-
* @zh 退出动画持续时间(毫秒)
|
|
3405
|
-
* @defaultValue 300
|
|
3406
|
-
* @Android
|
|
3407
|
-
* @iOS
|
|
3408
|
-
* @Harmony
|
|
3409
|
-
*/
|
|
3410
|
-
exitDuration?: number;
|
|
3411
|
-
/**
|
|
3412
|
-
* If you want to use gesture, pass it here.
|
|
3413
|
-
* @zh 如果你想使用手势,请使用这个属性
|
|
3414
|
-
* @Android
|
|
3415
|
-
* @iOS
|
|
3416
|
-
* @Harmony
|
|
3417
|
-
*/
|
|
3418
|
-
'main-thread:gesture'?: BaseGesture;
|
|
3419
|
-
/**
|
|
3420
|
-
* height percentage of Popup
|
|
3421
|
-
* @zh 弹窗的高度百分比
|
|
3422
|
-
* @Android
|
|
3423
|
-
* @iOS
|
|
3424
|
-
* @Harmony
|
|
3425
|
-
*/
|
|
3426
|
-
heightPercent?: HeightPercent;
|
|
3427
|
-
/**
|
|
3428
|
-
* bounces transition
|
|
3429
|
-
* @zh 松手回弹效果动画
|
|
3430
|
-
* @defaultValue 'all 0.1s ease-out'
|
|
3431
|
-
* @Android
|
|
3432
|
-
* @iOS
|
|
3433
|
-
* @Harmony
|
|
3434
|
-
*/
|
|
3435
|
-
bouncesTransition?: string;
|
|
3436
|
-
/**
|
|
3437
|
-
* mask transition timing function, e.g. cubic-bezier(0.25, 0.1, 0.25, 1)
|
|
3438
|
-
* @zh 遮罩的过渡动画时间函数,例如 cubic-bezier(0.25, 0.1, 0.25, 1)
|
|
3439
|
-
* @Android
|
|
3440
|
-
* @iOS
|
|
3441
|
-
* @Harmony
|
|
3442
|
-
*/
|
|
3443
|
-
maskTransitionTimingFunction?: string;
|
|
3444
|
-
/**
|
|
3445
|
-
* x-overlay-ng props for the popup
|
|
3446
|
-
* @zh 在弹窗的overlay id, 用于在设置bytedanceOverlayMode下指定弹窗的overlay props
|
|
3447
|
-
* @defaultValue {}
|
|
3448
|
-
* @Android
|
|
3449
|
-
* @iOS
|
|
3450
|
-
* @Harmony
|
|
3451
|
-
*/
|
|
3452
|
-
overlayProps?: Partial<XOverlayNGProps>;
|
|
3453
|
-
/**
|
|
3454
|
-
* drag callback
|
|
3455
|
-
* @zh 拖动回调
|
|
3456
|
-
* @Android
|
|
3457
|
-
* @iOS
|
|
3458
|
-
* @Harmony
|
|
3459
|
-
*/
|
|
3460
|
-
onDrag?: (eventParam: OnDragCallback) => void;
|
|
3461
|
-
/**
|
|
3462
|
-
* popup position callback
|
|
3463
|
-
* @zh 弹窗位置回调
|
|
3464
|
-
* @Android
|
|
3465
|
-
* @iOS
|
|
3466
|
-
* @Harmony
|
|
3467
|
-
*/
|
|
3468
|
-
onPopupPositionChange?: (
|
|
3469
|
-
/**
|
|
3470
|
-
* 0(center) 1(top) -1(bottom) 4(close)
|
|
3471
|
-
* @zh 0(中间) 1(顶部) -1(底部) 4(关闭)
|
|
3472
|
-
* @Android
|
|
3473
|
-
* @iOS
|
|
3474
|
-
* @Harmony
|
|
3475
|
-
*/
|
|
3476
|
-
position: number) => void;
|
|
3477
|
-
/**
|
|
3478
|
-
* 弹窗高度变化回调
|
|
3479
|
-
* @param height 弹窗的高度
|
|
3480
|
-
* @returns
|
|
3481
|
-
*/
|
|
3482
|
-
onPopupTopChange?: (height: number) => void;
|
|
3483
|
-
/**
|
|
3484
|
-
* clicking the back button or sliding back
|
|
3485
|
-
* @zh 是否左滑或者点击返回键
|
|
3486
|
-
* @Android
|
|
3487
|
-
*/
|
|
3488
|
-
onRequestClose?: () => void;
|
|
3489
|
-
}
|
|
3490
|
-
|
|
3491
|
-
export declare interface PopupRef {
|
|
3492
|
-
/**
|
|
3493
|
-
* Open the popup. Popup position: 0 (center), 1 (top), -1 (bottom). Default is center.
|
|
3494
|
-
* @zh 打开弹窗, 弹窗位置 0(中心)1(顶部)-1(底部),默认是中心
|
|
3495
|
-
* @defaultValue 0
|
|
3496
|
-
* @Android
|
|
3497
|
-
* @iOS
|
|
3498
|
-
* @Harmony
|
|
3499
|
-
*/
|
|
3500
|
-
open: (position?: PopupStatus) => void;
|
|
3501
|
-
/**
|
|
3502
|
-
* Close popup
|
|
3503
|
-
* @zh 关闭弹窗
|
|
3504
|
-
* @Android
|
|
3505
|
-
* @iOS
|
|
3506
|
-
* @Harmony
|
|
3507
|
-
*/
|
|
3508
|
-
close: () => void;
|
|
3509
|
-
/**
|
|
3510
|
-
* Translate popup to specified position, 0(center) 1(top) -1(bottom) | "px" | "%" | "rpx"
|
|
3511
|
-
* @zh 移动弹窗到指定位置,0(中心)1(顶部)-1(底部)
|
|
3512
|
-
* @Android
|
|
3513
|
-
* @iOS
|
|
3514
|
-
* @Harmony
|
|
3515
|
-
*/
|
|
3516
|
-
translateTo: (position: PopupStatus | string) => void;
|
|
3517
|
-
}
|
|
3043
|
+
export { PopupProps }
|
|
3518
3044
|
|
|
3519
|
-
|
|
3520
|
-
AT_BOTTOM = -1,
|
|
3521
|
-
AT_CENTER = 0,
|
|
3522
|
-
AT_TOP = 1,
|
|
3523
|
-
TOP_TO_CENTER = 2,
|
|
3524
|
-
CENTER_TO_TOP = 3,
|
|
3525
|
-
AT_CLOSE = 4
|
|
3526
|
-
}
|
|
3045
|
+
export { PopupRef }
|
|
3527
3046
|
|
|
3528
3047
|
/**
|
|
3529
3048
|
* 单选按钮组,管理一组互斥的 Radio 选项,提供统一的值控制。
|
|
@@ -3592,25 +3111,6 @@ export declare interface RadioProps {
|
|
|
3592
3111
|
disabled?: boolean;
|
|
3593
3112
|
}
|
|
3594
3113
|
|
|
3595
|
-
declare interface RenderFunction {
|
|
3596
|
-
/**
|
|
3597
|
-
* The gesture that needs to be bound to the scroll container inside the popup. After binding, the scroll container inside the popup follows the rule that when it is not at the top, it will drag the popup first, and when it is at the top, it can scroll the inner scroll container.
|
|
3598
|
-
* @zh Popup内滚动容器需要绑定的手势,绑定后弹窗内的滚动容器遵循未到达顶部时,优先拖拽Popup,到达顶部后可以滚动内部滚动容器
|
|
3599
|
-
* @Android
|
|
3600
|
-
* @iOS
|
|
3601
|
-
* @Harmony
|
|
3602
|
-
*/
|
|
3603
|
-
'main-thread:gesture': BaseGesture;
|
|
3604
|
-
/**
|
|
3605
|
-
* The gesture that needs to be bound to the non-scrollable container inside the popup. After binding, the non-scrollable container inside the popup will only respond to dragging.
|
|
3606
|
-
* @zh Popup内非滚动容器当需要拖拽时需要绑定的手势,绑定后该节点仅响应拖拽
|
|
3607
|
-
* @Android
|
|
3608
|
-
* @iOS
|
|
3609
|
-
* @Harmony
|
|
3610
|
-
*/
|
|
3611
|
-
'draggableGesture': BaseGesture;
|
|
3612
|
-
}
|
|
3613
|
-
|
|
3614
3114
|
declare interface RenderFunctionProps<T> {
|
|
3615
3115
|
item: T;
|
|
3616
3116
|
index: number;
|
|
@@ -3908,14 +3408,6 @@ export declare interface SliderProps {
|
|
|
3908
3408
|
onChange?: (value: number) => void;
|
|
3909
3409
|
}
|
|
3910
3410
|
|
|
3911
|
-
declare interface StateManager {
|
|
3912
|
-
active: () => void;
|
|
3913
|
-
fail: () => void;
|
|
3914
|
-
end: () => void;
|
|
3915
|
-
consumeGesture: (shouldConsume: boolean) => void;
|
|
3916
|
-
interceptGesture: (shouldIntercept: boolean) => void;
|
|
3917
|
-
}
|
|
3918
|
-
|
|
3919
3411
|
/**
|
|
3920
3412
|
* SVG 图形渲染组件,支持内联展示 SVG 格式图片。
|
|
3921
3413
|
*/
|
|
@@ -3970,7 +3462,7 @@ export declare interface SwiperItemProps {
|
|
|
3970
3462
|
/**
|
|
3971
3463
|
* 子元素
|
|
3972
3464
|
*/
|
|
3973
|
-
children:
|
|
3465
|
+
children: ReactElement | ReactElement[];
|
|
3974
3466
|
/**
|
|
3975
3467
|
* 样式
|
|
3976
3468
|
*/
|
|
@@ -4030,7 +3522,7 @@ declare interface SwiperProps_2<T> {
|
|
|
4030
3522
|
* </swiper>
|
|
4031
3523
|
* ```
|
|
4032
3524
|
*/
|
|
4033
|
-
children: (prop: RenderFunctionProps<T>) =>
|
|
3525
|
+
children: (prop: RenderFunctionProps<T>) => ReactElement;
|
|
4034
3526
|
/**
|
|
4035
3527
|
* 容器宽度
|
|
4036
3528
|
* @defaultValue screenWidth
|
|
@@ -4484,21 +3976,6 @@ export declare interface ThemeProviderProps {
|
|
|
4484
3976
|
flatten?: boolean;
|
|
4485
3977
|
}
|
|
4486
3978
|
|
|
4487
|
-
declare interface TouchEvent_3 {
|
|
4488
|
-
detail: {
|
|
4489
|
-
/**
|
|
4490
|
-
* x coordinate of touch event
|
|
4491
|
-
* @zh 触摸事件的 x 坐标
|
|
4492
|
-
*/
|
|
4493
|
-
y: number;
|
|
4494
|
-
/**
|
|
4495
|
-
* y coordinate of touch event
|
|
4496
|
-
* @zh 触摸事件的 y 坐标
|
|
4497
|
-
*/
|
|
4498
|
-
x: number;
|
|
4499
|
-
};
|
|
4500
|
-
}
|
|
4501
|
-
|
|
4502
3979
|
/**
|
|
4503
3980
|
* 内容更新状态组件,在内容更新时展示渐变过渡效果。
|
|
4504
3981
|
*/
|
|
@@ -4599,573 +4076,6 @@ export declare interface UseLongImageResult {
|
|
|
4599
4076
|
isSegmentActive: (index: number) => boolean;
|
|
4600
4077
|
}
|
|
4601
4078
|
|
|
4602
|
-
declare enum VideoEngineOption {
|
|
4603
|
-
PLAYER_OPTION_ENABLE_DASH = "17"
|
|
4604
|
-
}
|
|
4605
|
-
|
|
4606
|
-
declare type VideoEnginePlaybackCallback = (success: boolean, errCode?: number, errMsg?: string) => void;
|
|
4607
|
-
|
|
4608
|
-
declare interface VideoEngineProps {
|
|
4609
|
-
ref?: ForwardedRef<VideoEngineRef>;
|
|
4610
|
-
/**
|
|
4611
|
-
* Style for wrapper, especially for border-radius
|
|
4612
|
-
* @zh 包装器的样式,特别用于设置圆角
|
|
4613
|
-
* @defaultValue undefined
|
|
4614
|
-
* @Android
|
|
4615
|
-
* @iOS
|
|
4616
|
-
* @Harmony
|
|
4617
|
-
*/
|
|
4618
|
-
style?: CSSProperties_2;
|
|
4619
|
-
/**
|
|
4620
|
-
* Be used to select the `x-video-engine`. Please ensure that it is unique throughout the page.
|
|
4621
|
-
* @zh 用于选择 `x-video-engine`。请确保在整个页面中唯一。
|
|
4622
|
-
* @defaultValue 'videoengine'
|
|
4623
|
-
* @Android
|
|
4624
|
-
* @iOS
|
|
4625
|
-
* @Harmony
|
|
4626
|
-
*/
|
|
4627
|
-
videoEngineId?: string;
|
|
4628
|
-
/**
|
|
4629
|
-
* Be used to mark the exposure timing. Please ensure that it is unique throughout the page.
|
|
4630
|
-
* @zh 用于标记曝光时间点。请确保在整个页面中唯一。
|
|
4631
|
-
* @defaultValue 'videoengine'
|
|
4632
|
-
* @Android
|
|
4633
|
-
* @iOS
|
|
4634
|
-
* @Harmony
|
|
4635
|
-
*/
|
|
4636
|
-
scene?: string;
|
|
4637
|
-
/**
|
|
4638
|
-
* The specified video playback source uses the videoModel data structure recommended by the company to play the resource and is expressed by JSONString.
|
|
4639
|
-
* @zh 指定视频播放源,使用公司推荐的视频模型数据结构播放资源,表现为 JSON 字符串。
|
|
4640
|
-
* @defaultValue undefined
|
|
4641
|
-
* @Android
|
|
4642
|
-
* @iOS
|
|
4643
|
-
*/
|
|
4644
|
-
videoModel?: string;
|
|
4645
|
-
/**
|
|
4646
|
-
* Use vid to specify the video playback source. Most hosts use vid to play. You need to pass in token and domain at the same time. Toutiao can support only passing in vid.
|
|
4647
|
-
* @zh 使用 vid 指定视频播放源。大多数主机会使用 vid 来播放。你需要同时传入 token 和 domain。头条支持仅传入 vid。
|
|
4648
|
-
* @defaultValue undefined
|
|
4649
|
-
* @Android
|
|
4650
|
-
* @iOS
|
|
4651
|
-
*/
|
|
4652
|
-
videoId?: string;
|
|
4653
|
-
/**
|
|
4654
|
-
* To play with vid, you need to pass in both token and domain. Toutiao can support passing in only vid
|
|
4655
|
-
* @zh 使用 vid 播放视频需要同时传入 token 和 domain。头条支持仅传入 vid。
|
|
4656
|
-
* @defaultValue undefined
|
|
4657
|
-
* @Android
|
|
4658
|
-
* @iOS
|
|
4659
|
-
*/
|
|
4660
|
-
token?: string;
|
|
4661
|
-
/**
|
|
4662
|
-
* To play with vid, you need to pass in both token and domain. Toutiao can support passing in only vid. {@link https://lynx.bytedance.net/docs/frontend/components/x-video-engine | see more}.
|
|
4663
|
-
* @zh 使用 vid 播放视频需要同时传入 token 和 domain。头条支持仅传入 vid。{@link https://lynx.bytedance.net/docs/frontend/components/x-video-engine | 查看更多}.
|
|
4664
|
-
* @defaultValue undefined
|
|
4665
|
-
* @Android
|
|
4666
|
-
* @iOS
|
|
4667
|
-
*/
|
|
4668
|
-
domain?: string;
|
|
4669
|
-
/**
|
|
4670
|
-
* For the specified video playback source, once play-url is set, the player will try to load the resource asynchronously. Before bindredirect, all playback control logic will not take effect.
|
|
4671
|
-
* @zh 指定视频播放源,一旦设置 play-url,播放器将尝试异步加载资源。在绑定重定向之前,所有播放控制逻辑将无效。
|
|
4672
|
-
* @defaultValue undefined
|
|
4673
|
-
* @Android
|
|
4674
|
-
* @iOS
|
|
4675
|
-
* @Harmony
|
|
4676
|
-
*/
|
|
4677
|
-
playUrl?: string;
|
|
4678
|
-
/**
|
|
4679
|
-
* Poster. Will be dismissed after playing.
|
|
4680
|
-
* @zh 海报。播放后将被取消显示。
|
|
4681
|
-
* @defaultValue undefined
|
|
4682
|
-
* @Android
|
|
4683
|
-
* @iOS
|
|
4684
|
-
* @Harmony
|
|
4685
|
-
*/
|
|
4686
|
-
poster?: string;
|
|
4687
|
-
/**
|
|
4688
|
-
* Play automatically after stream data changes.
|
|
4689
|
-
* @zh 流数据变化后自动播放。
|
|
4690
|
-
* @defaultValue false
|
|
4691
|
-
* @Android
|
|
4692
|
-
* @iOS
|
|
4693
|
-
* @Harmony
|
|
4694
|
-
*/
|
|
4695
|
-
autoPlay?: boolean;
|
|
4696
|
-
/**
|
|
4697
|
-
* Specifies the video cropping/scaling mode.
|
|
4698
|
-
* @zh 指定视频裁剪/缩放模式。
|
|
4699
|
-
* @defaultValue 'aspectFit'
|
|
4700
|
-
* @Android
|
|
4701
|
-
* @iOS
|
|
4702
|
-
* @Harmony
|
|
4703
|
-
*/
|
|
4704
|
-
objectfit?: 'aspectFit' | 'aspectFill' | 'scaleToFill';
|
|
4705
|
-
/**
|
|
4706
|
-
* Rotate or not in full-screen mode
|
|
4707
|
-
* @zh 全屏模式下是否旋转
|
|
4708
|
-
* @defaultValue 'landscape'
|
|
4709
|
-
* @Android
|
|
4710
|
-
* @iOS
|
|
4711
|
-
* @since 2.18
|
|
4712
|
-
*/
|
|
4713
|
-
fullscreenMode?: 'landscape' | 'portrait';
|
|
4714
|
-
/**
|
|
4715
|
-
* Live player should muted.
|
|
4716
|
-
* @zh 是否静音实时播放器。
|
|
4717
|
-
* @defaultValue false
|
|
4718
|
-
* @Android
|
|
4719
|
-
* @iOS
|
|
4720
|
-
* @Harmony
|
|
4721
|
-
*/
|
|
4722
|
-
mute?: boolean;
|
|
4723
|
-
/**
|
|
4724
|
-
* Loop play. After the video starts playing, loop changes will not change the current play/pause status of the video.
|
|
4725
|
-
* @zh 循环播放。视频开始播放后,循环状态变化不会改变视频的当前播放/暂停状态。
|
|
4726
|
-
* @defaultValue false
|
|
4727
|
-
* @Android
|
|
4728
|
-
* @iOS
|
|
4729
|
-
* @Harmony
|
|
4730
|
-
*/
|
|
4731
|
-
loop?: boolean;
|
|
4732
|
-
/**
|
|
4733
|
-
* Automatically pre-render the player (showing the first frame) after resource preparation is completed
|
|
4734
|
-
* @zh 在资源准备完成后自动预渲染播放器(显示首帧)
|
|
4735
|
-
* @defaultValue true
|
|
4736
|
-
* @Android
|
|
4737
|
-
* @iOS
|
|
4738
|
-
* @Harmony
|
|
4739
|
-
*/
|
|
4740
|
-
autoPrepare?: boolean;
|
|
4741
|
-
/**
|
|
4742
|
-
* Automatically pre-render the player (showing the first frame) after resource preparation is completed
|
|
4743
|
-
* @zh 在资源准备完成后自动预渲染播放器(显示首帧)
|
|
4744
|
-
* @defaultValue false
|
|
4745
|
-
* @Android
|
|
4746
|
-
* @iOS
|
|
4747
|
-
* @Harmony
|
|
4748
|
-
*/
|
|
4749
|
-
initTime?: number;
|
|
4750
|
-
/**
|
|
4751
|
-
* @defaultValue undefined
|
|
4752
|
-
* @Android
|
|
4753
|
-
* @iOS
|
|
4754
|
-
*/
|
|
4755
|
-
preloadKey?: string;
|
|
4756
|
-
/**
|
|
4757
|
-
* @defaultValue undefined
|
|
4758
|
-
* @Android
|
|
4759
|
-
* @iOS
|
|
4760
|
-
*/
|
|
4761
|
-
cacheSize?: number;
|
|
4762
|
-
/**
|
|
4763
|
-
* For player monitoring.
|
|
4764
|
-
* @zh 用于播放器监控。
|
|
4765
|
-
* @defaultValue undefined
|
|
4766
|
-
* @Android
|
|
4767
|
-
* @iOS
|
|
4768
|
-
* @Harmony
|
|
4769
|
-
*/
|
|
4770
|
-
tag?: string;
|
|
4771
|
-
/**
|
|
4772
|
-
* For player monitoring.
|
|
4773
|
-
* @zh 用于播放器监控。
|
|
4774
|
-
* @defaultValue undefined
|
|
4775
|
-
* @Android
|
|
4776
|
-
* @iOS
|
|
4777
|
-
*/
|
|
4778
|
-
subTag?: string;
|
|
4779
|
-
/**
|
|
4780
|
-
* Specify whether to pause the video when the LynxView exits the background or moves out of the screen to prevent sound leakage
|
|
4781
|
-
* @zh 指定当 LynxView 退出背景或移出屏幕后是否暂停视频,以防止声音泄漏
|
|
4782
|
-
* @defaultValue false
|
|
4783
|
-
* @Android
|
|
4784
|
-
* @iOS
|
|
4785
|
-
*/
|
|
4786
|
-
pauseOnHide?: boolean;
|
|
4787
|
-
/**
|
|
4788
|
-
* To customize engine parameters, you need to refer to TTVideoEngine key definition and pass in the correct value type. The client needs to pay attention to it.
|
|
4789
|
-
* @zh 要自定义引擎参数,需要参考 TTVideoEngine 键定义并传入正确的值类型。客户端需要注意。
|
|
4790
|
-
* @defaultValue undefined
|
|
4791
|
-
* @Android
|
|
4792
|
-
* @iOS
|
|
4793
|
-
*/
|
|
4794
|
-
playerOption?: Record<VideoEngineOption, `@encode(${string | number | boolean}, ${'[c]' | 'i' | 'l' | 'f' | 'd' | 'b'})`>;
|
|
4795
|
-
/**
|
|
4796
|
-
* Specify the playback speed.
|
|
4797
|
-
* @zh 指定播放速度
|
|
4798
|
-
* @defaultValue 1.0
|
|
4799
|
-
* @Android
|
|
4800
|
-
* @iOS
|
|
4801
|
-
*/
|
|
4802
|
-
playbackSpeed?: number;
|
|
4803
|
-
/**
|
|
4804
|
-
* Specify the volume, range: [0.0, 1.0]
|
|
4805
|
-
* @zh 指定音量,范围:[0.0, 1.0]
|
|
4806
|
-
* @defaultValue 1.0
|
|
4807
|
-
* @Android
|
|
4808
|
-
* @iOS
|
|
4809
|
-
* @Harmony
|
|
4810
|
-
*/
|
|
4811
|
-
volume?: number;
|
|
4812
|
-
/**
|
|
4813
|
-
* Whether to use the default resource loader (Forest、Gecko) to download resources
|
|
4814
|
-
* @zh 是否使用默认资源加载器(Forest、Gecko)下载资源
|
|
4815
|
-
* @defaultValue true
|
|
4816
|
-
* @Android
|
|
4817
|
-
* @iOS
|
|
4818
|
-
*/
|
|
4819
|
-
skipRedirection?: boolean;
|
|
4820
|
-
/**
|
|
4821
|
-
* Execute pending ops automatically
|
|
4822
|
-
* @zh 自动执行待处理的操作
|
|
4823
|
-
* @defaultValue true
|
|
4824
|
-
* @Android
|
|
4825
|
-
* @iOS
|
|
4826
|
-
* @Harmony
|
|
4827
|
-
*/
|
|
4828
|
-
cachingPendingOps?: boolean;
|
|
4829
|
-
/**
|
|
4830
|
-
* Custom player backend. The host can inject its own player. `preloadKey` is not supported for playerType === 'light'.
|
|
4831
|
-
* @zh 自定义播放器后端。宿主可注入其自己的播放器。playerType === 'light' 不支持 `preloadKey`。
|
|
4832
|
-
* @defaultValue 'default'
|
|
4833
|
-
* @Android
|
|
4834
|
-
* @iOS
|
|
4835
|
-
* @docTypeFallback 'default' | 'light' | (string & {})
|
|
4836
|
-
*/
|
|
4837
|
-
playerType?: 'default' | 'light' | (string & {});
|
|
4838
|
-
/**
|
|
4839
|
-
* Whether to load player instances on demand for performance optimization, commonly used in list scenarios, no need to set in other cases
|
|
4840
|
-
* @zh 是否按需加载播放器实例,用于性能优化,常用于列表场景,其他情况无需设置
|
|
4841
|
-
* @Android
|
|
4842
|
-
* @iOS
|
|
4843
|
-
* @Harmony
|
|
4844
|
-
*/
|
|
4845
|
-
attached?: boolean;
|
|
4846
|
-
/**
|
|
4847
|
-
* Specify the playback resolution.
|
|
4848
|
-
* @zh 指定播放分辨率。
|
|
4849
|
-
* @defaultValue 'auto'
|
|
4850
|
-
* @Android
|
|
4851
|
-
* @iOS
|
|
4852
|
-
* @since 3.3
|
|
4853
|
-
*/
|
|
4854
|
-
resolution?: 'auto' | '240p' | '360p' | '480p' | '540p' | '720p' | '1080p' | '4k' | 'hdr' | '2k' | '1080p 50fps' | '2k 50fps' | '4k 50fps' | '1080p 60fps' | '2k 60fps' | '4k 60fps' | '1080p 120fps' | '2k 120fps' | '4k 120fps';
|
|
4855
|
-
/**
|
|
4856
|
-
* The type of the media
|
|
4857
|
-
* @zh 媒体的类型
|
|
4858
|
-
* @defaultValue 'Video'
|
|
4859
|
-
* @Android
|
|
4860
|
-
* @iOS
|
|
4861
|
-
* @Harmony
|
|
4862
|
-
*/
|
|
4863
|
-
as?: 'Video' | 'Audio';
|
|
4864
|
-
/**
|
|
4865
|
-
* The player starts playing.
|
|
4866
|
-
* @zh 播放器开始播放。
|
|
4867
|
-
* @defaultValue undefined
|
|
4868
|
-
* @eventProperty
|
|
4869
|
-
* @Android
|
|
4870
|
-
* @iOS
|
|
4871
|
-
* @Harmony
|
|
4872
|
-
*/
|
|
4873
|
-
onPlay?: () => void;
|
|
4874
|
-
/**
|
|
4875
|
-
* The player is paused.
|
|
4876
|
-
* @zh 播放器暂停。
|
|
4877
|
-
* @defaultValue undefined
|
|
4878
|
-
* @eventProperty
|
|
4879
|
-
* @Android
|
|
4880
|
-
* @iOS
|
|
4881
|
-
* @Harmony
|
|
4882
|
-
*/
|
|
4883
|
-
onPause?: () => void;
|
|
4884
|
-
/**
|
|
4885
|
-
* The player is stopped.
|
|
4886
|
-
* @zh 播放器停止。
|
|
4887
|
-
* @defaultValue undefined
|
|
4888
|
-
* @eventProperty
|
|
4889
|
-
* @Android
|
|
4890
|
-
* @iOS
|
|
4891
|
-
* @Harmony
|
|
4892
|
-
*/
|
|
4893
|
-
onStop?: () => void;
|
|
4894
|
-
/**
|
|
4895
|
-
* The player is seek.
|
|
4896
|
-
* @zh 播放器搜索。
|
|
4897
|
-
* @defaultValue undefined
|
|
4898
|
-
* @eventProperty
|
|
4899
|
-
* @Android
|
|
4900
|
-
* @iOS
|
|
4901
|
-
*/
|
|
4902
|
-
onSeek?: (willPlay: boolean) => void;
|
|
4903
|
-
/**
|
|
4904
|
-
* The player finish playing.
|
|
4905
|
-
* @zh 播放器播放结束。
|
|
4906
|
-
* @defaultValue undefined
|
|
4907
|
-
* @eventProperty
|
|
4908
|
-
* @Android
|
|
4909
|
-
* @iOS
|
|
4910
|
-
* @Harmony
|
|
4911
|
-
*/
|
|
4912
|
-
onEnded?: () => void;
|
|
4913
|
-
/**
|
|
4914
|
-
* The src is changed
|
|
4915
|
-
* @zh 源文件发生变化
|
|
4916
|
-
* @defaultValue undefined
|
|
4917
|
-
* @eventProperty
|
|
4918
|
-
* @Android
|
|
4919
|
-
* @iOS
|
|
4920
|
-
* @Harmony
|
|
4921
|
-
*/
|
|
4922
|
-
onSrcChanged?: () => void;
|
|
4923
|
-
/**
|
|
4924
|
-
* The player receives an error.
|
|
4925
|
-
* @zh 播放器接收到错误信息。
|
|
4926
|
-
* @defaultValue undefined
|
|
4927
|
-
* @eventProperty
|
|
4928
|
-
* @Android
|
|
4929
|
-
* @iOS
|
|
4930
|
-
* @Harmony
|
|
4931
|
-
*/
|
|
4932
|
-
onError?: (e: {
|
|
4933
|
-
errorCode: number;
|
|
4934
|
-
errorMsg: string;
|
|
4935
|
-
}) => void;
|
|
4936
|
-
/**
|
|
4937
|
-
* The player's progress is updated
|
|
4938
|
-
* @zh 播放器进度更新
|
|
4939
|
-
* @defaultValue undefined
|
|
4940
|
-
* @eventProperty
|
|
4941
|
-
* @Android
|
|
4942
|
-
* @iOS
|
|
4943
|
-
* @Harmony
|
|
4944
|
-
*/
|
|
4945
|
-
onTimeUpdate?: (e: {
|
|
4946
|
-
detail: {
|
|
4947
|
-
current: number;
|
|
4948
|
-
total: number;
|
|
4949
|
-
};
|
|
4950
|
-
}) => void;
|
|
4951
|
-
/**
|
|
4952
|
-
* If you access gecko resources, the loading is asynchronous
|
|
4953
|
-
* @zh 如果访问 gecko 资源,加载是异步的
|
|
4954
|
-
* @defaultValue undefined
|
|
4955
|
-
* @eventProperty
|
|
4956
|
-
* @Android
|
|
4957
|
-
* @iOS
|
|
4958
|
-
*/
|
|
4959
|
-
onRedirected?: () => void;
|
|
4960
|
-
/**
|
|
4961
|
-
* Triggered when the video starts rendering the first frame
|
|
4962
|
-
* @zh 视频开始渲染首帧时触发
|
|
4963
|
-
* @defaultValue undefined
|
|
4964
|
-
* @eventProperty
|
|
4965
|
-
* @Android
|
|
4966
|
-
* @iOS
|
|
4967
|
-
* @Harmony
|
|
4968
|
-
*/
|
|
4969
|
-
onFirstFrame?: () => void;
|
|
4970
|
-
/**
|
|
4971
|
-
* The player is ready to play.
|
|
4972
|
-
* @zh 播放器准备好播放。
|
|
4973
|
-
* @defaultValue undefined
|
|
4974
|
-
* @eventProperty
|
|
4975
|
-
* @Android
|
|
4976
|
-
* @iOS
|
|
4977
|
-
*/
|
|
4978
|
-
onPrepared?: () => void;
|
|
4979
|
-
/**
|
|
4980
|
-
* The player is visible. `scene` and `videoengineId` should be specified.
|
|
4981
|
-
* @zh 播放器可见。应该指定 `scene` 和 `videoengineId`。
|
|
4982
|
-
* @defaultValue undefined
|
|
4983
|
-
* @eventProperty
|
|
4984
|
-
* @Android
|
|
4985
|
-
* @iOS
|
|
4986
|
-
*/
|
|
4987
|
-
onAppear?: () => void;
|
|
4988
|
-
/**
|
|
4989
|
-
* The player is invisible. `scene` and `videoengineId` should be specified.
|
|
4990
|
-
* @zh 播放器不可见。应该指定 `scene` 和 `videoengineId`。
|
|
4991
|
-
* @defaultValue undefined
|
|
4992
|
-
* @eventProperty
|
|
4993
|
-
* @Android
|
|
4994
|
-
* @iOS
|
|
4995
|
-
*/
|
|
4996
|
-
onDisappear?: () => void;
|
|
4997
|
-
}
|
|
4998
|
-
|
|
4999
|
-
declare interface VideoEngineRef {
|
|
5000
|
-
/**
|
|
5001
|
-
* Start playing. You should start play after resource redirect (after `onRedirected`)
|
|
5002
|
-
* @zh 开始播放。你应该在资源重定向后(`onRedirected`)开始播放
|
|
5003
|
-
* @remarks When this operation is successful, it only means that the operation was successfully submitted to the player, and does not mean that the player status has changed.
|
|
5004
|
-
* @Android
|
|
5005
|
-
* @iOS
|
|
5006
|
-
* @Harmony
|
|
5007
|
-
*/
|
|
5008
|
-
play: (
|
|
5009
|
-
/**
|
|
5010
|
-
* Invocation callback,errCode refer to {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5011
|
-
* @zh 调用回调,errCode 参考 {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5012
|
-
* @Android
|
|
5013
|
-
* @iOS
|
|
5014
|
-
* @Harmony
|
|
5015
|
-
*/
|
|
5016
|
-
callback?: VideoEnginePlaybackCallback) => void;
|
|
5017
|
-
/**
|
|
5018
|
-
* Pause playing
|
|
5019
|
-
* @zh 暂停播放
|
|
5020
|
-
* @remarks When this operation is successful, it only means that the operation was successfully submitted to the player, and does not mean that the player status has changed.
|
|
5021
|
-
* @Android
|
|
5022
|
-
* @iOS
|
|
5023
|
-
* @Harmony
|
|
5024
|
-
*/
|
|
5025
|
-
pause: (
|
|
5026
|
-
/**
|
|
5027
|
-
* Invocation callback,errCode refer to {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5028
|
-
* @zh 调用回调,errCode 参考 {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5029
|
-
* @Android
|
|
5030
|
-
* @iOS
|
|
5031
|
-
*/
|
|
5032
|
-
callback?: VideoEnginePlaybackCallback) => void;
|
|
5033
|
-
/**
|
|
5034
|
-
* Stop playing
|
|
5035
|
-
* @zh 停止播放
|
|
5036
|
-
* @remarks When this operation is successful, it only means that the operation was successfully submitted to the player, and does not mean that the player status has changed.
|
|
5037
|
-
* @Android
|
|
5038
|
-
* @iOS
|
|
5039
|
-
* @Harmony
|
|
5040
|
-
*/
|
|
5041
|
-
stop: (
|
|
5042
|
-
/**
|
|
5043
|
-
* Invocation callback,errCode refer to {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5044
|
-
* @zh 调用回调,errCode 参考 {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5045
|
-
* @Android
|
|
5046
|
-
* @iOS
|
|
5047
|
-
*/
|
|
5048
|
-
callback?: VideoEnginePlaybackCallback) => void;
|
|
5049
|
-
/**
|
|
5050
|
-
* Seek
|
|
5051
|
-
* @zh 定位播放位置
|
|
5052
|
-
* @remarks When this operation is successful, it only means that the operation was successfully submitted to the player, and does not mean that the player status has changed.
|
|
5053
|
-
* @Android
|
|
5054
|
-
* @iOS
|
|
5055
|
-
*/
|
|
5056
|
-
seek: (position: number, play: boolean,
|
|
5057
|
-
/**
|
|
5058
|
-
* Invocation callback,errCode refer to {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5059
|
-
* @zh 调用回调,errCode 参考 {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5060
|
-
* @Android
|
|
5061
|
-
* @iOS
|
|
5062
|
-
*/
|
|
5063
|
-
callback?: VideoEnginePlaybackCallback) => void;
|
|
5064
|
-
/**
|
|
5065
|
-
* Replay, it is recommended to call it after the playback ends.
|
|
5066
|
-
* @zh 重新播放,建议在播放结束后调用
|
|
5067
|
-
* @remarks When this operation is successful, it only means that the operation was successfully submitted to the player, and does not mean that the player status has changed.
|
|
5068
|
-
* @Android
|
|
5069
|
-
* @iOS
|
|
5070
|
-
*/
|
|
5071
|
-
replay: (
|
|
5072
|
-
/**
|
|
5073
|
-
* Whether to play after replay. If not, it will be stopped at the first frame.
|
|
5074
|
-
* @zh 是否在重新播放后开始播放。如果为 false,则会在第一帧停止。
|
|
5075
|
-
* @Android
|
|
5076
|
-
* @iOS
|
|
5077
|
-
*/
|
|
5078
|
-
play: boolean,
|
|
5079
|
-
/**
|
|
5080
|
-
* Invocation callback,errCode refer to {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5081
|
-
* @zh 调用回调,errCode 参考 {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5082
|
-
* @Android
|
|
5083
|
-
* @iOS
|
|
5084
|
-
*/
|
|
5085
|
-
callback?: VideoEnginePlaybackCallback) => void;
|
|
5086
|
-
/**
|
|
5087
|
-
* Prepare manually.
|
|
5088
|
-
* @zh 手动准备。
|
|
5089
|
-
* @Android
|
|
5090
|
-
* @iOS
|
|
5091
|
-
* @Harmony
|
|
5092
|
-
*/
|
|
5093
|
-
prepare: (
|
|
5094
|
-
/**
|
|
5095
|
-
* Invocation callback,errCode refer to {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5096
|
-
* @zh 调用回调,errCode 参考 {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5097
|
-
* @Android
|
|
5098
|
-
* @iOS
|
|
5099
|
-
*/
|
|
5100
|
-
callback?: VideoEnginePlaybackCallback) => void;
|
|
5101
|
-
/**
|
|
5102
|
-
* Get playback duration.
|
|
5103
|
-
* @zh 获取播放时长。
|
|
5104
|
-
* @Android
|
|
5105
|
-
* @iOS
|
|
5106
|
-
* @Harmony
|
|
5107
|
-
*/
|
|
5108
|
-
getDuration: (
|
|
5109
|
-
/**
|
|
5110
|
-
* Invocation callback,errCode refer to {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5111
|
-
* @zh 调用回调,errCode 参考 {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5112
|
-
* @Android
|
|
5113
|
-
* @iOS
|
|
5114
|
-
*/
|
|
5115
|
-
callback?: (success: boolean,
|
|
5116
|
-
/**
|
|
5117
|
-
* Duration, in ms.
|
|
5118
|
-
* @zh 时长,以毫秒为单位
|
|
5119
|
-
* @Android
|
|
5120
|
-
* @iOS
|
|
5121
|
-
*/
|
|
5122
|
-
duration: number, errCode?: number, errMsg?: string) => void) => void;
|
|
5123
|
-
/**
|
|
5124
|
-
* Enter full screen. It need client impl, {@link https://lynx.bytedance.net/docs/frontend/components/x-video-engine | see more}.
|
|
5125
|
-
* @zh 进入全屏。需要客户端实现,{@link https://lynx.bytedance.net/docs/frontend/components/x-video-engine | 了解更多}.
|
|
5126
|
-
* @Android
|
|
5127
|
-
* @iOS
|
|
5128
|
-
*/
|
|
5129
|
-
enterFullScreen: (
|
|
5130
|
-
/**
|
|
5131
|
-
* Invocation callback,errCode refer to {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5132
|
-
* @zh 调用回调,errCode 参考 {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5133
|
-
* @Android
|
|
5134
|
-
* @iOS
|
|
5135
|
-
*/
|
|
5136
|
-
callback?: VideoEnginePlaybackCallback) => void;
|
|
5137
|
-
/**
|
|
5138
|
-
* Exit full screen. It need client impl, {@link https://lynx.bytedance.net/docs/frontend/components/x-video-engine | see more}.
|
|
5139
|
-
* @zh 退出全屏。需要客户端实现,{@link https://lynx.bytedance.net/docs/frontend/components/x-video-engine | 了解更多}.
|
|
5140
|
-
* @Android
|
|
5141
|
-
* @iOS
|
|
5142
|
-
*/
|
|
5143
|
-
exitFullScreen: (
|
|
5144
|
-
/**
|
|
5145
|
-
* Invocation callback,errCode refer to {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5146
|
-
* @zh 调用回调,errCode 参考 {@link https://lynx.bytedance.net/docs/frontend/lynx-api/selector-query/selector-query | SelectorQuery}
|
|
5147
|
-
* @Android
|
|
5148
|
-
* @iOS
|
|
5149
|
-
*/
|
|
5150
|
-
callback?: VideoEnginePlaybackCallback) => void;
|
|
5151
|
-
/**
|
|
5152
|
-
* Reset the Video. It is required to reset the Video if it is reused. Will be deprecated after being refactored by MTS.
|
|
5153
|
-
* @zh 重置视频。如果要重复使用视频,则需要重置视频。重构后将弃用。
|
|
5154
|
-
* @Android
|
|
5155
|
-
* @iOS
|
|
5156
|
-
* @Harmony
|
|
5157
|
-
*/
|
|
5158
|
-
reset: () => void;
|
|
5159
|
-
/**
|
|
5160
|
-
* Handle the poster manually
|
|
5161
|
-
* @zh 手动处理海报
|
|
5162
|
-
* @Android
|
|
5163
|
-
* @iOS
|
|
5164
|
-
* @Harmony
|
|
5165
|
-
*/
|
|
5166
|
-
operatePoster: (display: boolean) => void;
|
|
5167
|
-
}
|
|
5168
|
-
|
|
5169
4079
|
export declare interface VideoProps extends VideoEngineProps {
|
|
5170
4080
|
}
|
|
5171
4081
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doubao-dev/framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0-canary-99e80cd87-20261106061422",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"types.d.ts"
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@lynx-js/types": "4.2
|
|
71
|
+
"@lynx-js/types": "4.4.2",
|
|
72
72
|
"@types/react": "18.3.27"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|