MediaPlayer:API:Callbacks

From Metrixstream
Revision as of 17:11, 26 March 2011 by MetrixAdmin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Getting Started

The media player has many callbacks that can be defined in JavaScript to provide more granular control over the media player and how it interacts with certain actions.

Callbacks

Callbacks are simply global JavaScript functions that the media player tries to call. If they don't exist, then the media player skips over them.

metrix_navigateToURL

This callback is useful when the media player wants to redirect itself to a new URL and you need better control over how to perform this redirect rather than the default implementation offered by Flash.

Parameters

url
this is the URL to which the media player wants to redirect.

Example Usage

<script type="text/javascript">

 function metrix_navigateToURL(url) {
   document.location = url;
 }

</script>
Personal tools