In this tutorial, we will walk you through the steps to run Telnyx Video Rooms locally on Raspberry Pi to capture and share video.
Requirements
To complete this tutorial, you will need:
A webcam
Raspberry Pi with Linux OS installed
Node.js version 12 or higher
Yarn to run application locally
Step 1: Clone the project and install dependencies
Clone the telnyx-meet repository from team-telnyx public github in Raspberry Pi
git clone https://github.com/team-telnyx/telnyx-meet.git
Go to the API Keys page and copy the API Key. Incase there is no API Key, then create one.
Next, copy the
.env.sample
file and name the new file.env.local
and addTELNYX_API_KEY
to it.To install dependencies, open location where folder is in terminal and run following command:
yarn
Once dependencies are installed, initialize the server:
yarn dev
Open the link mentioned in the terminal in the default browser and click on "Join A Room"
Make sure that a webcam is attached to the Raspberry Pi or else you will get an error
You will be asked to provide your name (optional), room ID and enable camera.
Next, we need to acquire the
Room ID
Step 2: Acquire Room ID
To work with Telnyx Video, we need to create a Room and acquire Room ID.
Run CURL command in terminal on Raspberry Pi
curl -X POST \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer API_KEY" \
--data '{"enable_recording":true,"max_participants":10, "unique_name":"RPi Room"}' \
https://api.telnyx.com/v2/rooms
Copy the
id
value which is your Room ID and keep it with you.
Step 3: Provide Room ID and Join the Room
Once you have acquired Room ID, fill the values and click on 'Join Room'
You should be able to see the Video on your Raspberry Pi