I've found a solution to this. I'll post here just in case anyone is
interested

Using the APK Expansion Pack library porting for Xamarin.Android you get
the relative ZipEntry of a file into the .obb package. Then you create an
AssetFileDescriptor using a ParcelFileDescriptor.
In this way you can stream the video inside the .zip file without
extracting it somewhere (temp file). Remember to create your zip file with
no compression for the .mp4 files

             var expansion = ApkExpansionSupport.GetApkExpansionZipFile(this
, 1, 1);
            var entry = expansion.GetEntry("videos/myvideo.mp4");

            var pfd = ParcelFileDescriptor.Open(new Java.IO.File(sourcePath)
, ParcelFileMode.ReadOnly);
            var fd = new AssetFileDescriptor(pfd, entry.FileOffset, entry.
FileSize);


On Sat, May 11, 2013 at 4:18 PM, Francesco Colombo <
francesco.colo...@gmail.com> wrote:

> Hi to all,
>
> In my app I need to play a video file (.mp4) The source file is stored
> inside an Android Expansion Packs files (.obb). How can I read it ?
>
> An example done in Android
>
> http://stackoverflow.com/questions/11300137/playing-sound-files-from-expansion-file
>
> What I'm missing is how to get the FileDescriptor instance from the
> expansion file.
>
>
>
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to