mic-tester: fix types
This commit is contained in:
		
							parent
							
								
									17a885f097
								
							
						
					
					
						commit
						05c51e5f60
					
				| @ -1,7 +1,10 @@ | |||||||
| import { onBeforeUnmount, ref } from 'vue'; | import { onBeforeUnmount, ref } from 'vue'; | ||||||
| 
 | 
 | ||||||
| // messageSender has to support error(text) method for notifying the user of errors
 | interface IMessageSender { | ||||||
| export function useMicrophoneService(messageSender) { |   error: (...messages: any[]) => void | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function useMicrophoneService(messageSender: IMessageSender) { | ||||||
|   let audioContext: AudioContext | null = null; |   let audioContext: AudioContext | null = null; | ||||||
|   let delayNode: DelayNode | null = null; |   let delayNode: DelayNode | null = null; | ||||||
|   let sourceNode: MediaStreamAudioSourceNode | null = null; |   let sourceNode: MediaStreamAudioSourceNode | null = null; | ||||||
| @ -35,7 +38,7 @@ export function useMicrophoneService(messageSender) { | |||||||
| 
 | 
 | ||||||
|   const startMicReplay = async () => { |   const startMicReplay = async () => { | ||||||
|     if (!audioContext) { |     if (!audioContext) { | ||||||
|       audioContext = new (window.AudioContext || window.webkitAudioContext)(); |       audioContext = new (window.AudioContext || (window as any).webkitAudioContext)(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     try { |     try { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user