yootd 0.0.86 → 0.0.87-test

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.
@@ -0,0 +1,90 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import './index.scss';
3
+ export interface VideoPlayerRef {
4
+ play: () => void;
5
+ pause: () => void;
6
+ setVideoCurrentTime: (time: number) => void;
7
+ useFaceExpression: (type: 'emotion' | 'character' | 'anchor' | 'pose', use: boolean) => void;
8
+ currentTime: () => number;
9
+ }
10
+ export interface VideoPlayerProps {
11
+ /**
12
+ * 视频地址
13
+ */
14
+ src: string;
15
+ /**
16
+ * 是否为直播视频
17
+ */
18
+ isLive?: boolean;
19
+ /**
20
+ * 是否展示控制面板
21
+ */
22
+ controls?: boolean;
23
+ /**
24
+ * 是否自动播放
25
+ */
26
+ autoPlay?: boolean;
27
+ /**
28
+ * 是否获取视频流
29
+ */
30
+ videoEnable?: boolean;
31
+ /**
32
+ * 是否获取音频流
33
+ */
34
+ audioEnable?: boolean;
35
+ /**
36
+ * 是否静音
37
+ */
38
+ muted?: boolean;
39
+ /**
40
+ * 是否在微信小程序中使用
41
+ */
42
+ miniProgram?: boolean;
43
+ /**
44
+ * 是否旋转全屏
45
+ */
46
+ rotateWhenFullScreen?: boolean;
47
+ /**
48
+ * 视频封面
49
+ */
50
+ poster?: string;
51
+ /**
52
+ * 是否重试
53
+ */
54
+ retry?: boolean;
55
+ /**
56
+ * 重试间隔
57
+ */
58
+ retryInterval?: number;
59
+ /**
60
+ * 额外样式
61
+ */
62
+ style?: CSSProperties;
63
+ /**
64
+ * 类名,用于覆盖默认样式
65
+ */
66
+ className?: string;
67
+ /**
68
+ * 是否显示截图按钮
69
+ */
70
+ showCapture?: boolean;
71
+ /**
72
+ * 播放状态变化回调
73
+ * @param isPlaying
74
+ */
75
+ onPlayStateChange?: (isPlaying: boolean) => void;
76
+ /**
77
+ * 播放时间变化回调
78
+ * @param currentTime
79
+ */
80
+ onCurrentTimeChange?: (currentTime: number) => void;
81
+ /**
82
+ * 截图回调
83
+ */
84
+ onCapture?: (base64: string) => void;
85
+ /**
86
+ * 视频错误回调
87
+ */
88
+ onError?: (error: string) => void;
89
+ }
90
+ export declare const VideoPlayer: React.ForwardRefExoticComponent<VideoPlayerProps & React.RefAttributes<VideoPlayerRef>>;