lucaslorentz / AS3RtmpClient

A proof of concept AS3 RtmpClient using sockets, based on Flazr.
19 stars 16 forks source link

AS3RtmpClient

This is a proof of concept RtmpClient based on Flazr (http://flazr.com/) created to run on Flash Player (AS3 + Sockets + ByteArray).

First of all. I did that code some time ago. I'm not working on it anymore, and it is just a proof of concept.

In order to use flash.net.Socket in a Flash sandbox environment, you need to have a flash socket policy server. Look at http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html. Because of this restriction, this library might be more suited for AIR apps.

MOTIVATION

Why creating a AS3 RtmpClient if Flash supports it natively?

I did that experiment when I was trying to figure out some way to save video streaming to hd using only Flash Player.

Things that I got working on my tests:

USAGE

var connectionConfig:String = "rtmp://rtmp01.hddn.com/play playpath=mp4:vod/demo.flowplayervod/buffalo_soldiers.mp4";

var video:Video = new Video();

var rtmpNetStream:RtmpStreamPlayer = new RtmpStreamPlayer();                
rtmpNetStream.play(connectionConfig, video);

The play method receives a connection configuration like librtmp. http://rtmpdump.mplayerhq.hu/librtmp.3.html

Some videos will work, some others will not. Whatever, this library is just a proof of concept. :-)

LICENSE

As Flazr. This project is licensed under the LGPL License.
http://www.gnu.org/licenses/lgpl.html