-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E/MediaPlayer(11774): Error (1,-2147483648) #11
Comments
I will have time after work today to take a look at this, although I don't have any Android < 4.0 devices to test with at the moment. I'm pretty sure I have ran into that error before and overcome it though so hopefully we can get it figured out |
Can you try the newest version of the plugin and let me know if you still have the problem? |
Thanks so much for your feedback. I really appreciate you sharing this software, and supporting it like this even more so. Thank you, Jaeger. [[[mundane update note]]]
So I removed the plugin folder manually, and then re-added the plugin again from the console. I'm assuming this wouldn't cause any follow-up issues. The same error still persists, but share a little more detail; I'm getting quite a few Warning-level log-messages, some of which are referring to the Webview method. Do you think I maybe need to make any of the WebView preparations mentioned here, in order for this to work on Cordova 3.2? (I updated to the latest version in hopes of minimal issues) Here are the errors:
The strange thing is: on the emulated virtual tablet (Android 4.2.2, API 17), I get the same MediaPlayer error, BUT it still triggers the "play"-method's callback, implying that it IS working correctly. My own Android just says "Sorry, could not be played." I don't need to get it working on my old phone, but I don't never trust virtual/emulated devices 100% either, so... What do you think? Any idea's? |
Okay, interesting update: upon switching to the webm-file of the same video and adding a poster image (that does show up), I now get a whole bunch of extra errors: Upon triggering play, the emulated Android 4 tablet clears the poster image, switches to a grey background with the loader in the center of the
...And on my phone it just straight crashes as soon as I trigger 'play', with a completely different set of errors:
...I have completely lost understanding of what the hell is going on, at this point. Android 4 just gives a bunch of (Open?-) GL Errors, and Android 2 loses its shit after it loses its Host header. And all this difference after setting a poster image?! |
In your cordova plugins folder, can you remove the following folders: com.plugin.id then run the following commands: Then can you switch back to .mp4 format and verify your line 40 looks like this in Html5Video.java : It kind of looks like you are in some limbo state from updating, because I fixed the A WebView method was called on thread 'WebViewCoreThread' during the last update |
Thanks so much for those pointers. Using your feedback (and updating ADT and the SDK's) I was even able to remove and add the plugins through the terminal in the traditional way. Wanted to make sure that worked , because even after re-adding the Html5Video-plugin files succesfully, the terminal still mentioned that the plugin was already installed. ...But it STILL doesn't work!? 😞 My old raggedy Android still gives the same Null or empty value for "Host"-error, which in turn crashes WebViewCoreThread with a fatal exception. With a little more debug messages than before. I'm already taking this for granted. Fuck Android 2. On the emulated Android 4 tablet, the logs have completely changed, though:
...What's interesting, is that I almost get the same messages WITHOUT using the plugin and just trying to use the native video-element instead. This exact demo works just fine when brought up in the browser (even on my Android2-phone), but it trips over the very same error when encapsulated within Phonegap..! (While it DOES work just fine on iOS!?)
I'm reading some conflicting stories about Phonegap's html5 video support: some people say that the last Cordova versions support the video element just fine, while others 'suggest' that it doesn't. What's your take on this? The fact that the native html5 element didn't work at first, seemed enough of an answer. That's how I found this fantastic plugin. But if this plugin runs into the very same errors than the native html5 solution... I don't know where to look anymore :/ |
Simple, short question: has this plugin ever worked with Cordova 3? Because it was made for Phonegap 2, wasn't it? I'm at a point where I'm even willing to go back to Phonegap 2 if that's what it takes. Why is it so hard to play a damn video on Android :/ |
This plugin is working on cordova 3.2 and probably won't work on versions lower than 3 anymore without modification. What version of Android are you using for the emulator? From another bug report it looks like Android 4.4 may have broken it and I plan on looking into that and your issue this weekend. |
Oh, you're from Washington? And working for Microsoft? I'm impressed :) Did you ever get around to this thing, this weekend? I'd understand if you kept the weekend for yourself. I'm from the Netherlands and we actually had a few couchsurfers staying at our place from Chicago. Good folks. Anyway; a little more feedback: I've been messing around with the native HTML5 video element for quite a bit, this weekend, and what's weird... It works as soon as I refer to the mp4/mv4 source from a remote URL, and even from an absolute path to the sdcard, but not from within the app itself. (WTF?) I've tried relative and absolute path referrals, but to no avail. As for my test environment: the emulator I've been using was on Android 4.2.2, and after I updated everything I've also set up an emulator with "Google APIs" Android 4.4. I'm temporarily borrowing a physical tablet right now which is running 4.2.2 as well, but the logs appear identical to the emulated version. |
This has GOT to be the issue: file permissions?! http://www.weston-fl.com/blog/?p=2988 I went through the java-code in your plugin and couldn't find any permission-checks of this kind in your code. I'm not enough of a java-nut to be able to build this in myself... I hope you'll confirm my suspicions? |
I looked at the issue this weekend for a bit, but I'm having issues reproducing your exact problem. Would you be able upload a minimal project that reproduces this issue? I've ran into the issue of an absolute path working while a relative path doesn't before, it seems google figures people wouldn't want to package video with their app? Who knows |
I've set up a basic repo right here. I can also add the android platform, if it's of any use. |
Any luck at reproducing this yet |
Sorry it took me so long to look at this, I've been busy at work finishing end of year stuff. Looks like your issue is that your putting your videos in www/res/raw when you should be putting them in $PROJECT_ROOT/platforms/android/res/raw. |
I am using http url for playing music but it still shows the same error. |
I'm so close to getting this thing to work, but for some reason I can't get past this last error message... Upon booting the app from Eclipse, the only error messages I'm receiving is this one:
Did I forget to set any permissions or something? I'm running Cordova 3.1.0, and testing on a HTC Desire (Android 2.3.7, CyanogenMod 7) and a virtual Nexus 7.
I'm pretty sure hardwareAcceleration is working, and I even enabled all the media permissions I could find but those only seem to relate to Audio. My AndroidManifest.xml looks like this:
Please, please help me. I literally spent my entire day trying to get this working and would hate to give up now.
The text was updated successfully, but these errors were encountered: