All Projects → MixinNetwork → Kraken

MixinNetwork / Kraken

Licence: apache-2.0
🐙 High performance WebRTC SFU implemented with pure Go.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Kraken

Briefing
Secure direct video group chat
Stars: ✭ 710 (+517.39%)
Mutual labels:  webrtc, end-to-end-encryption
Peertransfer
📦 • Send a file p2p and e2e encrypted in your browser using WebRTC.
Stars: ✭ 238 (+106.96%)
Mutual labels:  webrtc, end-to-end-encryption
Deskreen
Deskreen turns any device with a web browser into a secondary screen for your computer
Stars: ✭ 12,014 (+10346.96%)
Mutual labels:  webrtc, end-to-end-encryption
Megachat
MEGA C++ SDK for chat-enabled apps
Stars: ✭ 61 (-46.96%)
Mutual labels:  webrtc, end-to-end-encryption
Webrtc Experiment
WebRTC, WebRTC and WebRTC. Everything here is all about WebRTC!!
Stars: ✭ 10,335 (+8886.96%)
Mutual labels:  webrtc
Opentok Network Test
Sample app to test network connectivity and statistics (bps, packet-lost)
Stars: ✭ 104 (-9.57%)
Mutual labels:  webrtc
Cloud Game
Web-based Cloud Gaming service for Retro Game
Stars: ✭ 1,374 (+1094.78%)
Mutual labels:  webrtc
Etebase Js
Etebase TypeScript API for the web, node and react-native!
Stars: ✭ 100 (-13.04%)
Mutual labels:  end-to-end-encryption
Netsix
Netsix allows you to share videos with your friends in a real peer-to-peer manner using WebRTC.
Stars: ✭ 113 (-1.74%)
Mutual labels:  webrtc
Turn
RFC 5766 TURN implementation in go
Stars: ✭ 109 (-5.22%)
Mutual labels:  webrtc
Instacam
Instant canvas video
Stars: ✭ 106 (-7.83%)
Mutual labels:  webrtc
Callroulette
A WebRTC demo using Python (asyncio + aiohttp) as the backend
Stars: ✭ 104 (-9.57%)
Mutual labels:  webrtc
Awesome Rtc Hacking
a list of awesome resources related to security and hacking of VoIP, WebRTC and VoLTE
Stars: ✭ 108 (-6.09%)
Mutual labels:  webrtc
Translator
Translator.js is a JavaScript library built top on Google Speech-Recognition & Translation API to transcript and translate voice and text. It supports many locales and brings globalization in WebRTC! https://www.webrtc-experiment.com/Translator/
Stars: ✭ 103 (-10.43%)
Mutual labels:  webrtc
Sdp
RFC 4566 SDP implementation in go
Stars: ✭ 109 (-5.22%)
Mutual labels:  webrtc
Rn Voice Video Call
Usage of WebRTC for voice & video call with peer-to-peer or conference with Login and Register screen using response & Async storage with Call Dis/Connect, Failed and Idle views in react native. Youtube:
Stars: ✭ 100 (-13.04%)
Mutual labels:  webrtc
P2p Webrtc
p2p Video Call Connection by WebRTC
Stars: ✭ 106 (-7.83%)
Mutual labels:  webrtc
Simplewebrtcexample ios
Simple example for WebRTC on iOS written in swift5
Stars: ✭ 108 (-6.09%)
Mutual labels:  webrtc
Webtorrent.io
The code that runs the WebTorrent website
Stars: ✭ 106 (-7.83%)
Mutual labels:  webrtc
No Server Webrtc Android
A demo of using WebRTC with no signaling server. But in Kotlin (Java) for Android.
Stars: ✭ 105 (-8.7%)
Mutual labels:  webrtc

Kraken

🐙 High performance WebRTC SFU implemented with pure Go.

Architecture

Kraken SFU only supports simple group audio conferencing, more features may be added easily.

Both Unified Plan and RTCP-MUX supported, so that only one UDP port per participant despite the number of participants in a room.

monitor [WIP]

This is the daemon that load balance all engine instances according to their system load, and it will direct all peers in a room to the same engine instance.

engine

The engine handles rooms, all peers in a room should connect to the same engine instance. No need to create rooms, a room is just an ID to distribute streams.

Access the engine with HTTP JSON-RPC, some pseudocode to demonstrate the full procedure.

var roomId = getUrlQueryParameter('room');
var userId = uuidv4();
var trackId;

var pc = new RTCPeerConnection(configuration);

// send ICE candidate to engine
pc.onicecandidate = ({candidate}) => {
  rpc('trickle', [roomId, userId, trackId, JSON.stringify(candidate)]);
};

// play the audio stream when available
pc.ontrack = (event) => {
  el = document.createElement(event.track.kind)
  el.id = aid;
  el.srcObject = stream;
  el.autoplay = true;
  document.getElementById('peers').appendChild(el)
};

// setup local audio stream from microphone
const stream = await navigator.mediaDevices.getUserMedia(constraints);
stream.getTracks().forEach((track) => {
  pc.addTrack(track, stream);
});
await pc.setLocalDescription(await pc.createOffer());

// RPC publish to roomId, with SDP offer
var res = await rpc('publish', [roomId, userId, JSON.stringify(pc.localDescription)]);
// publish should respond an SDP answer
var jsep = JSON.parse(res.data.jsep);
if (jsep.type == 'answer') {
  await pc.setRemoteDescription(jsep);
  trackId = res.data.track;
  subscribe(pc);
}

// RPC subscribe to roomId periodically
async function subscribe(pc) {
  var res = await rpc('subscribe', [roomId, userId, trackId]);
  var jsep = JSON.parse(res.data.jsep);
  if (jsep.type == 'offer') {
    await pc.setRemoteDescription(jsep);
    var sdp = await pc.createAnswer();
    await pc.setLocalDescription(sdp);
    // RPC anwser the subscribe offer
    await rpc('answer', [roomId, userId, trackId, JSON.stringify(sdp)]);
  }
  setTimeout(function () {
    subscribe(pc);
  }, 3000);
}

async function rpc(method, params = []) {
  const response = await fetch('http://localhost:7000', {
    method: 'POST',
    mode: 'cors',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({id: uuidv4(), method: method, params: params})
  });
  return response.json();
}

Quick Start

Setup Golang development environment at first.

git clone github.com/MixinNetwork/kraken
cd kraken && go build

cp config/engine.example.toml config/engine.toml
ip address # get your network interface name, edit config/engine.toml

./kraken -c config/engine.toml -s engine

Get the source code of either kraken.fm or Mornin, follow their guides to use your local kraken API.

Community

Kraken is built with Pion, we have discussions over their Slack.

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].