Javascript SDK Implementation
Demo App

Samvyo Demo App

To get started with the Samvyo SDK, you can either set up and integrate the SDK into your application from scratch or clone our demo app to skip the initial setup steps. Follow these instructions to get started quickly.

Clone the Demo App

  1. Clone the demo app repository from GitHub:
git clone https://github.com/Samvyo/samvyo-minimal-demo-app.git
  1. Navigate to the cloned directory:
cd samvyo-minimal-demo-app
  1. Set Up Environment Variables:
  • Modify the file named .env.sample to .env in the root directory of the project.
  1. Get Access and Secret Access Keys:
  • Open the Samvyo dashboard (opens in a new tab).
  • If you don't have an account, create one by signing up.
  • Log in to your account and navigate to the "Settings" >> "API Keys" section.
  • Generate your access key and secret access key.
  1. Update the .env File:
  • Modify the following lines in your .env file, replacing ACCESS_KEY and SECRET_ACCESS_KEY with your actual access key and secret access key:
ACCESS_KEY = your_access_key;
SECRET_ACCESS_KEY = your_secret_access_key;
  1. Save the .env file.

  2. Start the Demo App:

  • Install the dependencies:
npm install
  • Start the development server:
npm start
  • Open your browser and navigate to http://localhost:3300/.
  1. Initialize and Join a Room:
  • Enter the roomId and peerName in the input fields
  • Click the Init Room button to initialize the room connection
  • Once initialization is successful, you'll see the following options:
    • Start Room: Click to start the room session
    • Process Files: Available for file processing if needed
    • Leave Room: To exit the current room
  1. Room Controls: Once you've joined the room, you'll have access to the following controls:
  • Audio Controls:
    • Mute/Unmute microphone
    • Switch audio input devices
  • Video Controls:
    • Enable/Disable camera
    • Switch video input devices
  • Screen Sharing:
    • Start/Stop screen sharing
    • Choose specific window or screen to share
  • Recording:
    • Start/Stop recording
    • Download recorded session
  1. Invite Others:
  • To invite others to the room, share the URL with them
  • They can join by entering the same roomId after deployment
  • Each participant will have access to the same controls once they join

Summary

By cloning the demo app, you can quickly get started with Samvyo without the hassle of setting everything up from scratch. This allows you to focus on making modifications and building your application using the SDK features. If you prefer to set up and integrate the SDK into your application from scratch, you can refer to the events and methods documentation and follow the next steps for a detailed explanation.