我已将scriptcam放入2台主机服务器。 Bluehost和Hostinger仍然得到相同的结果,如下所示:(通过chrome web开发工具进行控制台检查)
ScriptCam version 1.4.0 booting...
Running on Flash PlugIn (WIN 11,6,602,180)
Adding global error handler
Adding right mousehandler
Retrieving flashvars
id:webcam
zoomChat:1
fileReady:function fileReady(qfileName) {
//$('#recorder').hide();
$('#message').html('Please wait for the file conversion to finish...');
waitForMovie(qfileName);
}
zoom:1
skewX:0
filename:testfile
rotate:0
noFlashFound:<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.4</a> to use this software.<br/>Please click on the link to download the installer.</p>
flip:0
cornerRadius:0
width:550
setVolume:function setVolume(value) {
$('#currentVolume').val(value);
alert('Current Volume is ' + value);
$.scriptcam.changeVolume(50);
}
chatWindow:chatWindow
height:320
maximumTime:30
onError:function onError(errorId,errorMsg) {
alert(errorMsg);
}
path:scriptcam/
connected:function showRecord() {
alert('Connect !!!');
$( "#recordStartButton" ).attr( "disabled", false );
//$('#b-screen').fadeIn(500);
//$('#start-btn').attr( "disabled", false );
}
skewY:0
timeLeft:function timeLeft(value) {
$('input#timeLeft').val(value);
}
Correcting video dimensions
Correcting scale
Drawing masks in memory
Starting ZXing
Setting AMF3 encoding
Init H264 encoder
h264Settings: Video codec used for compression: H264Avc
h264Settings: Level used for H.264/AVC encoding: 3
h264Settings: Profile used for H.264/AVC encoding: baseline
h264Settings: Bandwidth: 0
h264Settings: FPS: -1
h264Settings: Keyframe interval: 30
h264Settings: Quality: 90
Adding camera
Setting camera size to width: 550 height:320
Hardware acceleration used for camera: STAGEVIDEO
Hardware acceleration is available
License file loaded
Camera: Bandwidth: 0
Camera: Current FPS: 0
Camera: FPS: 30
Camera: Keyframe Interval: 30
Camera: Quality: 90
虽然如果我在演示中查看他们的网站来录制相机,则会看到以下内容:(通过chrome web开发者工具进行控制台检查)
ScriptCam version 1.4.0 booting...
Running on Flash PlugIn (WIN 11,6,602,180)
Adding global error handler
Adding right mousehandler
Retrieving flashvars
cornerColor:e3e5e2
id:webcam
cornerRadius:20
timeLeft:function timeLeft(value) {
$('#timeLeft').val(value);
}
skewX:0
onError:function onError(errorId,errorMsg) {
alert(errorMsg);
}
skewY:0
fileName:demo430142
rotate:0
promptWillShow:function promptWillShow() {
alert('A security dialog will be shown. Please click on ALLOW.');
}
noFlashFound:<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.4</a> to use this software.<br/>Please click on the link to download the installer.</p>
width:320
connected:function showRecord() {
$( "#recordStartButton" ).attr( "disabled", false );
}
flip:0
height:240
onWebcamReady:function onWebcamReady(cameraNames,camera,microphoneNames,microphone,volume) {
$( "#slider" ).slider( "option", "disabled", false );
$( "#slider" ).slider( "option", "value", volume );
$.each(cameraNames, function(index, text) {
$('#cameraNames').append( $('<option></option>').val(index).html(text) )
});
$('#cameraNames').val(camera);
$.each(microphoneNames, function(index, text) {
$('#microphoneNames').append( $('<option></option>').val(index).html(text) )
});
$('#microphoneNames').val(microphone);
}
path:
showMicrophoneErrors:false
chatWindow:chatWindow
fileReady:function fileReady(fileName) {
$('#recorder').hide();
$('#message').html('Please wait for the file conversion to finish...');
waitForMovie(fileName);
}
zoom:1
setVolume:function setVolume(value) {
value=parseInt(32 * value / 100) + 1;
for (var i=1; i < value; i++) {
$('#LedBar' + i).css('visibility','visible');
}
for (i=value; i < 33; i++) {
$('#LedBar' + i).css('visibility','hidden');
}
}
zoomChat:1
Correcting video dimensions
Correcting scale
Drawing masks in memory
Starting ZXing
Setting AMF3 encoding
Init H264 encoder
h264Settings: Video codec used for compression: H264Avc
h264Settings: Level used for H.264/AVC encoding: 3
h264Settings: Profile used for H.264/AVC encoding: baseline
h264Settings: Bandwidth: 0
h264Settings: FPS: -1
h264Settings: Keyframe interval: 30
h264Settings: Quality: 90
Adding camera
Setting camera size to width: 320 height:240
Hardware acceleration used for camera: STAGEVIDEO
Hardware acceleration is available
GET https://www.scriptcam.com/scriptcam.lic 404 (Not Found) demo_2.cfm:804
License could not be found
Camera: Bandwidth: 0
Camera: Current FPS: 0
Camera: FPS: 30
Camera: Keyframe Interval: 30
Camera: Quality: 90
Connecting to server
The page at https://www.scriptcam.com/demo_2.cfm displayed insecure content from http://europe.scriptcam.com:443/fcs/ident2.
(program):1
POST http://europe.scriptcam.com:443/fcs/ident2 404 (Not Found) europe.scriptcam.com:443/fcs/ident2:1
The page at https://www.scriptcam.com/demo_2.cfm displayed insecure content from http://europe.scriptcam.com:443/open/1.
(program):1
POST http://europe.scriptcam.com:443/open/1 404 (Not Found) europe.scriptcam.com:443/open/1:1
conectionOK
connectionOK-connect
connectionOK-connect-past
ncstatusevent fired
NetConnection.Connect.Success
NetConnection connected with protocol rtmp, proxy type none, connected proxy type none
如果看到的话,我上传的页面是他们的demo2.html,我相信它们的设置与他们网站上的演示页面相同。他们的连接不是我的,我在做错什么吗?有没有人有使用scriptcam(1.40版)的经验?还是有人对Javascript Webcam Flash Lib有更好的建议?
任何建议都会大受赞赏...
提前致谢,
阿龙·伊萨迪(Arung Isyadi)
最佳答案
js代码中有一个函数:
function fileReady(fileName) {
$('#recorder').hide();
$('#message').html('This file is now dowloadable for five minutes over <a href='+fileName+'">here</a>.');
[...]
哪个将文件上传到网络摄像头服务器。
错误在于href值。
替换:
href='+fileName+'"
与:
href='+fileName+'
。(删除最后一个“”)