mat-video
mat-video copied to clipboard
GetvideoTag() not working.
AppComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Cannot read property '__zone_symbol__addEventListener' of null
Same error!!!
Angular CLI: 9.1.4 Node: 12.16.2 OS: win32 x64
Angular: 9.1.4 ... animations, cli, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router Ivy Workspace: Yes
Package Version
@angular-devkit/architect 0.901.4 @angular-devkit/build-angular 0.901.4 @angular-devkit/build-optimizer 0.901.4 @angular-devkit/build-webpack 0.901.4 @angular-devkit/core 9.1.4 @angular-devkit/schematics 9.1.4 @angular/cdk 9.2.2 @angular/material 9.2.2 @ngtools/webpack 9.1.4 @schematics/angular 9.1.4 @schematics/update 0.901.4 rxjs 6.5.5 typescript 3.8.3 webpack 4.42.0
I had this problem and I solved it using ngAfterViewInit like this :
@ViewChild('lessonVideo')
private matVideo: { getVideoTag: () => HTMLVideoElement };
[...]
ngAfterViewInit(): void {
this.matVideo.getVideoTag().addEventListener('ended', () => this.store.dispatch(new ReadNextVideo()));
}
I can't import MatVideoComponent 😢 :
import { MatVideoComponent } from 'mat-video'; // <= Module '"node_modules/mat-video/mat-video"' has no exported member 'MatVideoComponent'.
so I describe it's interface :
{ getVideoTag: () => HTMLVideoElement }
And it's work ! 😄
Thanks for your reply, i will try it definitely.