moust / cordova-plugin-videoplayer

A Codova plugin to play video with the native MediaPlayer on Android devices.
MIT License
138 stars 103 forks source link

Error 404 #4

Closed ivan-atanasov closed 10 years ago

ivan-atanasov commented 10 years ago

When I try to execute: cordova plugin add com.moust.cordova.videoplayer It returns the following error: Error: 404 Not Found: com.moust.cordova.videoplayer

Any ideas?

moust commented 10 years ago

The plugin is registred in the PhoneGap Build's registry but not in the Cordova's registry.

You can use the Github repository url to instal it instead : cordova plugin add https://github.com/moust/cordova-plugin-videoplayer.git

ivan-atanasov commented 10 years ago

Thank you for the quick answer, the plugin installed from the git repository. However, when I run the app on my device, nothing happens. No errors or anything, just a blank screen. Do I need a

moust commented 10 years ago

First, the plugin doesn't work with Youtube url, only with video file.

As described in the README, you should call the plugin's function to play your video, like this example : VideoPlayer.play("file:///android_asset/www/movie.mp4");

You must put the video file in the directory www like all the other files with PhoneGap/Cordova and the path to the file must be prefixed by file:///android_asset/www/. If you want, you can put it in a subfolder. (eg: file:///android_asset/www/subfolder/movie.mp4)

Further, make sure your video format is supported by Android. Refer to http://developer.android.com/guide/appendix/media-formats.html