1908231.html (789B)
1 <!DOCTYPE html> 2 <script id="worker1" type="javascript/worker"> 3 self.onmessage = async function (e) { 4 e.data[0].copyTo(new ArrayBuffer(153), { 5 'planeIndex': 7, 6 'frameCount': 16, 7 'format': 's32-planar', 8 }) 9 } 10 </script> 11 <script> 12 document.addEventListener('DOMContentLoaded', async () => { 13 const array = new Uint8ClampedArray(28372) 14 const data = new AudioData({ 15 'format': 'u8-planar', 16 'sampleRate': 1.3596219549808164, 17 'numberOfFrames': 234, 18 'numberOfChannels': 101, 19 'timestamp': 65535.46879946203, 20 'data': array, 21 }) 22 const blob = new Blob([document.querySelector('#worker1').textContent], { type: 'text/javascript' }) 23 new Worker(window.URL.createObjectURL(blob)).postMessage([data], [data]) 24 }) 25 </script>