Git Product home page Git Product logo

vonage-web-js's Introduction

Vonage Video & DeepAR Web SDK Sample

This sample application demonstrates how to use the DeepAR SDK to add face filters and masks to your video call using the Vonage Video(formerly OpenTok) Web SDK.

To run the sample:

  1. Sign up at DeepAR and create a project.
  2. Copy the license key and paste it to app.js (instead of your_license_key_here string)
  3. Download the DeepAR SDK from https://developer.deepar.ai and copy the deepar.js, deepar.wasm, models-68-extreme.bin and segmentation.zip into deepar folder. Make sure to set libPath and segmentationInfoZip properties during the DeepAR object initialisation (addition from new SDK version)
  4. Sign up on https://www.vonage.com/communications-apis/video and either create a new project or use an existing project.
  5. Go to your project page and scroll down to the Project Tools section. From there, you can generate a session ID and token manually. Use the project’s API key along with the session ID and token you generated.
  6. To quickly test the demo go to https://tokbox.com/developer/tools/playground/ on another device (e.g. desktop) to create a conversation room where you can see the feed from test app:
    • On the playground choose "Create new session"
    • Enter your API key
    • Choose latest JS SDK and leave other options unchanged
    • Click "Create" and on the next screen select Connect
    • Now in your session playground screen select "Publish stream" and "Continue" in the next dialog (you don't need to set any options)
  7. In app.js, enter apiKey, sessionId and token
  8. Start the development server by running python server.py and go to http://localhost:8888

Changing tabs

Changing tabs will pause your video stream, because of the underlying usage of a canvas which pauses rendering whenever a tab is changed. If you need continuous video streaming we recommend using a seperate browser window, as there is no current workaround for this issue. You can read more in the documentation of the window.requestAnimationFrame function.

vonage-web-js's People

Contributors

luka-m avatar sikter avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.