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
8c029ded
Commit
8c029ded
authored
35 minutes ago
by
Ben Hayward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commenting out lines
parent
81deca1c
feat/offscreen-pause-video-1418
1 merge request
!446
WIP: [Sprint/InterestingIguana](bug): Pause video when scrolled offscreen #1418
Pipeline
#70798892
canceled with stages
in 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
video.component.ts
src/app/modules/media/components/video/video.component.ts
+24
-23
No files found.
src/app/modules/media/components/video/video.component.ts
View file @
8c029ded
...
...
@@ -198,29 +198,30 @@ export class MindsVideoComponent {
setTimeout
(()
=>
this
.
playerRef
.
resumeFromTime
(
time
),
0
);
}
isVisible
()
{
if
(
this
.
autoplay
)
return
;
// if (!this.visibleplay)
// return;
if
(
!
this
.
guid
)
return
;
if
((
navigator
.
userAgent
.
match
(
/iPhone/i
))
||
(
navigator
.
userAgent
.
match
(
/iPod/i
)))
{
this
.
muted
=
false
;
return
;
}
/*var bounds = this.element.getBoundingClientRect();
if (bounds.top < this.scroll.view.clientHeight && bounds.top + (this.scroll.view.clientHeight / 2) >= 0) {
if (!this.torrentVideo.isPlaying()) {
this.torrentVideo.play();
}
} else {
if (this.torrentVideo.isPlaying()) {
// this.element.muted = true;
this.torrentVideo.pause();
}
}*/
}
// isVisible() {
// if (this.autoplay)
// return;
// // if (!this.visibleplay)
// // return;
// if (!this.guid)
// return;
// if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
// this.muted = false;
// return;
// }
// /*var bounds = this.element.getBoundingClientRect();
// if (bounds.top < this.scroll.view.clientHeight && bounds.top + (this.scroll.view.clientHeight / 2) >= 0) {
// if (!this.torrentVideo.isPlaying()) {
// this.torrentVideo.play();
// }
// } else {
// if (this.torrentVideo.isPlaying()) {
// // this.element.muted = true;
// this.torrentVideo.pause();
// }
// }*/
// }
toggleTorrentInfo
()
{
this
.
torrentInfo
=
!
this
.
torrentInfo
;
...
...
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