Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: self.context.openVideo is not a function #31

Open
caike08 opened this issue Apr 6, 2017 · 0 comments
Open

Error: self.context.openVideo is not a function #31

caike08 opened this issue Apr 6, 2017 · 0 comments

Comments

@caike08
Copy link

caike08 commented Apr 6, 2017

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant