codecs | RTCMultiConnection

You can manage audio/video codecs e.g. vp8, vp9, h264, opus, isac, G722 etc.

Usage

connection.codecs = {
    video: 'H264',
    audio: 'G722'
};

Description

parameterdescription
audio Audio codecs e.g. "opus", "G722", "ISAC" etc.
video Video codecs e.g. "h264", "vp9", "vp8" etc.

Wanna use H264 for video?

connection.codecs.video = 'H264';

Wanna use VP8 for video?

connection.codecs.video = 'VP8';

Wanna use VP9 for video?

connection.codecs.video = 'VP9';

Wanna use G722 for audio?

connection.codecs.audio = 'G722';

Wanna use opus for audio?

connection.codecs.audio = 'opus';

Demo

<script src="https://rtcmulticonnection.herokuapp.com/dist/RTCMultiConnection.min.js"></script>
<script src="https://rtcmulticonnection.herokuapp.com/socket.io/socket.io.js"></script>

<script>
var connection = new RTCMultiConnection();

// this line is VERY_important
connection.socketURL = 'https://rtcmulticonnection.herokuapp.com:443/';

// if you want audio+video conferencing
connection.session = {
    audio: true,
    video: true
};

connection.codecs = {
    video: 'H264',
    audio: 'G722'
};

connection.openOrJoin('your-room-id');
</script>