Note that there are some explanatory texts on larger screens.

plurals
  1. POPhoneGap3 (Android) - VideoPlayer Plugin Broken? Alternatives?
    primarykey
    data
    text
    <p>Possibly related: <a href="https://stackoverflow.com/questions/18344958/plugin-videoplayer-phonegap-not-working">Plugin videoPlayer PhoneGap not working</a></p> <p>I'm trying to play youtube videos from my PhoneGap 3.0 application for Android but have had a lot of trouble. Following several suggestions on stackoverflow I installed the android video player plugin (<a href="https://github.com/macdonst/VideoPlayer" rel="nofollow noreferrer">https://github.com/macdonst/VideoPlayer</a>). However the program fails to run when I use <code>phonegap run android</code> from the terminal. Does this plugin not work on PhoneGap 3.0 / should I revert to an older version of phonegap?</p> <p>This is pertinent output I receive after attempt to run the app:</p> <pre><code>BUILD SUCCESSFUL Total time: 1 second Buildfile: /home/ian/shtv/platforms/android/build.xml -set-mode-check: -set-debug-files: -check-env: [checkenv] Android SDK Tools Revision 22.0.5 [checkenv] Installed at /home/ian/android-sdk-linux_86 -setup: [echo] Project Name: SHTV [gettype] Project Type: Application -set-debug-mode: -debug-obfuscation-check: -pre-build: -build-setup: [getbuildtools] Using latest Build Tools: 18.0.1 [echo] Resolving Build Target for SHTV... [gettarget] Project Target: Android 4.3 [gettarget] API level: 18 [echo] ---------- [echo] Creating output directories if needed... [mkdir] Created dir: /home/ian/shtv/platforms/android/bin [mkdir] Created dir: /home/ian/shtv/platforms/android/bin/res [mkdir] Created dir: /home/ian/shtv/platforms/android/gen [mkdir] Created dir: /home/ian/shtv/platforms/android/bin/classes [mkdir] Created dir: /home/ian/shtv/platforms/android/bin/dexedLibs [echo] ---------- [echo] Resolving Dependencies for SHTV... [dependency] Library dependencies: [dependency] No Libraries [echo] ---------- [echo] Building Libraries with 'debug'... [subant] No sub-builds to iterate on -code-gen: [mergemanifest] Merging AndroidManifest files into one. [mergemanifest] Manifest merger disabled. Using project manifest only. [echo] Handling aidl files... [aidl] No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [renderscript] No RenderScript files to compile. [echo] ---------- [echo] Handling Resources... [aapt] Generating resource IDs... [echo] ---------- [echo] Handling BuildConfig class... [buildconfig] Generating BuildConfig class. -pre-compile: -compile: [javac] Compiling 11 source files to /home/ian/shtv/platforms/android/bin/classes [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:26: error: package org.apache.cordova.api does not exist [javac] import org.apache.cordova.api.CallbackContext; [javac] ^ [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:27: error: package org.apache.cordova.api does not exist [javac] import org.apache.cordova.api.CordovaPlugin; [javac] ^ [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:28: error: package org.apache.cordova.api does not exist [javac] import org.apache.cordova.api.PluginResult; [javac] ^ [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:30: error: cannot find symbol [javac] public class VideoPlayer extends CordovaPlugin { [javac] ^ [javac] symbol: class CordovaPlugin [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:35: error: cannot find symbol [javac] public boolean execute(String action, JSONArray args, CallbackContext callbackContext) { [javac] ^ [javac] symbol: class CallbackContext [javac] location: class VideoPlayer [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:36: error: package PluginResult does not exist [javac] PluginResult.Status status = PluginResult.Status.OK; [javac] ^ [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:36: error: package PluginResult does not exist [javac] PluginResult.Status status = PluginResult.Status.OK; [javac] ^ [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:44: error: package PluginResult does not exist [javac] status = PluginResult.Status.INVALID_ACTION; [javac] ^ [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:46: error: cannot find symbol [javac] callbackContext.sendPluginResult(new PluginResult(status, result)); [javac] ^ [javac] symbol: class PluginResult [javac] location: class VideoPlayer [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:48: error: cannot find symbol [javac] callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION)); [javac] ^ [javac] symbol: class PluginResult [javac] location: class VideoPlayer [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:48: error: package PluginResult does not exist [javac] callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION)); [javac] ^ [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:50: error: cannot find symbol [javac] callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION)); [javac] ^ [javac] symbol: class PluginResult [javac] location: class VideoPlayer [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:50: error: package PluginResult does not exist [javac] callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION)); [javac] ^ [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:34: error: method does not override or implement a method from a supertype [javac] @Override [javac] ^ [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:87: error: cannot find symbol [javac] File fp = new File(this.cordova.getActivity().getFilesDir() + "/" + filename); [javac] ^ [javac] symbol: variable cordova [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:93: error: cannot find symbol [javac] uri = Uri.parse("file://" + this.cordova.getActivity().getFilesDir() + "/" + filename); [javac] ^ [javac] symbol: variable cordova [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:104: error: cannot find symbol [javac] this.cordova.getActivity().startActivity(intent); [javac] ^ [javac] symbol: variable cordova [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:109: error: cannot find symbol [javac] InputStream in = this.cordova.getActivity().getAssets().open(fileFrom); [javac] ^ [javac] symbol: variable cordova [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:112: error: cannot find symbol [javac] FileOutputStream out = this.cordova.getActivity().openFileOutput(fileTo, Context.MODE_WORLD_READABLE); [javac] ^ [javac] symbol: variable cordova [javac] /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java:124: error: cannot find symbol [javac] PackageManager pm = this.cordova.getActivity().getPackageManager(); [javac] ^ [javac] symbol: variable cordova [javac] Note: /home/ian/shtv/platforms/android/src/com/phonegap/plugins/video/VideoPlayer.java uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] 20 errors BUILD FAILED /home/ian/android-sdk-linux_86/tools/ant/build.xml:712: The following error occurred while executing this line: /home/ian/android-sdk-linux_86/tools/ant/build.xml:726: Compile failed; see the compiler error output for details. Total time: 3 seconds </code></pre> <p>Also, if anyone has suggestions on another way of approaching this problem I'd appreciate it :) I've tried to link to the youtube videos directly, but they open in the browser (instead of the native youtube app or video player) and playback audio but no pictures (when you switch the video to fullscreen you can see the video however)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload