flash - Serverside Actionscript AMS to youtube cuts off after 10mins -
flash - Serverside Actionscript AMS to youtube cuts off after 10mins -
im working multipoint publishing flash media server. below code. im trying take published stream application live , send 2 servers. 1 beingness fms , other youtube server. fms server works great without interruption youtube server gets signal preview , start stream. 10 minutes in, stream loses signal go on on sec fms server without problem. im thinking there wrong code or authentication problem needs sent youtube server?
// main.asc file // server-side actionscript var nc; var ns; var nc2; var ns2; // called when client connects application.onconnect = function(client) { // take new client's connection application.acceptconnection(client); // send message trace(client.id + " connected"); } // called when client disconnects application.ondisconnect = function(client) { trace(client.id + "disconnecting @ " + new date()); } // called when client publishes application.onpublish = function(client, mystream) { trace(mystream.name + " publishing application " + application.name); // illustration of using multi-point publish feature republish // streams application instance on local server. if (application.name == "live/_definst_"){ trace("republishing stream livestreams/anotherinstance"); nc = new netconnection(); nc2 = new netconnection(); nc.connect( "second server url here" ); nc2.connect( "rtmp://a.rtmp.youtube.com/live2" ); ns = new netstream(nc); ns2 = new netstream(nc2); //publishing streams ns.setbuffertime(2); ns.attach(mystream); ns.publish("second server stream name here", "live" ); ns2.setbuffertime(2); ns2.attach(mystream); ns2.publish("youtube stream name here","live" ); } } application.onunpublish = function( client, mystream ) { trace(mystream.name + " unpublishing" ); } actionscript-3 flash actionscript youtube
Comments
Post a Comment