This javascript which I’m using works with a webcam to record a video.
The end result, after the file is recorded generates a file name, as you can see from the code below: Video+video_id.
I recorded a file today April 30th, and the file was named: Video1335806296490.flv. I don’t understand where the time and date are in this file name, and I don’t understand why all the recorded files begin with 1335. Can you shed some light here?
(Or suggest an alternative tweak to make file names more recognizable?)
Thanks.
<script type="text/javascript">
var video_id = get_id();
var filename = get_parm('filename');
if(filename == '' || filename == null)
{
filename = 'Video'+video_id;
}
var flashvars = {
filename: filename,
rtmpPath: "rtmp://xxxxxxxxxxxxxxx",
finishURL: "videoplayer.htm?filename="+filename,
};
var params = {
menu: "false",
scale: "noScale",
allowScriptAccess: "always",
bgcolor: "#000000"
};
var attributes = {
id:"webcamrecording"
};
swfobject.embedSWF("recording.swf", "recording", "620", "470", "9", "expressInstall.swf", flashvars, params, attributes);
function get_id()
{
var newDate = new Date();
return newDate.getTime();
}
function get_parm(name)
{
name = name.replace(/[\\[]/,"\\\\\\[").replace(/[\\]]/,"\\\\\\]");
var regexS = "[\\\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
{
return "";
}
else
{
return results[1];
}
}
</script>
<script type="text/javascript">
var video_id = get_id();
var filename = get_parm('filename');
if(filename == '' || filename == null)
{
filename = 'Video'+video_id;
}
var flashvars = {
filename: filename,
xxxxxxxxxxxxxxxxxxxxxxxxxx
etc. etc. etc. };
var attributes = {
id:"recorder"
};
function get_id()
{
var newDate = new Date();
return newDate.getTime();
}
</script>