All Projects → versatica → Mediasoup Client

versatica / Mediasoup Client

Licence: isc
mediasoup client side JavaScript library

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Mediasoup Client

Com.unity.webrtc
WebRTC package for Unity
Stars: ✭ 271 (-15.31%)
Mutual labels:  webrtc
Awesome Live Stream
Webrtc && Nginx && DASH && Quic 学习资料收集,持续更新中
Stars: ✭ 290 (-9.37%)
Mutual labels:  webrtc
Monibuca
🧩 Monibuca is a Modularized, Extensible framework for building Streaming Server
Stars: ✭ 307 (-4.06%)
Mutual labels:  webrtc
Awesome Pion
A curated list of awesome things related to Pion
Stars: ✭ 272 (-15%)
Mutual labels:  webrtc
Starrtc Web Demo
一对一voip视频聊天,直播连麦,多人视频会议,在线会议web演示:
Stars: ✭ 281 (-12.19%)
Mutual labels:  webrtc
Jeelizar
JavaScript object detection lightweight library for augmented reality (WebXR demos included). It uses convolutional neural networks running on the GPU with WebGL.
Stars: ✭ 296 (-7.5%)
Mutual labels:  webrtc
Zlmediakit
WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181 server and client framework based on C++11
Stars: ✭ 5,248 (+1540%)
Mutual labels:  webrtc
Mediasoup
Cutting Edge WebRTC Video Conferencing
Stars: ✭ 4,054 (+1166.88%)
Mutual labels:  webrtc
Jitsi Meet
Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
Stars: ✭ 17,247 (+5289.69%)
Mutual labels:  webrtc
Webrtc Tutorial
📚 WebRTC 中文教程
Stars: ✭ 305 (-4.69%)
Mutual labels:  webrtc
Wilearning
Multiparty meeting&e-learning using mediasoup, webrtc ,angular and ionic with powerful whiteboard support
Stars: ✭ 280 (-12.5%)
Mutual labels:  webrtc
Vosk Server
WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Stars: ✭ 277 (-13.44%)
Mutual labels:  webrtc
Google Maps Services Python
Python client library for Google Maps API Web Services
Stars: ✭ 3,443 (+975.94%)
Mutual labels:  client-library
Ion
Real-Distributed RTC System by pure Go and Flutter
Stars: ✭ 3,279 (+924.69%)
Mutual labels:  webrtc
Server
screen sharing for developers https://screego.net/
Stars: ✭ 3,931 (+1128.44%)
Mutual labels:  webrtc
Oorja
[archived] effortless video-voice chat with realtime collaborative features. extensible using react components 🙌
Stars: ✭ 270 (-15.62%)
Mutual labels:  webrtc
Peerjs Server
Server for PeerJS
Stars: ✭ 3,313 (+935.31%)
Mutual labels:  webrtc
Gb28181.solution
Linux/Win/Docker/kubernetes/Chart/Kustomize/GB28181/SIP/RTP/SDP/WebRTC/作为上下级域/平台级联互联
Stars: ✭ 323 (+0.94%)
Mutual labels:  webrtc
Decentralized Video Chat
🚀 Zipcall- Acquired @ 250k users 🚀 Peer to peer browser video calling platform with unmatched video quality and latency.
Stars: ✭ 3,284 (+926.25%)
Mutual labels:  webrtc
Meething
dWebRTC Video Meetings MESH/SFU hybrid using GunDB, MediaSoup and Beyond!
Stars: ✭ 303 (-5.31%)
Mutual labels:  webrtc

mediasoup-client v3

JavaScript client side library for building mediasoup based applications.

Website and Documentation

Support Forum

Usage Example

import { Device } from 'mediasoup-client';
import mySignaling from './my-signaling'; // Our own signaling stuff.

// Create a device (use browser auto-detection).
const device = new Device();

// Communicate with our server app to retrieve router RTP capabilities.
const routerRtpCapabilities = await mySignaling.request('getRouterCapabilities');

// Load the device with the router RTP capabilities.
await device.load({ routerRtpCapabilities });

// Check whether we can produce video to the router.
if (!device.canProduce('video'))
{
  console.warn('cannot produce video');

  // Abort next steps.
}

// Create a transport in the server for sending our media through it.
const { 
  id, 
  iceParameters, 
  iceCandidates, 
  dtlsParameters,
  sctpParameters
} = await mySignaling.request(
  'createTransport',
  {
    sctpCapabilities : device.sctpCapabilities
  });

// Create the local representation of our server-side transport.
const sendTransport = device.createSendTransport(
  {
    id, 
    iceParameters, 
    iceCandidates, 
    dtlsParameters,
    sctpParameters
  });

// Set transport "connect" event handler.
sendTransport.on('connect', async ({ dtlsParameters }, callback, errback) =>
{
  // Here we must communicate our local parameters to our remote transport.
  try
  {
    await mySignaling.request(
      'transport-connect',
      {
        transportId: sendTransport.id,
        dtlsParameters
      });

    // Done in the server, tell our transport.
    callback();
  }
  catch (error)
  {
    // Something was wrong in server side.
    errback(error);
  }
});

// Set transport "produce" event handler.
sendTransport.on(
  'produce',
  async ({ kind, rtpParameters, appData }, callback, errback) =>
  {
    // Here we must communicate our local parameters to our remote transport.
    try
    {
      const { id } = await mySignaling.request(
        'produce',
        { 
          transportId : sendTransport.id,
          kind,
          rtpParameters,
          appData
        });

      // Done in the server, pass the response to our transport.
      callback({ id });
    }
    catch (error)
    {
      // Something was wrong in server side.
      errback(error);
    }
  });

// Set transport "producedata" event handler.
sendTransport.on(
  'producedata',
  async ({ sctpStreamParameters, label, protocol, appData }, callback, errback) =>
  {
    // Here we must communicate our local parameters to our remote transport.
    try
    {
      const { id } = await mySignaling.request(
        'produceData',
        { 
          transportId : sendTransport.id,
          sctpStreamParameters,
          label,
          protocol,
          appData
        });

      // Done in the server, pass the response to our transport.
      callback({ id });
    }
    catch (error)
    {
      // Something was wrong in server side.
      errback(error);
    }
  });

// Produce our webcam video.
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
const webcamTrack = stream.getVideoTracks()[0];
const webcamProducer = await sendTransport.produce({ track: webcamTrack });

// Produce data (DataChannel).
const dataProducer =
  await sendTransport.produceData({ ordered: true, label: 'foo' });

Authors

License

ISC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].