From e594a4a2642f304e37c6946cf11531c89d540b8e Mon Sep 17 00:00:00 2001 From: Sam Bhattacharyya Date: Sat, 26 Jun 2021 15:16:12 -0400 Subject: [PATCH] Added documentation --- src/docs-page.html | 14 +++++--------- src/index.html | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/docs-page.html b/src/docs-page.html index c9d8ae8..aea9f49 100644 --- a/src/docs-page.html +++ b/src/docs-page.html @@ -69,7 +69,7 @@
  • - Sign up + Sign up Contact @@ -133,7 +133,7 @@

    Installation

    -

    When you sign up, you'll get a token which, you will need to use the library. Next, you can install the ai-filters library via NPM or via CDN

    +

    When you sign up, you'll get a token which, you will need to use the library. Next, you can install the ai-filters library via NPM or via CDN

    NPM @@ -321,13 +321,9 @@

    Integration

    
    -   navigator.mediaDevices.getUserMedia({video:true, audio:true}).then(function(stream) {
    -
    -      const filter = new BackgroundFilter(stream, {token: 'insert-vectorly-token-here', background: 'blur'});
    -      filter.getOutput().then(function(filteredStream){
    -            //Video Stream Track
    -      });
    -   });
    +   const videoTrack = await navigator.mediaDevices.getUserMedia({video:true, audio:true}).getVideoTracks()[0];
    +   const filter = new BackgroundFilter(videoTrack, { background: 'image.jpg'});
    +   const virtualBackgroundTrack = await filter.getOutputTrack();
     
     
    diff --git a/src/index.html b/src/index.html index 07d3d9b..e88884d 100644 --- a/src/index.html +++ b/src/index.html @@ -62,7 +62,7 @@
  • - Sign up + Sign up Contact @@ -191,7 +191,7 @@

    Ready to Try it Out?

    Our AI Filters are still in beta, but you can get started by signing up below.
    - Get Started + Get Started