mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
feat: video 组件支持配置循环播放 (#6808)
This commit is contained in:
parent
0ed57be2f0
commit
f299743428
@ -73,6 +73,7 @@ order: 71
|
||||
| videoType | `string` | | 指定直播视频格式 |
|
||||
| poster | `string` | | 视频封面地址 |
|
||||
| muted | `boolean` | | 是否静音 |
|
||||
| loop | `boolean` | | 是否循环播放 |
|
||||
| autoPlay | `boolean` | | 是否自动播放 |
|
||||
| rates | `array` | | 倍数,格式为`[1.0, 1.5, 2.0]` |
|
||||
| frames | `object` | | key 是时刻信息,value 可以可以为空,可有设置为图片地址,请看上方示例 |
|
||||
|
@ -78,6 +78,11 @@ export interface VideoSchema extends BaseSchema {
|
||||
*/
|
||||
muted?: boolean;
|
||||
|
||||
/**
|
||||
* 是否循环播放
|
||||
*/
|
||||
loop?: boolean;
|
||||
|
||||
/**
|
||||
* 配置播放器 className
|
||||
*/
|
||||
@ -636,8 +641,7 @@ export default class Video extends React.Component<VideoProps, VideoState> {
|
||||
muted,
|
||||
name,
|
||||
data,
|
||||
amisConfig,
|
||||
locals,
|
||||
loop,
|
||||
isLive,
|
||||
minVideoDuration,
|
||||
videoType,
|
||||
@ -690,6 +694,7 @@ export default class Video extends React.Component<VideoProps, VideoState> {
|
||||
autoPlay={autoPlay}
|
||||
muted={muted}
|
||||
aspectRatio={aspectRatio}
|
||||
loop={loop}
|
||||
>
|
||||
{rates && rates.length ? (
|
||||
<ControlBar>
|
||||
|
Loading…
Reference in New Issue
Block a user