BitRot | Getting started with Red5 1.0 RC1 (Part 2)

Getting started with Red5 1.0 RC1 (Part 2)


Check out the first part, it explains how to get started with the server side.

Here, I’ll explain what you need to do to get started developing client applications that use Red5 in various ways. This is aimed at developers with a background in Java, but not necessarily in Flash/Flex.

Important caveat: I cover ActionScript 3 only.

What we need to do

Here’s the shopping list for this time:

  • Adobe Flash Builder 4

You can always try an open source alternative, but keep in mind that when it comes to any Adobe product, they always find a way to make money off you. The good news is that Adobe Flash Builder is free for students and unemployed developers. Great if you want to get some experience under your belt before finding work in the field!

Also, a word of warning: Flash Builder only works with 32bit eclipse, and Adobe has not made it clear when this support will be added.

Different ways to interact with the server

Media Streaming

This is the most common type of activity you want to do with Red5. The nice part is that Red5 is a compatible implementation, so you should be able to take a Flash client intended to work with any other Flash Media Server (even the official), and it should run the exact same with Red5.

So to do this, you need to create a NetConnection object. To broadcast a stream, you need to attach a camera and/or a mic to the connection, and then call NetConnection.publish().

To receive a stream, you need to create a NetConnection object to an existing stream (coordinating names is a challenge, but a fun one). You can then start receiving the stream by calling

Shared Objects

Shared objects are typically how you’d implement chat rooms, multiplayer games, and more.