MUZU Developer API

Getting Started
Data API Methods
Player API Methods

Player API methods

This page describes the Javascript interface to the MUZU player.
These methods will allow you to perform similar actions to the player controls such as play, pause, stop, etc. and will allow your web pages and applications to react to events fired by the player.
To enable the Javascript interface into the player you must add jse=y to the movie and src parameters of your embed code. For internet explorer you must also add the attribute classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" to the object tag.

Published Events


Name

 

 

Description

 

videoPaused

 

 

Fired when playback is paused during play.

 

videoResumed

 

 

Fired when playback resumes after being paused.

 

videoComplete

 

 

 

Fired when the end of a video is reached.

videoStarted

 

 

 

Fired when a video starts to playback.

videoQueued

 

 

 

Fired when a video is queued for playback.

videoBuffering

 

 

 

Fired when a video is buffering.

videoSeeking

 

 

 

Fired when a video is seeking.

enterFullscreen

 

 

 

Fired when the player enters fullscreen mode.

exitFullscreen

 

 

 

Fired when the player exist fullscreen mode.

muzuPlayerReady(playerId)

 

 

Fired when the player has loaded and is ready to receive calls. If your embed code includes a playerId then this value will be passed back.

This allows multiple players on the same page to be tracked.

 

Public Methods

loadVideo(videoId)

 

 

 

Load the specified video and begin playback.

pauseVideo

 

 

Pause the current video.

 

resumeVideo

 

 

Resume the current video.

 

stopVideo

 

 

Stop the current video.

 

seekTo(time)

 

 

Seek to a position within the video.

 

muteAudio

 

 

Mute the players audio.

 

unmuteAudio

 

 

Unmute the players audio.

 

isAudioMuted

 

 

returns true if audio is muted, otherwise false.

 

setAudioVolume(vol)

 

 

Sets the players volume, values between 0 and 100.

 

getAudioVolume

 

 

Gets the current audio volume of the player.

 

getCurrentTime()

 

 

Returns the playheads time.

 

getCurrentVideo

 

 

Returns a JSON string containing all relevant details for the current video. Return value should be unescaped before parsing.

 

getVideoMetaData

 

 

Returns meta data for the current video. Only call this after receiving the videoStarted event.

 

getVideoBytesLoaded

 

 

Returns a number of bytes that have been loaded.

 

getVideoBytesTotal

 

 

Returns the total number of bytes in the video.

 

getVideoDuration

 

 

Returns the duration of the current video.

 

nextTrack

 

 

Starts playback of the next video in the player.

 

playVideo

 

 

Starts playback of the currently queued video.

 

getPlayerState

 

 

Returns the current state of the player. Possible values are queued(0), playing (1), paused (2), buffering (3).

 

addEventListener(eventName, callbackFunction)

 

 

 

Add a listener for one of the player events.

 

Demo Player


 

A simple demo of the javascript API can be viewed here

 

Please confirm and accept the use of cookies on MUZU.TV for a better experience. You can read our cookie policy here.