Play FLV from ByteArray in Flash Player

前端 未结 5 1885
臣服心动
臣服心动 2021-01-02 21:01

I have a flash video file (FLV) stored in the ByteArray object and would like to play this video. Is there any way to achieve it? Maybe using Alchemy?

Thank you!

5条回答
  •  说谎
    说谎 (楼主)
    2021-01-02 21:40

    The Loader+MovieClip trick is probably the only way to go, see this

    For limitiations: The 2 minute limit is fine for rtmfp2p as distributing larger bytearrays is not feasiable anyway.

    Assuming the playback metrics (playhead/current frame) are available, smooth transitions should not be a problem - start playing second swf with mute/visible=false until timelines are in synch, then flip video, and sound - this works very well well for netstream/play(), not so sure for plain swf just yet.

    Another problem is figuring out exactly the way flv data are imported into the swf and how to construct proper swf at runtime, in as3. So far mxmlc/swfmill were unsucessful in directly embedding FLV for me (it's been a while, things might've changed), only plain flash AS3 was capable of creating bytearray-loadable swf with video. Should be possible though.

    On a related note - one question is if its all worth the trouble - if one were to build a successful site featuring p2p VOD like this one, Adobe might as well just cut the line (hacking up something like no swf movieclips with embedded video to be loaded from bytearrays...).

提交回复
热议问题