How to use the mediasoup.webrtc function in mediasoup

To help you get started, we’ve selected a few mediasoup examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tan-tan-kanarek / mediasoup-server / lib / connection.js View on Github external
'use strict';

const EventEmitter = require('events');

const mediasoup = require('mediasoup');
const RTCPeerConnection = mediasoup.webrtc.RTCPeerConnection;

class WebRtcConnection extends EventEmitter {
	constructor(server, socket){
		super();

		this.server = server;
		this.socket = socket;
		this.peerConnection = null;

		this.id = socket.id;
		this.sdp = null;
		this.roomId = null;
		this.mediaPeer = null;

		// socket.io
		socket.on('disconnect', () => {
github tan-tan-kanarek / mediasoup-server / server.js View on Github external
const url = require('url');
const udid = require('udid');
const util = require('util');
const path = require('path');
const rtsp = require('rtsp-stream');
const dgram = require('dgram');
const https = require('https');
const express = require('express');
const Promise = require('bluebird');
const socketIO = require('socket.io');
const child_process = require('child_process');
const sdp_transform = require('sdp-transform');

const mediasoup = require('mediasoup');
const RTCPeerConnection = mediasoup.webrtc.RTCPeerConnection;
const RTCSessionDescription = mediasoup.webrtc.RTCSessionDescription;
const roomOptions = require('./data/options').roomOptions;
const peerCapabilities = require('./data/options').peerCapabilities;

const OutputTypes = {
	RTMP: 1,
	MKV: 2,
	MP4: 3
};

class Room {
	
	constructor(mediaServer, name){
		const d = new Date();
		this.id = udid('y' + name + d.getTime());
		this.name = name;
		this.mediaServer = mediaServer;
github tan-tan-kanarek / mediasoup-server / server.js View on Github external
const net = require('net');
const url = require('url');
const udid = require('udid');
const util = require('util');
const path = require('path');
const rtsp = require('rtsp-stream');
const dgram = require('dgram');
const https = require('https');
const express = require('express');
const Promise = require('bluebird');
const socketIO = require('socket.io');
const child_process = require('child_process');
const sdp_transform = require('sdp-transform');

const mediasoup = require('mediasoup');
const RTCPeerConnection = mediasoup.webrtc.RTCPeerConnection;
const RTCSessionDescription = mediasoup.webrtc.RTCSessionDescription;
const roomOptions = require('./data/options').roomOptions;
const peerCapabilities = require('./data/options').peerCapabilities;

const OutputTypes = {
	RTMP: 1,
	MKV: 2,
	MP4: 3
};

class Room {
	
	constructor(mediaServer, name){
		const d = new Date();
		this.id = udid('y' + name + d.getTime());
		this.name = name;

mediasoup

Cutting Edge WebRTC Video Conferencing

ISC
Latest version published 21 days ago

Package Health Score

87 / 100
Full package analysis