开发者

appendbytes with mp4

Hi I have a flash as3 player that is playing flv files using appendbytes.

I have searched the web for many hours on how 开发者_开发百科to stream a mp4 using appendbytes.

Does anyone have a solution for this?

Just using Netstream is not an option as we need progressive download seeking.


The best thing I've found is using the SoundLoaderContext, and setting the first argument to be whatever time you want to spend buffering.

I've researched the "loadCompressedDataFromByteArray" and "loadPCMFromByteArray " methods in the Sound class, but the solution would be to buffer a certain amount of sound and then load it.

Found this sample code:

import flash.media.Sound;
import flash.media.SoundLoaderContext;
import flash.net.URLRequest;

var s:Sound = new Sound();
var req:URLRequest = new URLRequest("trackName.mp4");
var context:SoundLoaderContext = new SoundLoaderContext(8000, true);
s.load(req, context);
s.play();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜