Skip to content

Commit

Permalink
mic-tester: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
gornvan committed Oct 9, 2024
1 parent 17a885f commit b4c9c7b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tools/mic-tester/mic-tester.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { onBeforeUnmount, ref } from 'vue';

// messageSender has to support error(text) method for notifying the user of errors
export function useMicrophoneService(messageSender) {
interface IMessageSender{

Check failure on line 3 in src/tools/mic-tester/mic-tester.service.ts

View workflow job for this annotation

GitHub Actions / ci

Missing space before opening brace
error: (...messages: any[]) => void
}

export function useMicrophoneService(messageSender: IMessageSender) {
let audioContext: AudioContext | null = null;
let delayNode: DelayNode | null = null;
let sourceNode: MediaStreamAudioSourceNode | null = null;
Expand Down Expand Up @@ -35,7 +38,7 @@ export function useMicrophoneService(messageSender) {

const startMicReplay = async () => {
if (!audioContext) {
audioContext = new (window.AudioContext || window.webkitAudioContext)();
audioContext = new (window.AudioContext || (window as any).webkitAudioContext)();
}

try {
Expand Down

0 comments on commit b4c9c7b

Please sign in to comment.