
Use the JavaScript API to control the players, get information about
the player, and to broadcast status from inside the HTML container. The
APIs are grouped into three categories: general-purpose methods, event
management methods, and events. There's also a utility callback that you
can configure in the <embed> tag to have the player
call the JavaScript function of your choice to announce that it is ready
to be interacted with from JavaScript.
These methods handle basic functionality of the player.
Returns the channel URL for the stream currently being displayed
in the player. Returns null if the player has no
permalink assigned.
Gets the aspect ratio, width and height, at which the stream is
actually being displayed. To get the stream's actual (that is, native)
aspect ratio, use getVideoAspectRatio()
Returns the profile url for the owner of the stream
that's currently assigned to the player. Returns null if no
permalink is assigned.
Returns the audio volume of the player as a number between 0 and 1. The volume here refers to the player's volume; the broadcast stream might not have sound, in which case setting the volume will have no effect. You can subscribe to the broadcastMute and broadcastUnmute events to determine if the stream actually contains audio at a given point in time.
Returns the actual aspect ratio, width and height, of the stream that the player is displaying.
Sets the audio volume of the player to 0. Before it mutes the player, the mute() method saves the current volume, which can be restored later with the unmute() method.
Returns the size at which the player needs to be displayed in order to display video at the dimension specified by width and height. The returned array will contain two items: width and height, in that order.
Sets the permalink that the player will play. The
initial permalink can also be set at load time using the 'permalink'
FlashVar.
Sets the audio volume of the player. The argument should be a number between 0 an 1. Note that the broadcast might not have sound. The initial volume can be set at load time using the 'vol' FlashVar.
Set the audio volume of the player to the volume that was set before mute() was called.