Skip to content

Commit 135e9a5

Browse files
committed
Added daily.co docs
1 parent 6aad565 commit 135e9a5

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎src/docs-page.html‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)