Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
m0_68066342
uni-app
提交
3d28531b
U
uni-app
项目概览
m0_68066342
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3d28531b
编写于
5月 12, 2020
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: H5 端 video 支持 show-center-play-btn
上级
fc6be3cb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
32 addition
and
25 deletion
+32
-25
src/platforms/h5/view/components/video/index.vue
src/platforms/h5/view/components/video/index.vue
+32
-25
未找到文件。
src/platforms/h5/view/components/video/index.vue
浏览文件 @
3d28531b
<
template
>
<uni-video
:id=
"id"
v-on=
"$listeners"
v-on=
"$listeners"
>
<div
ref=
"container"
...
...
@@ -15,7 +15,7 @@
>
<video
ref=
"video"
:style=
"
{o
pacity:!start?0.8:1,o
bjectFit:objectFit}"
:style=
"
{objectFit:objectFit}"
:muted="muted"
:loop="loop"
:src="srcSync"
...
...
@@ -42,7 +42,7 @@
<div
v-show=
"controlsShow"
class=
"uni-video-bar uni-video-bar-full"
@
click.stop
@
click.stop
>
<div
class=
"uni-video-controls"
>
<div
...
...
@@ -51,8 +51,8 @@
class="uni-video-control-button"
@click.stop="trigger"
/>
<div
class=
"uni-video-current-time"
>
{{
currentTime
|
time
}}
<div
class=
"uni-video-current-time"
>
{{
currentTime
|
time
}}
</div>
<div
ref=
"progress"
...
...
@@ -62,19 +62,19 @@
<div
class=
"uni-video-progress"
>
<div
:style=
"
{width:buffered+'%'}"
class="uni-video-progress-buffered"
class="uni-video-progress-buffered"
/>
<div
ref=
"ball"
:style=
"
{left:progress+'%'}"
class="uni-video-ball"
class="uni-video-ball"
>
<div
class=
"uni-video-inner"
/>
</div>
</div>
</div>
<div
class=
"uni-video-duration"
>
{{
(
duration
||
durationTime
)
|
time
}}
<div
class=
"uni-video-duration"
>
{{
(
duration
||
durationTime
)
|
time
}}
</div>
</div>
<div
...
...
@@ -82,8 +82,8 @@
:class=
"
{'uni-video-danmu-button-active':enableDanmuSync}"
class="uni-video-danmu-button"
@click.stop="triggerDanmu"
>
弹幕
>
弹幕
</div>
<div
v-show=
"showFullscreenBtn"
...
...
@@ -96,27 +96,27 @@
v-show=
"start&&enableDanmuSync"
ref=
"danmu"
style=
"z-index: 0;"
class=
"uni-video-danmu"
class=
"uni-video-danmu"
/>
<div
v-if=
"
!start
"
v-if=
"
centerPlayBtnShow
"
class=
"uni-video-cover"
@
click.stop
@
click.stop
>
<div
class=
"uni-video-cover-play-button"
@
click.stop=
"play"
@
click.stop=
"play"
/>
<p
class=
"uni-video-cover-duration"
>
{{
(
duration
||
durationTime
)
|
time
}}
<p
class=
"uni-video-cover-duration"
>
{{
(
duration
||
durationTime
)
|
time
}}
</p>
</div>
<div
:class=
"
{'uni-video-toast-volume':gestureType==='volume'}"
class="uni-video-toast"
class="uni-video-toast"
>
<div
class=
"uni-video-toast-title"
>
音量
<div
class=
"uni-video-toast-title"
>
音量
</div>
<svg
class=
"uni-video-toast-icon"
...
...
@@ -133,7 +133,7 @@
<div
class=
"uni-video-toast-value"
>
<div
:style=
"
{width:volumeNew*100+'%'}"
class="uni-video-toast-value-content"
class="uni-video-toast-value-content"
>
<div
class=
"uni-video-toast-volume-grids"
>
<div
...
...
@@ -147,10 +147,10 @@
</div>
<div
:class=
"
{'uni-video-toast-progress':gestureType=='progress'}"
class="uni-video-toast"
class="uni-video-toast"
>
<div
class=
"uni-video-toast-title"
>
{{
currentTimeNew
|
time
}}
/
{{
durationTime
|
time
}}
<div
class=
"uni-video-toast-title"
>
{{
currentTimeNew
|
time
}}
/
{{
durationTime
|
time
}}
</div>
</div>
</div>
...
...
@@ -278,6 +278,10 @@ export default {
showPlayBtn
:
{
type
:
[
Boolean
,
String
],
default
:
true
},
showCenterPlayBtn
:
{
type
:
[
Boolean
,
String
],
default
:
true
}
},
data
()
{
...
...
@@ -306,8 +310,11 @@ export default {
}
},
computed
:
{
centerPlayBtnShow
()
{
return
this
.
controls
&&
this
.
showCenterPlayBtn
&&
!
this
.
start
},
controlsShow
()
{
return
this
.
start
&&
this
.
controls
&&
this
.
controlsVisible
return
!
this
.
centerPlayBtnShow
&&
this
.
controls
&&
this
.
controlsVisible
},
autoHideContorls
()
{
return
this
.
controlsShow
&&
this
.
playing
&&
!
this
.
controlsTouching
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录