Thanks for the help. I found the solution.
My "setDataSource()" was wrong. I can read my m4v video with the
following code:
AssetFileDescriptor afd = getResources().openRawResourceFd
(R.raw.mym4v);
mMediaPlayer.setDataSource(afd.getFileDescriptor(),
afd.getStartOffset(), afd.getLength());
On Feb 13, 11:41 am, Marco Nelissen <[email protected]> wrote:
> On Fri, Feb 13, 2009 at 6:15 AM, Mark Murphy <[email protected]>wrote:
>
>
>
> > bleucalme wrote:
> > > Anyone was able to play a video included in the .apk? I'm able to play
> > > this video from the SD card but not when it's a resource.
>
> > I doubt that will work well. APKs are ZIP files, so you're asking the
> > device to uncompress the video and play it back, which would require a
> > fair amount of horsepower.
>
> Not really. Certain file types (mp4, mp3, ogg and a bunch of others) that
> need to be accessed directly. These files are in the zip file uncompressed,
> and so their data can be accessed without much overhead.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---