提交 | 用户 | 时间
|
820397
|
1 |
import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' |
H |
2 |
|
|
3 |
/** 视频播放属性 */ |
|
4 |
export interface VideoPlayerProperty { |
|
5 |
// 视频链接 |
|
6 |
videoUrl: string |
|
7 |
// 封面链接 |
|
8 |
posterUrl: string |
|
9 |
// 是否自动播放 |
|
10 |
autoplay: boolean |
|
11 |
// 组件样式 |
|
12 |
style: VideoPlayerStyle |
|
13 |
} |
|
14 |
|
|
15 |
// 视频播放样式 |
|
16 |
export interface VideoPlayerStyle extends ComponentStyle { |
|
17 |
// 视频高度 |
|
18 |
height: number |
|
19 |
} |
|
20 |
|
|
21 |
// 定义组件 |
|
22 |
export const component = { |
|
23 |
id: 'VideoPlayer', |
|
24 |
name: '视频播放', |
|
25 |
icon: 'ep:video-play', |
|
26 |
property: { |
|
27 |
videoUrl: '', |
|
28 |
posterUrl: '', |
|
29 |
autoplay: false, |
|
30 |
style: { |
|
31 |
bgType: 'color', |
|
32 |
bgColor: '#fff', |
|
33 |
marginBottom: 8, |
|
34 |
height: 300 |
|
35 |
} as VideoPlayerStyle |
|
36 |
} |
|
37 |
} as DiyComponent<VideoPlayerProperty> |