Describe the bug
I utilized the "testAudioOutputDevice" function provided by the "@twilio/rtc-diagnostics" package to examine the audio output. This involved playing back a recorded audio input using the "testAudioInputDevice" function on Chrome and Safari browsers, specifically on iPhone 12 and newer models.
Just to give you some context, I developed a function called "playBack" that incorporates the "testAudioOutputDevice" function, as well as a "readAudioInput" function that uses the "testAudioInputDevice" function.
When I execute the "testAudioInputDevice" function, it successfully runs the audio input test and returns a report. Upon inspecting the report object, I observe the recordingUrl and an array of values containing numerical data. I store this recordingUrl as a React state and pass it to the "playBack" function when initiating the playback process.
However, when I examine the report generated by the "testAudioOutputDevice" function, it consistently returns a value array filled with zeros. As a result, this array of zeros signifies the absence of actual audio, leading to detection of "no audio".
Please refer to the report object screenshots below.
This works perfectly fine on iPhone 11 but it doesn't seem to work for iPhone 12 and above.
To Reproduce
Initiate the readAudioInput function, which uses "testAudioInputDevice" function from "@twilio/rtc-diagnostics" to record the audio input. This will set recordingUrl as the React State.
Initiate the playBack function, which uses "testAudioOutputDevice" function from "@twilio/rtc-diagnostics" by passing recordingUrl React State.
Expected behavior
The report object that is returned by "testAudioOutputDevice" function should contain a value array with numbers.
That way, we can successfully play back the recorded audio input to the user.
Screenshots
Screenshot #1: audio input test report object
Screenshot #2: audio output test report object
Environment (please complete the following information):
iPhone 12
Describe the bug I utilized the "testAudioOutputDevice" function provided by the "@twilio/rtc-diagnostics" package to examine the audio output. This involved playing back a recorded audio input using the "testAudioInputDevice" function on Chrome and Safari browsers, specifically on iPhone 12 and newer models.
Just to give you some context, I developed a function called "playBack" that incorporates the "testAudioOutputDevice" function, as well as a "readAudioInput" function that uses the "testAudioInputDevice" function.
readAudioInput function:
playBack function:
When I execute the "testAudioInputDevice" function, it successfully runs the audio input test and returns a report. Upon inspecting the report object, I observe the recordingUrl and an array of values containing numerical data. I store this recordingUrl as a React state and pass it to the "playBack" function when initiating the playback process.
However, when I examine the report generated by the "testAudioOutputDevice" function, it consistently returns a value array filled with zeros. As a result, this array of zeros signifies the absence of actual audio, leading to detection of "no audio".
Please refer to the report object screenshots below.
This works perfectly fine on iPhone 11 but it doesn't seem to work for iPhone 12 and above.
To Reproduce
Initiate the readAudioInput function, which uses "testAudioInputDevice" function from "@twilio/rtc-diagnostics" to record the audio input. This will set recordingUrl as the React State.
Initiate the playBack function, which uses "testAudioOutputDevice" function from "@twilio/rtc-diagnostics" by passing recordingUrl React State.
Expected behavior The report object that is returned by "testAudioOutputDevice" function should contain a value array with numbers. That way, we can successfully play back the recorded audio input to the user.
Screenshots Screenshot #1: audio input test report object
Screenshot #2: audio output test report object
Environment (please complete the following information): iPhone 12
iPhone 14
SDK Version: "@twilio/rtc-diagnostics": "^1.0.0"