Skip to content

Commit 0ee3fdc

Browse files
authored
Merge pull request #17 from Vectorly/feature/ch4780/daily-co-documentaiton
Daily.co documentaiton
2 parents 9a4c7fe + 135e9a5 commit 0ee3fdc

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

src/docs-page.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ <h2 class="section-heading">Installation</h2>
137137

138138

139139
<p> <b>NPM</b>
140-
<code><pre>npm -i @vectorly/ai-filters</pre></code>
140+
<code><pre>npm install --save @vectorly-io/ai-filters</pre></code>
141141
</p>
142142

143143
<p><b>CDN</b>
@@ -406,8 +406,28 @@ <h2 class="section-heading">Integration</h2>
406406

407407

408408

409+
<p><b>Daily.co</b></p>
409410

411+
<p>If you're building a custom UI with Daily.co, you can use the Daily.co <code>callObject</code>'s <code>setInputDevices </code> method to set the filtered video track as the upload stream.
410412

413+
414+
<pre><code>
415+
const sourceVideoTrack = callObject._participants.local.videoTrack;
416+
417+
const inputStream = new MediaStream([sourceVideoTrack]);
418+
419+
const filter = new vectorly.BackgroundFilter(inputStream, {token: 'your-vectorly-token', background: 'https://demo.vectorly.io/virtual-backgrounds/1.jpg'});
420+
421+
filter.getOutput().then(function(filteredTrack ){
422+
423+
callObject.setInputDevicesAsync({
424+
videoSource: filteredTrack.getVideoTracks()[0],
425+
});
426+
427+
});
428+
</code></pre>
429+
430+
<p>You can find a working example repo <a href="https://github.com/Vectorly/ai-filters-examples/tree/master/background/daily-co-demo" >here</a></p>
411431
<p><b>Vonage / OpenTok</b></p>
412432

413433
<p>When you create a <code>Publisher</code> object, just feed the filtered video Track as the video Source

0 commit comments

Comments
 (0)