Hello guys,
I've been trying to use this plugin but somehow it isn't working. When I try to call the function "openVideo" it says: self.context.openVideo is not a function. Am I doing something wrong?
HTML:
<ion-row>
<ion-col>
<button ion-button (click)="openVideo('X3z1KF2s8Sc')">
<ion-icon name="play"></ion-icon>
</button>
</ion-col>
</ion-row>
TS:
playVideo(videoId) {
YoutubeVideoPlayer.openVideo(videoId);
}
Error:
TypeError: self.context.openVideo is not a function
at DebugAppView.View_LearnPage0.handleEvent_41 (component.ngfactory.js:388)
at DebugAppView.<anonymous> (view.js:408)
at HTMLButtonElement.<anonymous> (dom_renderer.js:276)
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (ng_zone.js:227)
at t.invokeTask (polyfills.js:3)
at e.runTask (polyfills.js:3)
at HTMLButtonElement.invoke (polyfills.js:3)
Hello guys,
I've been trying to use this plugin but somehow it isn't working. When I try to call the function "openVideo" it says:
self.context.openVideo is not a function. Am I doing something wrong?HTML:
TS:
Error: