In my ionic app, I listed the youtube embed video as follows:
<iframe allowfullscreen frameborder="0" height="200" width="100%" [src]="video.url">
</iframe>
video.url is created from the following function
generateVideoUrl(videoId) {
return this.sanitizer.bypassSecurityTrustResourceUrl("https://www.youtube.com/embed/" + videoId + "?rel=0&showinfo=0");
}
It works great, but I also want to capture events like youtube video, paused or ended, or started playing, etc. I tried to import this http://brandly.imtqy.com/angular-youtube-embed/#/ and use it in my ionic3 application, but this gives the error "angular not defined". Ionic uses angular, but maybe it uses it differently because an undefined angular error is generated.
Thanks for the help.