Hello,
I have amazon cloud front on S3. I have valid rtmp link as it works in VLC.
Can you help me make it work?
I use AIR18
Here is the code
public function Main() {
url = "rtmp://s1p2w2yhnipjkt.cloudfront.net/cfx/st/mp4:demo.mp4?Expires=1594281188&Signature=AW0 M39xRqX5bjhlw4EPMvdPzum8~gbK6Wsl7vkI3av6cWDXQ36lCfTlnpOXse6qiP9RSbuT-jhor84DHvZg7yPmvnnlPg AEQlndtgsBvzwUj~kGXES~~VWvHGVuUHTDnK~rAWcOmzpbRi-jWPpN71Ks2wnJeri596lqh2dOkUcg_&Key-Pair-I d=APKAI7XWAS4L22TVE3HA";
_netConnection = new NetConnection();
_netConnection.addEventListener(NetStatusEvent.NET_STATUS, onConnect);
_netConnection.client = {onBWDone:onNetConnectionBWDone};
_netConnection.connect(url);
//` _netConnection.connect("rtmp://s1p2w2yhnipjkt.cloudfront.net/cfx/st");
trace("connect")
I tried both connecting to signed url and just to application. It never came to onConnect
}
private function onConnect(event:NetStatusEvent):void {
trace(event.info.code);
if(event.info.code == "NetConnection.Connect.Success")
{
_netStream = new NetStream(_netConnection);
_netStream.client = {onMetaData:onMetaData, onPlayStatus :onPlayStatus};
var video:Video = new Video();
video.attachNetStream(_netStream)
_netStream.play("mp4:demo.mp4?");
addChild(video);
}
}
private function onNetConnectionBWDone():void{}
// NetStream Status handlers
private function onMetaData(o:Object):void{}
private function onPlayStatus(o:Object):void{}