Jump to content

Recommended Posts

I have purchased a script that allows a web page visitor to record via their web cam.

When the user selects 'stop recording" he's automatically taken to the player page and can play the video named VideoZ.

 

The Player page code is below.

 

What code can I add that will rename the file name VideoZ and give the recording a unique file name upon the user selecting "Save"?

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
	<title>check recorded video</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script type="text/javascript" src="js/swfobject.js"></script>
</head>

<body bgcolor="#ffffff">
	<div id="player"></div>
             <script type="text/javascript">
               // <![CDATA[
               var so = new SWFObject("player.swf", "player", "640", "480", "9", "#000000");
      	  so.addParam('flashvars','file=VideoZ&streamer=rtmp://67.xxx.xxx.xxx/videos');
               so.write("player");
               // ]]>
               </script>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/242699-renaming-the-file-upon-saving/
Share on other sites

Thanks for your reply. To reply to your "need to find where the file is being created", the file is being "created" in the html (below - index.html). the script names each recording with the file name "VideoZ". Each time a recording is made it is saved as VideoZ, therefore replacing the previous recording each time. I'd like to save all recordings, not just have the latest one replace the previous one. Do I need to add some php somewhere to accomplish giving each recording a unique name? Any help will be appreciated.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
	<title>recorder</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script type="text/javascript" src="js/swfobject.js"></script>
</head>
<body bgcolor="#ffffff">
	<div id="recorder"></div>
              <script type="text/javascript">
               // <![CDATA[
               var so = new SWFObject("recorder.swf", "recorder", "620", "470", "9", "#000000");
		   so.addParam('flashvars','filename=VideoZ&rtmpPath=rtmp://67.xxx.xxx.xxx/vid/&finishURL=player.html')
               so.write("recorder");
               // ]]>
               </script>


</body>
</html>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.