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, and the file was named: Video1335806296490.flv. I understand that the time and date in this file name, is the time and day of the recording expressed in seconds.
Would there be an easy line or two of code that I could add (or change) so that when I see the file name generated, it would be easier to recognize when the file name is created, as in some type of easier to read month and day and year and time of day?
Any assistance will be greatly appreciated. (Or suggest an alternative tweak to make file names more recognizable?)
Thanks.
Code:<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>



Reply With Quote

Bookmarks