Question

I've developed a custom video player which needs to double up as an audio player. All the functionality is there, but the NetStream doesn't load the mp3. It throws NetStream.Play.StreamNotFound.

I am not using a Flash Media server. I have tested both local, and online .mp3 files. The strange thing is that the code works perfectly when putting in an .mp4 file.

What am I missing?

Était-ce utile?

La solution

If not using media server or desktop application it wont work. mp4 is a container format for both video and audio, thats why netStream is loading it: Its reading it as an empty video stream with an active sound stream. In the other hand, mp3 is an audio only codec, and you should load it using the Sound class, not NetStream. Here is some more info about supported formats for NetStream objects: http://dev.illumifi.net/AS3/flash/net/NetStream.html

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top