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>
|