A javascript function is called by the Riffly Flash recorder after a user clicks "save". There are two parameters: the unique Riffly ID and the type of Riff, either "audio" or "video". This callback gives you the opportunity to capture and store the ID and type of recording in your database. You'll need these to reference the recording by ID later for playback.
From inside the callback you can add the riffly_id and riffly_type values to hidden form fields and let the user submit a form. (You can also can send these to your server via an AJAX request, etc).
Callback in the <head> section of your HTML document.
<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>
Form with hidden fields.
<form action="/save_recording" method="POST">
<input name="riffly_id" id="riffly_id" type="hidden">
<input name="riffly_type" id="riffly_type" type="hidden">
<input type="submit" value="Submit">
</form>
In this example your web application handles requests to the URL "/save_recording" with the values "riffly_id" and "riffly_type".
Below is an example database table definition showing how you might store these values.
CREATE TABLE video (
video_id int unsigned not NULL auto_increment,
riff_id varchar(32) not NULL,
riff_type varchar(16) not NULL,
);
|