Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Muse
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
Muse
Commits
4ae81766
Commit
4ae81766
authored
Dec 03, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视屏暂停不自动播放问题
parent
50d323b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
index.vue
src/views/index.vue
+8
-3
No files found.
src/views/index.vue
View file @
4ae81766
...
...
@@ -145,7 +145,7 @@
</div>
</div>
<div
class=
"video_box"
:class=
"movieShow ? 'video_box_show' : ''"
>
<video
v-if=
"movieShow"
@
error=
"videoErr"
@
ended=
"nextVideo(true)"
style=
"width:100%;height:100%;"
ref=
"video"
:src=
"movie[movieNum]"
autoplay=
"autoplay"
controls=
"controls"
>
您的浏览器不支持视频播放
</video>
<video
v-if=
"movieShow"
@
error=
"videoErr"
@
ended=
"nextVideo(true)"
style=
"width:100%;height:100%;"
id=
"video"
ref=
"video"
:src=
"movie[movieNum]"
autoplay=
"autoplay"
controls=
"controls"
>
您的浏览器不支持视频播放
</video>
</div>
</div>
</
template
>
...
...
@@ -194,7 +194,7 @@ export default {
movieShow
:
false
,
movieTime
:
0
,
movieTimmer
:
null
,
fiveMinutes
:
1
,
fiveMinutes
:
300
,
};
},
mounted
()
{
...
...
@@ -235,7 +235,7 @@ export default {
videoErr
:
function
(){
this
.
movieShow
=
false
this
.
movieTime
=
0
this
.
fiveMinutes
=
9999
this
.
fiveMinutes
=
9999
9
},
getMovieTimmer
:
function
()
{
if
(
this
.
movieTime
<
this
.
fiveMinutes
)
{
...
...
@@ -243,6 +243,11 @@ export default {
}
else
if
(
this
.
movieTime
>=
this
.
fiveMinutes
&&
!
this
.
movieShow
)
{
this
.
movieShow
=
true
}
else
{
let
st
=
document
.
getElementsByTagName
(
'video'
)[
0
].
readyState
let
play
=
document
.
getElementsByTagName
(
'video'
)[
0
].
paused
if
(
st
==
4
&&
play
)
{
document
.
getElementsByTagName
(
'video'
)[
0
].
play
()
}
return
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment