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

jmservera/videochat-webapp

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
js
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.