Html5Video icon indicating copy to clipboard operation
Html5Video copied to clipboard

"html video error: Class not found" in Console

Open jpescada opened this issue 11 years ago • 7 comments

I'm getting this console.error "html video error: Class not found" when trying to initialize or play an HTML5 video on Android.

Not sure if this is only related to Android 4.4, or lower versions, as I don't have another Android to test.

Any ideas?

jpescada avatar Dec 10 '13 10:12 jpescada

If you check logcat (adb logcat), do you get another error as well? I've just confirmed 4.3 brought a change in settings which gives error, see issue #10 - unfortunately I don't have a 4.3 device to test with. But it would be great if you could change (if you've already installed the module) platforms/android/src/org/apache/cordova/plugin/Html5Video.java and see if it works for 4.4

bivald avatar Dec 10 '13 11:12 bivald

@bivald Although issue #10 fixed the error above, I'm still getting issues on logcat:

D/Html5Video(11860): Playing video with id: footerVideo I/chromium(11860): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported E/ ( 177): Failed to open file 'android.resource:///2130968576'. (No such file or directory) E/StagefrightMetadataRetriever( 177): Unable to create data source for 'android.resource:///2130968576'. E/MediaResourceGetter(11860): Invalid url: java.lang.RuntimeException: setDataSource failed: status = 0x80000000

jpescada avatar Dec 10 '13 12:12 jpescada

I will have time after work today to work on this. I have a 4.3 device I can test with and see if it is broken there as well.

jaeger25 avatar Dec 10 '13 23:12 jaeger25

Can you try using the latest version of the plugin and let me know if you still have the issue? Also, what version of cordova are you using?

jaeger25 avatar Dec 11 '13 05:12 jaeger25

@jaeger25 I just did. It still fails but now with the console error: Failed to load resource android.resource://<package-redacted>/2130968576

Oddly enough I get the canplay, canplaythrough and timeupdate events, before the .play() is requested (and the error above gets triggered).

The HTML5 MediaError triggered is MEDIA_ERR_SRC_NOT_SUPPORTED. Details here: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-mediaerror-media_err_src_not_supported

I'm using Cordova 3.1 on this project. With Android 4.4.

jpescada avatar Dec 11 '13 10:12 jpescada

I'm going to look into the issue this weekend. It likely has to do with Android switching to the chromium based webview for 4.4.

jaeger25 avatar Dec 13 '13 19:12 jaeger25

I have the same setDataSource error when using the 4.4 SDK. Trying to work around it myself, but not sure how.

fourseven avatar Jan 14 '14 23:01 fourseven