Home | Index

Yahoo! Live: Flash Embeds and JavaScript API

Events

Events can be sent to the JavaScript function of your choice to signal status changes. Below are the event types that can be sent from the player to the container.

broadcastStart

Dispatched when a broadcast starts.

Table 3. broadcastStart event details

key value
type broadcastStart
permalink The permalink that started broadcasting.
broadcastInfo URL for web service data about this broadcast.

broadcastStop

Dispatched when a broadcast stops.

Table 4. broadcastStop event details

key value
type broadcastStop
permalink The permalink that stopped broadcasting.
broadcastInfo The URL for web service data about this broadcast.

errorEvent

This event is dispatched when an error occurs.

Table 5. errorEvent event details

key value
type errorEvent
permalink The permalink that had an error.
code An error code.
message An error message.

stateChange

Dispatched when the playback state changes.

Table 6. stateChange event details

key value
type broadcastStart
permalink The permalink that had a state change.
state The new state.

The possible states are as follows:

Table 7. Player States

connected The player is connected to the server.
connectionError There was an error connecting to the server.
disconnected The player is not connected to the server.
paused The broadcast is playing, but the local stream has been paused.
playing
The stream is playing.
stopped The player is connected and tracking a stream, but the stream is stopped.

viewerCountChange

Dispatched when the viewer count for the current stream changes.

Table 8. viewerCountChange event details

key value
type viewerCountChange
permalink The permalink that changed.
count The number of viewers currently watching the permalink.