VgMedia.ngOnDestroy causes error when routing
Description
Videogular errors when navigating away from route with video.
Expected Behavior
Should be able to change routes without causing an error.
Actual Behavior
Error: TypeError: this.subscriptions.mutation.unsubscribe is not a function at VgMedia.ngOnDestroy
Steps to Reproduce
- Clone videogular2-starter
- Copy AppComponent videogular ts/html to new component (e.g. HomeComponent)
- Create new component (e.g. Page2Component)
- In app.module.ts, import RouterModule from @angular/router, the two new components, and define routes:
imports: [
...
RouterModule.forRoot([{ path: '', component: HomeComponent }, { path: 'page2', component: Page2Component }])
],
- Change app.component.html to use routes.
<p>
<a href="" routerLink="">Home</a> |
<a href="" routerLink="page2">Page 2</a>
</p>
<router-outlet></router-outlet>
- Launch app. When you try to navigate to route2 the app with error.
Please, update to 3.0.0 and check breaking changes here: https://github.com/videogular/videogular2/releases
All docs and demos has been updated too so for further documentation please check:
- Documentation: https://github.com/videogular/videogular2/tree/master/docs
- Showroom: https://github.com/videogular/videogular2-showroom
I am having this exact issue when routing out of the view where is videogular installed and I am using version 5.6.2, do you have a solution for this issue?
Same problem over here. In my case I'm routing out of the view using: this.router.navigateByUrl('/login');
And the error is: Cannot read property 'bufferDetected' of undefined. And the same goes for the properties 'play' and 'elem'. Hope that helps to solve the issue.
For a similar type of issue as what the OP describes, I was getting mention of MutationObserver in my error for IE10 specifically, and resolved it by installing https://github.com/megawac/MutationObserver.js into my polyfills file.