This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class Roulette { | |
private sessions : Map<string, Session>; | |
private unmatched : Set<string>; | |
constructor() { | |
this.sessions = new Map(); | |
this.unmatched = new Set(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Server } from 'ws'; | |
import { createServer } from 'http'; | |
import Roulette from './roulette'; | |
const wss = new Server({ port: 8000 }); | |
const mm = new Roulette(); | |
wss.on('connection', ws => { | |
mm.register(ws); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in ubuntu versions above 14.04 coturn is already on the base repositories | |
echo "deb http://ftp.us.debian.org/debian jessie main" >> /etc/apt/sources.list | |
gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553 | |
gpg -a --export 8B48AD6246925553 | apt-key add - | |
gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010 | |
gpg -a --export 7638D0442B90D010 | apt-key add - | |
apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export KURENTO_URL=ws://your-kurento-instance-domain.com:port/kurento | |
npm run server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for this particular step, you will need | |
# docker installed. we recommend using another | |
# directory instead of /tmp | |
docker run --name kurento_docker \ | |
-p 8888:888 \ | |
-e KMS_STUN_IP='stun ip goes here' \ | |
-e KMS_STUN_PORT='stun port goes here' \ | |
-e KMS_TURN_URL='turn-url goes here, with credentials' \ | |
-v /tmp:/tmp \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//replace your turn/stun here | |
options.configuration = { | |
iceServers: [{"urls":"stun:stun.l.google.com:19302"}, { | |
"urls" : "turn:111.222.333.444", "username":"user", "credential":"pass"}] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to run this setup, you will need node.js, npm and bower | |
# node version 8.2.1 was used to run this demo | |
# you will need your own Kurento media server instance and TURN/STUN | |
# a docker-compose.yml is provided to make this easier | |
git clone https://github.com/agilityfeat/kurento-recording-test | |
cd ./kurento-recording-test | |
npm install | |
cd ./static |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ turnserver -avn -u user:password -r yourdomain.com | |
# “a” use long-term credentials, “v” verbose output, “n” do not load a configuration file. | |
# "u" Specify user and password credentials to be used. | |
# "r" Specify default realm, can be your domain. | |
# to check if coturn is running you can run | |
$ netstat -lnp | grep 3478 |
NewerOlder