Riffly Demo | Plugin | Plans | API | Sign in     

Working playback example -- Developer API



Recording

  1. Include Riffly's Javascript
  2. Display the Recorder
  3. Store the Riffly ID and Type
  4. Working Example

Playback

  1. Display Snapshots
  2. Display a Recording for Playback
  3. Working Example



Here is a complete working playback example. The source is below and you can also view it on its own page.
<html>

<head>
  <script type="text/javascript">
    function showPlayer (player_container_id, riffly_id, riffly_type) {
      var player_container = document.getElementById(player_container_id);

      if (riffly_type == 'video') {
        player_container.innerHTML = '<embed src="http://riffly.com/p/' + riffly_id + '"
		width="400" height="320" type="application/x-shockwave-flash"
		allowscriptaccess="always" allowfullscreen="true"></embed>';
      } else if (riffly_type == 'audio') {
        player_container.innerHTML = '<embed src="http://riffly.com/p/' + riffly_id + '"
		width="400" height="100" type="application/x-shockwave-flash"
		allowscriptaccess="always" allowfullscreen="true"></embed>';
      }
    }
  </script>
</head>

<body>

<div id="player_container">
  <a href="#" 
  onclick="showPlayer('player_container', 'B47686169D7111DC9B0D44CF0D09CCE3', 'video'); return false;"
  >
  <img width="160" height="120"
  src="http://free-video-comments-at.riffly.com/static/flv/B47686169D7111DC9B0D44CF0D09CCE3.small.jpg"
  style="border: 1px solid black;">
  </a>
</div>

</body>
</html>

		



Blog | Developer API | Terms of Service | Contact Us
Copyright © 2007-2009 -- All Rights Reserved