Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
350
Merge Requests
59
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
3c29c23e
Commit
3c29c23e
authored
1 hour ago
by
Ben Hayward
Browse files
Options
Download
Changed sentry logic and player autoplay.
parent
5a8c9b58
fix/autoplay-bug-2377
1 merge request
!712
WIP: Plyr play error
Pipeline
#107939163
passed with stages
in 47 minutes and 18 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
src/app/app.module.ts
View file @
3c29c23e
...
...
@@ -75,9 +75,26 @@ import { UpgradesModule } from './modules/upgrades/upgrades.module';
import
*
as
Sentry
from
'
@sentry/browser
'
;
Sentry
.
init
({
dsn
:
'
https://
3f786f8407e042db9053434a3ab527a2@sentry.io/1538008
'
,
// TODO: do not hardcard
dsn
:
'
https://
2c055120c4384ee8a62f580bcec36e32@sentry.io/1875291
'
,
release
:
environment
.
version
,
environment
:
(
<
any
>
window
.
Minds
).
environment
||
'
development
'
,
beforeSend
(
event
)
{
try
{
if
(
event
.
extra
.
__serialized__
.
stack
===
'
[undefined]
'
||
// this works, tested and it stops the error i can reproduce
event
.
extra
.
__serialized__stack
===
'
[native code]
'
// this I'm basing off the stack trace only having [native code] on some issues.
)
{
return
null
;
}
const
stackFrames
=
event
.
exception
.
values
[
'
0
'
].
stacktrace
.
frames
;
if
(
stackFrames
[
stackFrames
.
length
].
filename
.
includes
(
'
plyr
'
))
{
//crawled the object to get
return
null
;
}
}
catch
(
e
)
{}
return
event
;
},
});
@
Injectable
()
...
...
This diff is collapsed.
src/app/modules/media/components/video-player/player.component.ts
View file @
3c29c23e
...
...
@@ -7,6 +7,7 @@ import {
Output
,
EventEmitter
,
ChangeDetectorRef
,
AfterViewInit
,
}
from
'
@angular/core
'
;
import
{
PLAYER_ANIMATIONS
}
from
'
./player.animations
'
;
import
{
VideoPlayerService
,
VideoSource
}
from
'
./player.service
'
;
...
...
@@ -20,7 +21,8 @@ import { PlyrComponent } from 'ngx-plyr';
animations
:
PLAYER_ANIMATIONS
,
providers
:
[
VideoPlayerService
],
})
export
class
MindsVideoPlayerComponent
implements
OnInit
,
OnDestroy
{
export
class
MindsVideoPlayerComponent
implements
OnInit
,
OnDestroy
,
AfterViewInit
{
/**
* MH: dislike having to emit an event to open modal, but this is
* the quickest work around for now
...
...
@@ -55,6 +57,8 @@ export class MindsVideoPlayerComponent implements OnInit, OnDestroy {
],
};
_autoplay
;
constructor
(
private
service
:
VideoPlayerService
,
private
cd
:
ChangeDetectorRef
...
...
@@ -67,6 +71,11 @@ export class MindsVideoPlayerComponent implements OnInit, OnDestroy {
});
}
ngAfterViewInit
()
{
// Set autoplay here to avoid having to use a timeout.
this
.
options
.
autoplay
=
this
.
_autoplay
;
}
ngOnDestroy
():
void
{}
@
Input
(
'
guid
'
)
...
...
@@ -76,9 +85,7 @@ export class MindsVideoPlayerComponent implements OnInit, OnDestroy {
@
Input
(
'
autoplay
'
)
set
autoplay
(
autoplay
:
boolean
)
{
setTimeout
(()
=>
{
this
.
options
.
autoplay
=
autoplay
;
},
0
);
this
.
_autoplay
=
autoplay
;
}
@
Input
(
'
isModal
'
)
...
...
This diff is collapsed.
Please
register
or
sign in
to comment