On Wed, May 27, 2009 at 10:23 AM, Hamy <[email protected]> wrote: > > Marco, > > Thank you so much! I just spent a day and a half trying every example > I could get my hands on, and about 2 minutes before you replied I > found a hint that video could not be a raw resource. I had just been > adapting every example to include that, and it never occurred to me > that might be the problem! > > The dev guide I reference is here > http://developer.android.com/guide/topics/media/index.html > It is very lacking on video info in general, but in particular it > never mentions that video cannot be a raw resource, and I never found
That is not entirely true. You can't play video from a resource using any of the MediaPlayer.create() convenience functions, however you can create a new MediaPlayer with 'new' and then use setDataSource(int resourceid) to make it play from a resource, including video. that on Google's site anywhere! I would like to file a issue, but > before I do, do you know if they include it elsewhere? I don't want to > turn in an issue that says it is never mentioned, and then have them > dismiss it because it was mentioned somewhere I didn't look. It's not documented like that explicitly, however it follows implicitly from the fact that MediaPlayer.create() returns a MediaPlayer that has already been prepare()d, and the fact that you must call setDisplay() before calling prepare(). The latter is actually documented poorly, now that I look at it. It's mentioned in the doc for prepare(), but not in the doc for setDisplay(), and the "Valid and invalid states" section very misleadingly says that setDisplay() can be called in any state (which is technically true, though it won't have any effect in many of those states). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

