So I hope that experienced people will share their experience with me and others.
Simply, I am going run locally popular example of WEBRTC app:
And based on this example I am going build simple, but efficient video chat app.
The apprtc installed, and even works locally without turn server ( "Same origin policy" don't allow use Google TURN server, which works only from
https://apprtc.appspot.com: access-control-allow-origin:"https://apprtc.appspot.com").
+
https://code.google.com/p/rfc5766-turn-server/ +
https://code.google.com/p/coturn/ +or somethink else.
I need simplicity and efficient. I am not too eager install heavy packages like java, node.... Of course I like Python and JavaScript :) So please advice me witch turn server I need too use.
2. Another great source about webrtc and turnservers is:
https://www.webrtc-experiment.com/docs/STUN-or-TURN.htmlThere are some mentions about STUN server. Hmm, I think good solution is use STUN and TURN for fallback. I think it is for advanced users, but maby somebody have done it. Please tell me what install, how configure servers and if is possible to configure apprtc app via this simple settings:
LOOPBACK_CLIENT_ID = 'LOOPBACK_CLIENT_ID'
TURN_URL_TEMPLATE = '%s/turn?username=%s&key=%s'
CEOD_KEY = '4080218913'
a) Do I need execute some turnadmin commands, which are described in INSTALL guide?
Or it will be enaugh to run turnserver from example:
my_name@my_machine:~/WEBRTC/turnserver-4.4.5.2/examples/scripts/restapi$ ./secure_relay_secret.sh
which contains:
if [ -d examples ] ; then
cd examples
fi
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/:/usr/local/mysql/lib/
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/usr/local/lib/:/usr/local/mysql/lib/
PATH="./bin/:../bin/:../../bin/:${PATH}" turnserver -v --syslog -a -L 127.0.0.1 -L ::1 -E 127.0.0.1 -E ::1 --max-bps=3000000 -f -m 3 --min-port=32355 --max-port=65535 --use-auth-secret --static-auth-secret=logen --realm=
north.gov --cert=turn_server_cert.pem --pkey=turn_server_pkey.pem --log-file=stdout -q 100 -Q 300 --cipher-list=ALL $@
b) When I open
localhost: 3478 in browser I see:
"TURN Server
use https connection for the admin session:
What uri is for rest API?
http://localhost:3478/turn.php from chinese tutorial show the same page
http://localhost:3478/turn from example apprtc TURN_URL_TEMPLATE show the same page
c) In rest API I need pass some parameters: username and key. Is it enough?
Will be enough to simply add extra -u switch to turnserver command? Need I some extra configurations?
d) How solve "Same origin policy"? I am not going experiment with the same ports and nginx, but simply set "access-control-allow-origin" header to turnserver response. How do it without nginx proxy? Or maby some others solutions?
e) Are some other important issues, which person running apprtc app and coturn server should know?
4. Are some other important issues?