FFFF
Skip to content

新增video视频组件#174

Merged
oasis-cloud merged 57 commits intojdf2e:mainfrom
junjun666:main
Aug 1, 2022
Merged

新增video视频组件#174
oasis-cloud merged 57 commits intojdf2e:mainfrom
junjun666:main

Conversation

@junjun666
Copy link
Copy Markdown
Contributor

1.video视频组件开发
2.单元测试开发检测
3.demo多语言支持
4.文档多语言支持

junjun666 and others added 30 commits December 8, 2021 17:56
}
const rootRef = useRef<HTMLVideoElement>(null)

useEffect(() => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

空的 useEffect

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修复~

Comment thread src/packages/video/video.tsx Outdated
if (options.playsinline) {
videoRef.setAttribute(
'playsinline',
JSON.stringify(options.playsinline)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSON的操作容易抛出错误

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改String判断

Comment thread src/packages/video/video.tsx Outdated
Comment thread src/packages/video/demo.scss Outdated
@@ -0,0 +1,19 @@
.demo {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可采用 demo-video 来命名,demo的打包没有采用module css

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已增加demo-video命名

@yangjinjun3 yangjinjun3 reopened this Jul 27, 2022
Comment thread src/packages/video/doc.md
| 字段 | 说明 | 类型 | 默认值 |
| ------------------- | ------------------------------------------ | ------- | -------- |
| source | 视频地址和类型设置 | Object | - |
| options | 控制视频播放属性 | Object | required |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.volume 不支持吗?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

暂不支持

Comment thread src/packages/video/doc.md Outdated
| options.loop | 是否循环播放 | Boolean | false |
| options.controls | 是否展示操作栏 | Boolean | true |
| options.muted | 是否静音 | Boolean | false |
| options.disabled | 禁用操作(如循环播放的背景图,禁止操作) | Boolean | false |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabled 的作用是啥? 感觉加不加效果一样

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档已修改~

poster: '',
playsinline: false,
disabled: false,
loop: false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看Vue版本有touchPlay: false,preload: ''这两个默认值,确认下React是否需要加?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React目前暂不加

@oasis-cloud oasis-cloud merged commit 56c21ed into jdf2e:main Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

< 19 /div> 0