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
541cc8dd
Commit
541cc8dd
authored
Apr 10, 2021
by
乐宝呗666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改视频市场为30s
parent
fc8d454a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
commitTab.vue
src/views/user/components/commitTab.vue
+12
-7
No files found.
src/views/user/components/commitTab.vue
View file @
541cc8dd
...
...
@@ -200,25 +200,30 @@ export default {
this
.
showBoard
=
false
;
},
beforeVideo
(
file
)
{
console
.
log
(
file
)
this
.
timeOutVideo
=
false
if
(
Array
.
isArray
(
file
)){
file
.
forEach
(
item
=>
{
this
.
createVideo
(
item
)
})
}
else
{
this
.
createVideo
(
file
)
}
return
true
},
createVideo
(
file
){
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
console
.
log
(
duration
)
if
(
duration
>
31
)
{
this
.
timeOutVideo
=
true
this
.
fileList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
file
.
lastModified
===
file
.
lastModified
){
this
.
fileList
.
splice
(
index
,
1
)
}
})
this
.
fileList
=
[]
this
.
$toast
.
fail
(
"上传视频时长不能超过30秒"
);
return
false
;
}
});
return
true
},
// 打开日历
onDisplay
()
{
...
...
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