Skip to content

vunb/mediasoup_sample_v2

 
 

Repository files navigation

mediasoup_sample_v2

Examples for WebRTC SFU mediasoup v2 with node.js (Multiple participants)

  • mediasoup GitHub https://github.com/versatica/mediasoup
  • mediasoup Web site https://mediasoup.org
  • based on mediasoup-sample by footnik
  • This sample is build for mediasoup v2.6. This does not work with mediasoup v1.x.
  • This sample is check on macOS 10.13 High Sierra.
  • samples:
    • multi-party with WebSocket
    • multi-party with Socket.io
    • multi-room, multi-party with Socket.io
    • multi-room, 1 way sample (talk/watch) with Socket.io
  • TODO: TLS sample with WebSocket.
  • TODO: TLS sample with socket.io.

Node.jsで動くWebRTC SFU mediasoup v2のサンプルです。

  • v2.x用に作り直しました。v1.xでは動作しません。
  • footnikさんのmediasoup-sample を参考にしています
  • macOS 10.13 High Sierra で動作確認しています

Installation

git clone

git clone https://github.com/mganeko/mediasoup_sample_v2.git
cd mediasoup_sample/

git cloneします。

install npm modules

$ npm install ws
$ npm install express
$ npm install mediasoup
$ npm install socket.io

or

$ npm install

Python 2, make, g++ or clang are required for installing mediasoup.

npmモジュールをインストールします。mediasoupのインストールにはPython 2, make, g++かclangが必要です。

How to use

WebSocket sample

run server app

Start server which include Web server and WebSocket server, SFU server.

$ node mediasoup_sample_v2.js

or

$ npm start

サーバーを起動します。Webサーバー、WebSocketによるシグナリングサーバー、SFUサーバーを兼ねています。

access with browser

  • open http://localhost:3000/ with Chrome or Firefox.

  • click [Start Video] button, then [Connect] button

  • ブラウザ(ChromeかFirefox)で http://localhost:3000/ にアクセスします。

  • [Start Video] ボタンをクリックしてカメラとマイクを取得し、 [Connect] ボタンで通信を開始します

Socket.io sample

run server app

Start server which include Web server and socket.io server, SFU server.

$ node mediasoup_sample_v2_socketio.js

or

$ npm run socketio

サーバーを起動します。Webサーバー、Socket.ioによるシグナリングサーバー、SFUサーバーを兼ねています。

access with browser

Multi-room sample with Socket.io

run server app

Start server which include Web server and socket.io server, SFU server.

$ node mediasoup_sample_v2_socketio_room.js

or

$ npm run room

サーバーを起動します。Webサーバー、Socket.ioによるシグナリングサーバー、SFUサーバーを兼ねています。

access with browser

Multi-room 1 way sample with Socket.io

run server app

Start server which include Web server and socket.io server, SFU server.

$ node mediasoup_sample_v2_socketio_room.js

or

$ npm run room

サーバーを起動します。Webサーバー、Socket.ioによるシグナリングサーバー、SFUサーバーを兼ねています。

access with browser, talk side (up-stream)

access with browser, watch side (down-stream)

License / ライセンス

  • This samples are under the MIT license
  • このサンプルはMITランセンスで提供されます

About

sample for WebRTC SFU mediasoup v2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 65.3%
  • JavaScript 34.7%