Skip to content

mhama/WebRtcUnityPluginSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Sample unity3d project to demonstrate WebRTC official unity plugin. with simple WebRTC signaling implemented with Socket.IO.

Requirements

  • Unity3D 2017.3+
  • node.js

Using Libraries

Instructions

launch signaling server

  • On Windows:
> server.bat

or

  • On Mac/Linux
npm install
node index.js
  • Output Log
>call npm install
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
...

listening on *:3000
forwarding to global domain...
ngrok server: https://440ab904.ngrok.io
  • The last "ngrok server" part is IMPORTANT!
  • the server URL lasts for 24 hours only. After that, you need to restart server for another 24 hours.

Launch unity app

build and run unity project.

Start WebRTC on unity app

  • set the above ngrok server URL to app's server URL field. (but use http:// rather than https://)
  • push Connect button
  • push Offer with Camera button

Start the other side of WebRTC

  • browse the above ngrok server URL with web browser. (the web browser needs to support WebRTC).
  • push Start Camera button
  • push Start Peer button

Signaling

This sample use signaling with http long polling of Socket.IO. Very dirty implementation that doesnot handle bad states or errors.

Caution

Beware that WebRTC may use very much bandwidth! Beware especially if you are not using fixed price connection.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published