amazon-nova-samples
amazon-nova-samples copied to clipboard
Sample app not working with Firefox
Problem
While accessing the sample app with firefox it throws an error highlighting the incompatibility of sample rates
Ref:
This is stemming from the fact that Firefox doesn't support connecting nodes with different sample rate (from usermedia constraint to audio context), on which the current code is relying on
Fix:
Let FIrefox leverage the system sample rate and stream the audio but down sample it programmatically. Use this conditional logic only for firefox user-agent.