Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
ww_video
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
ww_video
Commits
feec6013
Commit
feec6013
authored
Aug 24, 2020
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 封面
parent
ed3dd05c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
26 deletions
+7
-26
form.component.html
src/app/form/form.component.html
+5
-17
form.component.ts
src/app/form/form.component.ts
+2
-9
No files found.
src/app/form/form.component.html
View file @
feec6013
...
@@ -18,14 +18,11 @@
...
@@ -18,14 +18,11 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
nz-col
nzSpan=
"4"
class=
"-col-4"
style=
" display: flex;
<div
nz-col
nzSpan=
"8"
class=
"-col-4"
style=
"display: flex; justify-content: center;"
>
justify-content: center;"
>
<app-upload-video
<app-upload-video
(
videoUploaded
)="
onVideoUploadSuccess
($
event
)"
(
videoUploaded
)="
onVideoUploadSuccess
($
event
)"
[
item
]="
item
"
[
item
]="
item
"
[
videoUrl
]="
item
.
contentObj
.
video_url
"
></app-upload-video>
[
videoUrl
]="
item
.
contentObj
.
video_url
"
></app-upload-video>
</div>
<div
nz-col
nzSpan=
"4"
style=
"text-align: center;"
>
<button
nz-button
nzType=
"primary"
<button
nz-button
nzType=
"primary"
style=
"margin-bottom: 1rem"
style=
"margin-bottom: 1rem"
(
click
)="
setVideoCover
()"
>
(
click
)="
setVideoCover
()"
>
...
@@ -33,13 +30,4 @@
...
@@ -33,13 +30,4 @@
</button>
</button>
</div>
</div>
</div>
</div>
<div
class=
"row"
style=
"margin-top: 1rem"
*
ngIf=
"item.contentObj.video_url"
>
<div
class=
"col-8"
>
<img
*
ngIf=
"item.contentObj.pic_id"
[
src
]="
item
.
contentObj
.
pic_id
"
style=
"width:100%;overflow: hidden;box-shadow: 0 0 20px 0px #444;"
/>
</div>
</div>
src/app/form/form.component.ts
View file @
feec6013
...
@@ -101,16 +101,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -101,16 +101,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
nzMessageService
.
error
(
'
video error
'
);
this
.
nzMessageService
.
error
(
'
video error
'
);
}
}
videoSeeked
(
evt
)
{
videoSeeked
(
evt
)
{
return
const
video
=
evt
.
target
;
if
(
video
.
src
&&
video
.
src
.
startsWith
(
'
blob:
'
))
{
return
;
return
;
}
}
if
(
!
this
.
item
.
contentObj
.
pic_id
)
{
this
.
setVideoCover
();
this
.
newVideoCover
=
false
;
}
}
setVideoCover
()
{
setVideoCover
()
{
if
(
!
this
.
videoNode
)
{
if
(
!
this
.
videoNode
)
{
...
@@ -134,6 +126,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -134,6 +126,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
http
.
post
(
this
.
uploadUrl
,
formData
).
subscribe
(
this
.
http
.
post
(
this
.
uploadUrl
,
formData
).
subscribe
(
(
res
:
any
)
=>
{
(
res
:
any
)
=>
{
(
window
as
any
).
courseware
.
sendEvent
(
"
screenshot
"
,
{
"
url
"
:
res
.
url
},
this
.
saveKey
);
this
.
item
.
contentObj
.
pic_id
=
res
.
url
;
this
.
item
.
contentObj
.
pic_id
=
res
.
url
;
this
.
save
();
this
.
save
();
},
},
...
...
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