MediaPlayer:API:Calls

From Metrixstream
Revision as of 15:30, 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 several callbacks and functions available to control it as you see fit. This document will go over them all in detail.

Functions

All functions must be called via JavaScript on the actual DOM element of the media player. This id is exposed in the getCustomPlayerEmbedCode macro.

All examples below will leverage the getDefaultPlayer() JavaScript.

<script type="text/javascript">

 function getPlayer(name) {
  var isIE = navigator.appName.indexOf("Microsoft") != -1;
  var player = (isIE) ? window[name] : document[name];
  return player;
 }

 function getDefaultPlayer() {
   return getPlayer("mtxPlayer");
 }

</script>

metrix_playMedia

This function allows you to play the existing media at its current position of it was paused or stopped.

Parameters

This function has no parameters.

Example Usage

<script type="text/javascript">

 getDefaultPlayer().metrix_playMedia();

</script>


metrix_stopMedia

metrix_seekMedia

metrix_isPlaying

metrix_muteVolume

metrix_unmuteVolume

metrix_setVolume

metrix_getVolume

metrix_isMuted

metrix_playSound

<script type="text/javascript"> ==
Personal tools