---
# System prepended metadata

title: WebRTC

---


# WebRTC 
## Understand
https://www.html5rocks.com/en/tutorials/webrtc/basics/

### Opinions for game
Opinion against https://www.reddit.com/r/gamedev/comments/cgvqr5/anyone_use_webrtc_for_a_multiplayer_browser_game/
General demo 
https://www.youtube.com/watch?v=Dx-_wnLuMpU
## Native webrtc 

  Example of multiplayer game using pure WebRTC
  https://dev.to/rynobax_7/creating-a-multiplayer-game-with-webrtc
	https://github.com/rynobax/jump-game
Native webrtc doc https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API

## Webrtc libraries
### simple-peer	
Tutoriel sympa with simple peer https://www.youtube.com/watch?v=6jCbngYr7oQ
	<script src="https://cdn.jsdelivr.net/npm/simple-peer@9.7.2/index.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/simple-peer/9.7.2/simplepeer.min.js" integrity="sha512-RZlErEuUwWv3EhGNhvni9vinu0QPwNU0OyWAlhTeezEToTZu/C+/Mn7ItRFmpcf8MTK0J2kRalSfzrpQqF7wJQ==" crossorigin="anonymous"></script>
### Peerjs
https://peerjs.com/
	<script src="https://cdnjs.cloudflare.com/ajax/libs/peerjs/1.3.1/peerjs.min.js" integrity="sha512-wNUAk/IKoDcVSiKiN/0ormRTzENc9IbFdHa/BWNuLPtp2kG53TLf5dobOeCHoeafnlaSfjKAiSewS6AJspm/Iw==" crossorigin="anonymous"></script>
    
    
### Signalling

Comprend Simple Peer, a jour :  https://github.com/t-mullen/simple-signal
Inclus un exemple clair "lobby"

Pas a jour:
https://www.npmjs.com/package/signalhub
Exemple https://github.com/shama/letswritecode/tree/master/simple-p2p-with-webrtc
## General view on webrtc.

## Client Server model
https://blog.brkho.com/2017/03/15/dive-into-client-server-web-games-webrtc/
webrtc library https://github.com/geckosio


## Libp2p in the browser
https://github.com/libp2p/js-libp2p/tree/master/examples/libp2p-in-the-browser


# Autres solutions