RemcoB00 / cordova-phonegap_youtube_player_api_android

YouTube Android Player API plugin for Cordova & Phonegap.
15 stars 14 forks source link

Viewing the player #2

Closed jamminjames closed 9 years ago

jamminjames commented 9 years ago

In your documentation, you say:

To view the video player use this code and add the YouTube video id: window.plugins.youtube.show({ videoid: "THE_VIDEO"}, function() {}, function() {} );

Do you simply wrap that in a <script> tag? That didn't work for me, but it could be a jquery.mobile issue, as it doesn't like scripts being placed in html pages. But making a .js file and calling it is a problem, because you'd have to have a different file for each video you want to play. How can this be handled?

RemcoB00 commented 9 years ago

Hey Jammin, I released today the new version of the plugin that works completely with the latest version of Cordova. I hope this will fix your problem.

You can call the plugin from inline HTML (via onclick) and via a separate js file. See the new example.html file for a full example of how you can use this plugin.