Error: Server accepted your connection, but refused your privilege to record?
Hi guys,
I'm developing an EJB application with Glassfish and Adobe Flash Media Server and MySQL at the backend. I have a page in my application with which I record a feedback of the user. I'm using the Adobe Media Flash server for this. I've set my host path to rtmp://localhost:1935/ as the flash server is installed on my local machine. I've loaded my application on Adobe Media Administration Console. Whenever I run this feedback page I get a "Server accepted your connection, but refused your privilege to record" error.
My js file as below:
Widget.VideoPlayer = Class.create(Widget, {
classType: 'VideoPlayer',
id: "videoPlayer",
objectId: "videoPlayerObject",
player: null,
width: 500,
height: 375,
/**
* Note that the instance of this object must be global and be named the same as the id so that the flash player can call it back.
*/
initialize: function(id, objectId, width, height) {
this.id = id || this.id;
this.objectId = objectId ||this.objectId;
this.width = width || this.width;
this.height = height || this.height;
if(typeof swfobject == "undefined")
return this.showError("The VideoPlayer widget requires that the swfobject library be imported");
this.createPlayer();
},
createPlayer: function() {
var flashvars = {
};
var params = {
menu: "false",
scale: "noScale",
allowFullscreen: "false",
allowScriptAccess: "sameDomain",
bgcolor: "#99AAC9",
wmode: "opaque"
};
var attributes = {
id: this.objectId,
name: this.objectId
};
swfobject.embedSWF(
"/includes/swf/myapp/ProjmyappPlayer.swf",
this.objectId, this.width, this.height, "10.0.0",
"/includes/swf/myapp/expressInstall.swf",
flashvars, params, attributes);
// There is a delay before the object appears on the page and no callback event
var checkLoaded = setInterval(function(){
if($(this.objectId).tagName == "OBJECT") {
try {
this.player = $(this.objectId);
this.setId(this.id);
this.player.player = this; // circular reference
clearInterval(checkLoaded);
this.dispatch("onPlayerCreate");
} catch(ex) {
this.log("Failed Loading: "+ex);
}
}
}.bind(this), 500);
},
/*******************************
* Player Invocations
*******************************/
setId: function(id) {
this.id = id || this.id;
this.player.setId(this.id);
},
setServer: function(serverName) {
this.player.setServer(serverName);
},
setVideo: function(videoName) {
this.player.setVideo(videoName);
},
setVideoServer: function(serverName, videoPath, videoName) {
this.player.setVideoServer(serverName, videoPath, videoName);
},
setQueryParam: function(paramName, paramValue){
this.player.setQueryParam(paramName, paramValue);
},
play: function() {
this.player.playVideo();
},
pause: function() {
this.player.pauseVideo();
},
record: function() {
this.player.recordVideo();
},
stop: function() {
this.player.stopVideo();
},
showError: function(message, title) {
title = title || "Video Player Error";
(new Widget.Dialog(title, message)).showDialog();
return null;
},
enableWebcam: function(){
this.player.enableWebcam();
},
setAllowReRecord: function(allowRerecord){
this.player.setAllowReRecord(allowRerecord);
},
setRecordLimit: function(recordLimit){
this.player.setRecordLimit(recordLimit);
},
showSettings: function() {
this.player.showSettings();
},
showWebcamSettings: function() {
this.player.showWebcamSettings();
},
/***************************
* Player callback events
***************************/
onPlayStart: function() {
this.dispatch("onPlayStart");
},
onPlayStop: function() {
this.dispatch("onPlayStop");
},
onConnectingStart: function() {
this.dispatch("onConnectingStart");
},
onRecordStart: function() {
this.dispatch("onRecordStart");
},
onRecordStop: function () {
this.dispatch("onRecordStop");
},
onConnectionFail: function() {
this.dispatch("onConnectionFail");
},
onCameraReady: function(){
this.dispatch("onCameraReady");
},
onPlayerReady: function() {
this.dispatch("onPlayerReady");
},
onVideoExists: function() {
this.dispatch("onVideoExists");
},
onSettingsClosed: function () {
this.dispatch("onSettingsClosed");
},
onRecordBlocked: function () {
this.dispatch("onRecordBlocked");
},
dispatch: function(event) {
window.document.fire(this.id+":"+event);
this.log("Fireing Event: "+this.id+":"+event);
},
log: function(message) {
if(typeof console != "undefined")
console.log(message);
}
});
Please if anyone could help me remove this error. Thanks in advance.
