Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

WebRTC Streaming

This example demonstrates how to setup a WebRTC server to configure the device and stream the results and preview from it.

Demo

example

Usage

Running this example requires a Luxonis device connected to your computer. Refer to the documentation to setup your device if you haven't done it already.

You can run the example fully on device (STANDALONE mode) or using your computer as host (PERIPHERAL mode).

Peripheral Mode

Installation

You need to first prepare a Python 3.10 environment with the following packages installed:

You can simply install them by running:

pip install -r requirements.txt

Enable insecure origins to be treated as secure (Chrome)

To ignore Chrome’s secure origin policy, follow these steps. Navigate to chrome://flags/#unsafely-treat-insecure-origin-as-secure in Chrome.
Find and enable the Insecure origins treated as secure section (see below). Add any addresses you want to ignore the secure origin policy for. Remember to include the port number too (if required). example Save and restart Chrome. Remember this is for dev purposes only. The live working app will need to be hosted on https.

Build the frontend web application. Go to the webrtc-streaming/client folder and run:

npm install
npm run build

Running in peripheral mode requires a host computer and there will be communication between device and host which could affect the overall speed of the app. Below are some examples of how to run the example.

Examples

python3 main.py

This will run the WebRTC Streaming example.

Standalone Mode (RVC4 only)

Running the example in the standalone mode, app runs entirely on the device. To run the example in this mode, first install the oakctl tool using the installation instructions here.

The app can then be run with:

oakctl connect <DEVICE_IP>
oakctl app run .

This will run the example with default argument values. If you want to change these values you need to edit the oakapp.toml file (refer here for more information about this configuration file).