Media (which can contain audio, video, and data) is sent between a client and Flash Media Server in real time and displayed as it arrives. This type of data transmission is called streaming. The media streamed between a client and Flash Media Server is called a stream. Streams use a publish-and-subscribe model; subscribe means play. Either a client or a server can publish a stream; only a client can play a stream.
For example, a producer could use Flash Media Encoder to capture and encode live audio and video from a keynote speech and publish it to the server. Users could view the speech in a Flash Player, AIR, or Flash Lite client that subscribes to the stream.
In another scenario, a user on a social media website could publish a live stream in a video chat application; in this case, Flash Player would capture the video from the user's webcam. Other users on the social media site could view the stream live, or, if the developer added this functionality, play the recorded stream at a later time.
A server can publish a stream to clients or to other servers. For example, you might want to pull XML data into a server-side script to create a playlist and publish it as a stream to clients. A server would publish a stream to another server to scale live broadcasting applications to support more clients.
To publish a stream, a client calls NetStream.publish(). To subscribe to a stream, a client calls NetStream.play(). (These calls can be made in ActionScript 2.0 or ActionScript 3.0.) To publish a stream to a client, a server calls Stream.play(). To publish a stream to another server, a server calls NetStream.publish(). (These calls are made in Server-Side ActionScript.)