Created
April 8, 2016 00:53
-
-
Save marinalohova/7b7e4c76d66180991d011bafdeab06c1 to your computer and use it in GitHub Desktop.
org.red5.samples.livestream.broadcaster.Main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function configUI():Void | |
{ | |
disconnect._visible = false; | |
connect._visible = false; | |
uri._visible = false; | |
light._visible = false; | |
connection = new Connection(); | |
light.registerNC(connection); | |
if (makeConnection(Connector.red5URI)) { | |
dispatchEvent({type:"connectionChange", connected: true, connection:connection}); | |
} | |
} | |
public function makeConnection(uri:String):Boolean | |
{ | |
var result:Boolean = false; | |
if(uri.length > 0) | |
{ | |
result = connection.connect(uri, getTimer()); | |
if(!result) { | |
alert.show("Failed to connect."); | |
} | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment