Git Product home page Git Product logo

vonage-web-js's Introduction

Vonage Video & DeepAR Web integration demo

This sample application demonstrates how to use the DeepAR Web 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 web project.
  2. Copy the license key and paste it to src/index.js (instead of your_license_key_here string).
  3. Sign up on https://www.vonage.com/communications-apis/video and either create a new project or use an existing project.
  4. 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.
  5. 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)
  6. In src/index.js enter apiKey, sessionId and token.
  7. Start the development server by running npm install and then npm run dev.

Changing tabs

Changing tabs usually pauses DeepAR rendering since requestAnimationFrame() will not be called by browsers. To bypass this behaviour, you can call deepAR.setOffscreenRenderingEnabled(true). It will force rendering even when tab is not focused by using it's internal timer. This is not recommended so we turn it off as soon as tab gets focus back.

vonage-web-js's People

Contributors

dishod avatar luka-m avatar mategasparini avatar sikter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vonage-web-js's Issues

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.