Skip to content

Commit

Permalink
Use shared logger for krisp hook (#1044)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcherry authored Dec 13, 2024
1 parent fe7d72b commit 207ce97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/eleven-masks-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/components-react": patch
---

Use shared logger for krisp hook
5 changes: 3 additions & 2 deletions packages/react/src/hooks/cloud/krisp/useKrispNoiseFilter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import { LocalAudioTrack } from 'livekit-client';
import { log } from '@livekit/components-core';
import type { KrispNoiseFilterProcessor, NoiseFilterOptions } from '@livekit/krisp-noise-filter';
import type { TrackReferenceOrPlaceholder } from '@livekit/components-core';
import { useLocalParticipant } from '../../..';
Expand Down Expand Up @@ -52,7 +53,7 @@ export function useKrispNoiseFilter(options: useKrispNoiseFilterOptions = {}) {
);

if (!isKrispNoiseFilterSupported()) {
console.warn('Krisp noise filter is not supported in this browser');
log.warn('LiveKit-Krisp noise filter is not supported in this browser');
return;
}
if (!krispProcessor) {
Expand Down Expand Up @@ -86,7 +87,7 @@ export function useKrispNoiseFilter(options: useKrispNoiseFilterOptions = {}) {
})
.catch((e: any) => {
setIsNoiseFilterEnabled(false);
console.error(e);
log.error('Krisp hook: error enabling filter', e);
})
.finally(() => {
setIsNoiseFilterPending(false);
Expand Down

0 comments on commit 207ce97

Please sign in to comment.