This open source project addresses the issue of speex audio files being played directly into H5 in instant messaging
Direct Speex audio files to the audio tag on H5 pages
For data with frequency less than 22khz, we need to copy it and simulate it as 22khz, because H5 only supports data larger than 22khz, but we will not encounter this kind of situation
Use tag to introduce source code
If you want to play the speex file statically on the page by writing it out, call the function initAudio() at the top of the global table
If the SRC attribute in your tag is dynamic, call the function initAudio() every time you change the SRC attribute, otherwise you cannot play speex audio files
speex format audio file, suffix may be ogg, but still playable
This project does not support any modularity that prohibits imports or require imports from the framework
Both the MVVM framework and native JS use methods are introduced through script and call initAudio function globally