Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
national_museum_vod-H5
Project
Project
Details
Activity
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
fubaole
national_museum_vod-H5
Commits
fc8d454a
Commit
fc8d454a
authored
Apr 10, 2021
by
乐宝呗666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改20s问题
parent
3a7b46a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
commitTab.vue
src/views/user/components/commitTab.vue
+4
-3
No files found.
src/views/user/components/commitTab.vue
View file @
fc8d454a
...
...
@@ -97,7 +97,7 @@
<img
src=
"@/assets/images/applets/tip.png"
alt
/>
<span>
最多支持上传
<b>
3
</b>
段视频,每段时长
<b>
2
0s
</b>
。
<b>
3
</b>
段视频,每段时长
<b>
3
0s
</b>
。
</span>
</div>
</div>
...
...
@@ -200,20 +200,21 @@ export default {
this
.
showBoard
=
false
;
},
beforeVideo
(
file
)
{
console
.
log
(
file
)
this
.
timeOutVideo
=
false
let
_URL
=
window
.
URL
||
window
.
webkitURL
;
let
videoUrl
=
_URL
.
createObjectURL
(
file
);
let
audioElement
=
new
Audio
(
videoUrl
);
audioElement
.
addEventListener
(
"loadedmetadata"
,
()
=>
{
let
duration
=
audioElement
.
duration
;
//时长为秒,小数,182.36
if
(
duration
>
2
1
)
{
if
(
duration
>
3
1
)
{
this
.
timeOutVideo
=
true
this
.
fileList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
file
.
lastModified
===
file
.
lastModified
){
this
.
fileList
.
splice
(
index
,
1
)
}
})
this
.
$toast
.
fail
(
"上传视频时长不能超过
2
0秒"
);
this
.
$toast
.
fail
(
"上传视频时长不能超过
3
0秒"
);
return
false
;
}
});
...
...
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