Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
807
Issues
807
List
Boards
Labels
Service Desk
Milestones
Merge Requests
54
Merge Requests
54
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
81deca1c
Commit
81deca1c
authored
1 hour ago
by
Ben Hayward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for feedback
parent
4a5a557d
feat/offscreen-pause-video-1418
1 merge request
!446
WIP: [Sprint/InterestingIguana](bug): Pause video when scrolled offscreen #1418
Pipeline
#70798806
canceled with stages
in 1 minute and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
video.component.html
src/app/modules/media/components/video/video.component.html
+0
-1
video.component.ts
src/app/modules/media/components/video/video.component.ts
+2
-3
No files found.
src/app/modules/media/components/video/video.component.html
View file @
81deca1c
...
...
@@ -29,7 +29,6 @@
<i
*
ngIf=
"!playerRef.isPlaying() && !playerRef.isLoading()"
class=
"material-icons minds-video-play-icon"
(
click
)="
playerRef
.
play
()"
#
playButton
>
play_circle_outline
</i>
<ng-content></ng-content>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/media/components/video/video.component.ts
View file @
81deca1c
...
...
@@ -27,12 +27,11 @@ export class MindsVideoComponent {
@
ViewChild
(
'
progressBar
'
,
{
static
:
false
})
progressBar
:
MindsVideoProgressBar
;
@
ViewChild
(
'
volumeSlider
'
,
{
static
:
false
})
volumeSlider
:
MindsVideoVolumeSlider
;
@
ViewChild
(
'
player
'
,
{
static
:
false
})
playerRef
:
MindsPlayerInterface
;
@
ViewChild
(
'
playButton
'
,
{
static
:
false
})
playButton
:
ElementRef
;
@
ViewChild
(
'
player
'
,
{
static
:
false
})
playerRef
:
any
;
@
HostListener
(
'
window:scroll
'
)
checkScroll
()
{
if
(
!
this
.
isInView
(
this
.
play
Button
.
nativeElement
)
&&
this
.
playerRef
.
isPlaying
())
{
if
(
!
this
.
isInView
(
this
.
play
erRef
.
nativeElement
)
&&
this
.
playerRef
.
isPlaying
())
{
this
.
playerRef
.
pause
();
}
}
...
...
This diff is collapsed.
Click to expand it.
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