Open VKhazinGladiator opened 9 years ago
@VKhazinGladiator This issue should be fixed in the Cordova plugin 1.6.0 release.
I'm getting the same error:
Cordova plugin 1.6.0. Cordova android 4.1.1 Android-22
device.getMediaPlayer().playMedia("http://media.w3.org/2010/05/sintel/trailer.mp4", "video/mp4") .success(function (launchSession, mediaControl) { console.log("Video launch successful") }).error(function (error) { console.log("error: " + error); });
detail: "com.connectsdk.cordova.JSCommandDispatcher$DispatcherException: Exception calling playMedia: java.lang.NullPointerException" message: "Exception calling playMedia: java.lang.NullPointerException"
stack trace from logcat:
com.connectsdk.cordova.JSCommandDispatcher$DispatcherException: Exception calling playMedia: java.lang.NullPointerException com.connectsdk.cordova.JSCommandDispatcher.dispatchCommand(JSCommandDispatcher.java:122) com.connectsdk.cordova.ConnectableDeviceWrapper.sendCommand(ConnectableDeviceWrapper.java:120) com.connectsdk.cordova.ConnectSDKCordova.execute(ConnectSDKCordova.java:101) at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:95) at org.apache.cordova.PluginManager.exec(PluginManager.java:130) at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59) at org.crosswalk.engine.XWalkExposedJsApi.exec(XWalkExposedJsApi.java:40) at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.os.HandlerThread.run(HandlerThread.java:61) Caused by: java.lang.NullPointerException at com.connectsdk.cordova.JSCommandDispatcher.displayMedia(JSCommandDispatcher.java:813) at com.connectsdk.cordova.JSCommandDispatcher.mediaPlayer_playMedia(JSCommandDispatcher.java:449) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.connectsdk.cordova.JSCommandDispatcher.dispatchCommand(JSCommandDispatcher.java:115)
Roku and AppleTV work fine.
Google sdk extras are from v7 Cordova 4.1.2 Android-21
Error when calling: mediaPlayer.playMedia
Object {message: "Exception calling playMedia: java.lang.NullPointerException", detail: "com.connectsdk.cordova.JSCommandDispatcher$Dispatc…calling playMedia: java.lang.NullPointerException"} detail: "com.connectsdk.cordova.JSCommandDispatcher$DispatcherException: Exception calling playMedia: java.lang.NullPointerException" message: "Exception calling playMedia: java.lang.NullPointerException"