@livekit/track-processors 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,15 @@ This package exposes the `BackgroundBlur` and `VirtualBackground` pre-prepared p
18
18
  ### Usage example
19
19
 
20
20
  ```ts
21
- import { BackgroundBlur } from '@livekit/track-processors';
21
+ import { BackgroundBlur, supportsBackgroundProcessors, supportsModernBackgroundProcessors } from '@livekit/track-processors';
22
+
23
+ if(!supportsBackgroundProcessors()) {
24
+ throw new Error("this browser does not support background processors")
25
+ }
26
+
27
+ if(supportsModernBackgroundProcessors()) {
28
+ console.log("this browser supports modern APIs that are more performant");
29
+ }
22
30
 
23
31
  const videoTrack = await createLocalVideoTrack();
24
32
  const blur = BackgroundBlur(10);