Embedding works like this:
[Embed(source = 'foo.mp4', mimeType = "application/octet-stream")]
private var musicClass:Class;
private var music:Video=new musicClass() as ByteArray;
Using the correct mime type (video/mp4) doesn’t work by the way.
Unfortunately the Sound class is somewhat restrictive - it’s only capable of playing mp3 files. Why’s that?
So, one gotta use Video, but that one wants a NetStream. Why aren’t there usual streams and convenient streams such as Java’s ByteArrayInputStream? That would solve all my problems.
Is there any workaround for this or is it completely impossible?
(Obviously I would like to use it for game BGM. MP3 requires much higher bitrates whereas you can get away with 25kbits with HE-AAC. Sure - it will sound a bit washed out, but it won’t make your ears bleed like 64-96kbits MP3s.)
Edit: as2-/as2 tags don’t work.