Here is a complete working example. The source is below and you can also view it on its own page.
<html>
<head>
<script type="text/javascript"
src="http://free-video-comments-at.riffly.com/static/js/api/1/web.js">
</script>
<script type="text/javascript">
function rifflyFinishedRecording (riffly_id, riffly_type) {
document.getElementById('riffly_id').value = riffly_id;
document.getElementById('riffly_type').value = riffly_type;
}
</script>
</head>
<body>
<span style="font-weight: bold;font-size: 14px;"><a href="javascript:void(0);"
onclick="rifflyShowRecorder('recorder_container', 'video', 'rifflyFinishedRecording');">
<img src="http://free-video-comments-at.riffly.com/static/images/api/1/riffly-webcam.png"
border="0" width="16" height="16">
Add Webcam</a> or <br><a href="javascript:void(0);"
onclick="rifflyShowRecorder('recorder_container', 'audio', 'rifflyFinishedRecording');">
<img src="http://free-video-comments-at.riffly.com/static/images/api/1/riffly-mic.png"
border="0" width="16" height="16">Audio-only Comment</a>
</span>
<div id="recorder_container">
</div>
<form action="/save_recording" method="POST">
<!-- these can be "hidden" instead of "text" for actual use -->
<input name="riffly_id" id="riffly_id" type="text">
<input name="riffly_name" id="riffly_type" type="text">
<!-- these can be "hidden" instead of "text" for actual use -->
<input type="submit" value="Submit">
</form>
</body>
</html>
|