Handling Errors - Adobe 65029121 - Flash Media Streaming Server Developer's Manual

Developer's guide
Hide thumbs Also See for 65029121 - Flash Media Streaming Server:
Table of Contents

Advertisement

You don't need to call
The URI of the stream you pass to
NetConnection.connect()
Write the client event handler class
You also need to write the CustomClient class, which contains the
You must handle these events when you call
method to register the event handlers.
In your main client class, attach the new class to the
1
stream.client = new CustomClient();
Create the new client class:
2
class CustomClient {
}
3
Write a function named
public function onMetaData(info:Object):void {
trace("metadata: duration=" + info.duration + " width=" + info.width +
" height=" + info.height + " framerate=" + info.framerate);
}
Write a function named
4
public function onPlayStatus(info:Object):void {
trace("handling playstatus here");
}
Checking video files before playing
Use the FLVCheck tool to check a recorded video file for errors before playing it. Errors in the video file might
prevent it from playing correctly. For more information, see Adobe Flash Media Server Configuration and Adminis-
tration Guide.

Handling errors

About error handling
As you build video applications, it is important to learn the art of managing connections and streams. In a networked
environment, a connection attempt might fail for any of these reasons:
Any section of the network between client and server might be down.
The URI to which the client attempts to connect is incorrect.
The application instance does not exist on the server.
The server is down or busy.
The maximum number of clients or maximum bandwidth threshold may have been exceeded.
If a connection is established successfully, you can then create a NetStream object and stream video. However, the
stream might encounter problems. You might need to monitor the current frame rate, watch for buffer empty
messages, downsample video and seek to the point of failure, or handle a stream that is not found.
if you dragged a Video symbol to the Stage using Flash.
addChild()
NetStream.play()
.
NetStream.play()
to handle the
onMetaData()
to handle the
onPlayStatus()
is relative to the URI of the application you pass to
and
onMetaData
, but you cannot use the
property:
NetStream.client
event:
onMetaData
event:
onPlayStatus
ADOBE FLASH MEDIA SERVER
Developer Guide
event handlers.
onPlayStatus
addEventListener()
28

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash media server

Table of Contents