简体   繁体   中英

AS3 Air — Check a Zip to get Audio File

I have a problematic situation that I wish to expose you because it contains some opposites constraints. Maybe someone will have an idea on how to unlock my problem.

I'm going to make a mobile application with ActionScript 3 and Air for iOS and Android. This application has to download zip file which it uses to display text, bitmap and sound. This last one is the problem.

After some research, one of the best way I found to check a zip file is FZip, but it allows us to get data from zip on a ByteArray form. And a Sound can't be converted from ByteArray. ( That's what a lots of results about it appear to say. )

One of the solution proposed is to put the ByteArray of a sound and put it in a SWF. Then take the SWF from the zip to get the Sound. I can't do that because this zip will be uploaded from a admin interface used by anybody. I can't force them to use Flash.

I have few potential direction where I ask for your advices :

• Use Code or Native Extension ( iOS and Android ) to check a zip without files read in ByteArray

• Convert a ByteArray into Sound without have to pass it in a SWF

• Dynamicly create a SWF with the ByteArray of a Sound

• In the last possibility, another way to drag and download few files together which can be consulted in another format than ByteArray ( Like a iOS Bundle but with android too )

Thanks a lot to help me,

您可以简单地将ByteArray写入本地mp3(或mp4)文件,然后播放它,以将ByteArray写入文件,请参见此处的文档。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM