Streaming Recording recorded file download

Goji

New Member
Hi,
I want to download the recorded file from server using javascript ajax call by url "https://host:8888/client/records/stream-xxxx.mp4". But it prompt error saying that "No 'Access-Control-Allow-Origin' header is present on the requested resource.". Is there any setting for this?
I noticed that there's crossdomain.xml file in conf folder, but I didn't change anything after the server setup.

Please advise. Thanks.
 
Hello
You have to use your own web server, for example Apache.
Once recording is complete, WCS invokes the script
/usr/local/FlashphonerWebCallServer/bin/on_record_hook.sh
Code:
STREAM_NAME=$1
FILE_NAME=$2
echo $STREAM_NAME
echo $FILE_NAME
You can modify this script and place your recorded file to your web server's directory.
Example of on_record_hook.sh:
Code:
cp /usr/local/FlashphonerWebCallServer/record/$FILE_NAME /var/www/html
Or you can transfer your recorded file to another host
Code:
scp /usr/local/FlashphonerWebCallServer/record/$FILE_NAME root@myotherhost:/var/www/html
Therefore you can deliver the recording file from your own domain and cross-domain issue will be resolved.
 
Hi Max,

Already tried to add in the copy command into on_record_hook.sh, but not able get the file transfer to apache web server.
"cp /usr/local/FlashphonerWebCallServer/records/$FILE_NAME /var/www/html/"
Tested the command manually, it able to copy over the file.
May I know how we know on_record_hook.sh had been invoked? where the 2 echo message will print out?

Thanks.
 
You can print echo message to a log file
Code:
echo $FILE_NAME >> /tmp/log.txt
 
For example, this works for me:
Code:
echo $FILE_NAME >> /tmp/log.txt
cp $FILE_NAME /tmp
I'm able to copy recorded file to /tmp dir.
 
Hi,
able to copy the file now, variable $FILE_NAME having value full path of the recorded file.
working now with "cp $FILE_NAME /var/www/html/".
Thanks.
 
Top