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
5238f44f
Commit
5238f44f
authored
Aug 09, 2020
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 播放问题
parent
46cde08c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
play.component.ts
src/app/play/play.component.ts
+18
-5
No files found.
src/app/play/play.component.ts
View file @
5238f44f
...
@@ -51,9 +51,7 @@ export class PlayComponent implements OnInit, OnDestroy, OnChanges, AfterViewIni
...
@@ -51,9 +51,7 @@ export class PlayComponent implements OnInit, OnDestroy, OnChanges, AfterViewIni
this
.
hasVideo
=
!!
this
.
data
.
contentObj
.
video_url
this
.
hasVideo
=
!!
this
.
data
.
contentObj
.
video_url
window
[
"
air
"
].
hideAirClassLoading
(
this
.
saveKey
,
this
.
data
);
window
[
"
air
"
].
hideAirClassLoading
(
this
.
saveKey
,
this
.
data
);
setTimeout
(()
=>
{
this
.
refresh
();
this
.
refresh
();
},
1000
);
},
this
.
saveKey
);
},
this
.
saveKey
);
}
}
...
@@ -99,15 +97,30 @@ export class PlayComponent implements OnInit, OnDestroy, OnChanges, AfterViewIni
...
@@ -99,15 +97,30 @@ export class PlayComponent implements OnInit, OnDestroy, OnChanges, AfterViewIni
if
(
!
this
.
videoNodeRef
)
{
if
(
!
this
.
videoNodeRef
)
{
return
;
return
;
}
}
if
(
!
this
.
player
)
{
this
.
ngAfterViewInit
();
}
if
(
!
this
.
player
)
{
return
;
}
this
.
initCover
=
false
;
this
.
initCover
=
false
;
if
(
this
.
player
.
paused
)
{
if
(
this
.
player
.
paused
)
{
this
.
player
.
play
();
const
playPromise
=
this
.
player
.
play
();
this
.
isPlayStarted
=
true
;
if
(
playPromise
!==
undefined
)
{
playPromise
.
then
(
_
=>
{
this
.
isPlayStarted
=
true
;
})
.
catch
(
error
=>
{
console
.
log
(
'
error
'
,
error
);
});
}
}
else
{
}
else
{
this
.
player
.
pause
();
this
.
player
.
pause
();
}
}
this
.
refresh
();
}
}
onTimeUpdate
(
event
)
{
onTimeUpdate
(
event
)
{
const
player
=
event
.
target
;
const
player
=
event
.
target
;
this
.
currentTime
=
player
.
currentTime
;
this
.
currentTime
=
player
.
currentTime
;
...
...
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