380 likes | 567 Views
Flash Media Fun Hour. Stefan Richter stefan@flashcomguru.com. What is Flash Media Server?. What is Flash Media Server?. Flash Communication Server (released mid-2002). What is Flash Media Server?. Flash Communication Server (released mid-2002). Flash Media Server (released late 2005).
E N D
Flash Media Fun Hour Stefan Richter stefan@flashcomguru.com
What is Flash Media Server? Flash Communication Server (released mid-2002)
What is Flash Media Server? Flash Communication Server (released mid-2002) Flash Media Server (released late 2005)
What is Flash Media Server? == Flash Communication Server Flash Media Server
What is Flash Media Server? == (kind of) Flash Communication Server Flash Media Server
What can you do with it • Live Video, Audio and Data in Flash • Streaming Audio/Video • Record Audio/Video (from webcam) • Bit pricey • License cap on bandwidth and connectioms • No Personal Edition anymore • …but Free Developer Edition!
Alternatives(there’s only one) http://osflash.org/red5
Installation is easy
Connecting up Remote rtmp://myserver.com/myapp [/myinstance] or Local rtmp:/myapp [/myinstance]
Connecting up var nc:NetConnection = new NetConnection(); nc.connect( “ rtmp://server.com/myapp [/myinstance] “ );
Connecting up var nc:NetConnection = new NetConnection(); nc.onStatus = function (info) { trace(info.code); } nc.connect("rtmp://server.com/myapp");
Connecting up rtmp://server.com/myapp actually connects to rtmp://server.com/myapp/_definst_
rtmp://server.com/myapp will connect you to
Streaming Video FMS will look for flv files in a subfolder /streams/[instancename] Example…
Remote SharedObjects (SO) • Establish a NetConnection • ‘Get’ the SO • write onSync handler - it syncs SO data • connect the SO
// first connect up, then remote_so = SharedObject.getRemote("remote_so", nc.uri, true); // this fires everytime the SO data changes remote_so.onSync = function( list ) // an array of objects { for (var i in list) { trace("slot code: " + list[i].code); trace("slot name: " + list[i].name); trace("slot value: " + this.data[list[i].name]); } this.data.val = "hello world"; this.data.val2 = "hello world2"; } remote_so.connect( nc );
Remote SharedObjects (SO) Some onSync Examples
Remote SharedObjects (SO) SO.send example
NetConnection.callClient.call Example
Where to learn more • The definitive book O’Reilly’s ‘Programming FCS’ (800+ pages) • www.flash-communications.net • www.jessewarden.com • http://chattyfig.figleaf.com • <plug> www.flashcomguru.com </plug>