【发布时间】:2015-10-25 01:06:06
【问题描述】:
我已尝试按照 www.scriptcam.com 和 How to save files in my server with ScriptCam plugin 的步骤进行操作。 如下脚本:
function fileReady(fileName) {
$('#recorder').hide();
$('#message').html('This file is now dowloadable for five minutes over
<a href='+fileName+'>here</a>.');
var x=fileName;
if (x != null){
$.post('ack.php', {x: x}, function(){
//successful ajax request
}).error(function(){
alert('error... ohh no!');
});
}
var fileNameNoExtension=fileName.replace(".mp4", "");
jwplayer("mediaplayer").setup({
width:320,
height:240,
file: fileName,
image: fileNameNoExtension+"_0000.jpg"
});
$('#mediaplayer').show();
}
ack.php
$val=$_POST['x'];
$file = $val;
$newfile = 'video/output.mp4';
if (!copy($file, $newfile)) {
echo "failed to copy $file...\n";
}
但文件没有存储在我的“视频”文件夹中,有什么解决办法?
【问题讨论】:
标签: javascript php jquery video-streaming video-recording