Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.

jmservera/videochat-webapp

Repository files navigation

Video Chat app

A WebRTC test

You may need a TURN server and to create a certificate for it:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365

Use this technique for coturn password:

private getTURNCredentials(name:string, secret:string):{username:string,password:string} {
    var unixTimeStamp:Number = Math.round(Date.now()/1000) + 24*3600,  // this credential would be valid for the next 24 hours
        username:string = [unixTimeStamp, name].join(':'), password:string,
        hmac = crypto.createHmac('sha1', secret);
    hmac.setEncoding('base64');
    hmac.write(username);
    hmac.end();
    password = hmac.read();
    return {
        username: username,
        password: password
    };
}

You can find more WebRTC good explanations in this article.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •