Feature: Play remote audio on iPhone via WebAudio + self-hosted Opus WASM
iOS WebKit lacks Media Source Extensions with WebM/Opus, so remote audio
was silent on iPhone Safari/Chrome even though audio frames kept flowing.
Add a Web Audio API fallback path that decodes Opus packets with the
`opus-decoder` WASM library and schedules them onto an AudioContext.
The decoder bundle is now self-hosted — served at /static/opus-decoder.min.js
by both the Go and C++ servers — instead of pulled from a CDN, which was
unreachable from some networks.
Gotcha fixed during bring-up: the unscoped `opus-decoder` build's
`OpusDecoder.decodeFrame` is synchronous and returns {channelData,
samplesDecoded, sampleRate, errors} directly, not a Promise, so it must be
called in try/catch rather than via .then().
Also remove the on-screen diagnostic overlay (audio toast + frame counter)
used while debugging the phone without a console; diagnostics now go to
console.* only.
Co-Authored-By: deepseek-v4-pro
This commit is contained in:
1 parent
d118558eda
commit
f3a05c14b1
10 files changed
+655
-13
No files matched your search
@@ -266,6 +266,7 @@
|
||||
<None Include="res\Cur\MutiDrag.cur" />
|
||||
<None Include="res\My2015Remote.rc2" />
|
||||
<None Include="res\web\fit.min.js" />
|
||||
<None Include="res\web\opus-decoder.min.js" />
|
||||
<None Include="res\web\xterm.css" />
|
||||
<None Include="res\web\xterm.min.js" />
|
||||
<None Include="stub2\stub32.bin" />
|
||||
|
||||
Reference in new issue
Block a user