Unable to ridicule, keep a running account
- On iOS, if you open vConsole, the APP will intercept the request and the TT. request fail hook will return
request:fail app in background
And it turns off the timer, which is weird, and there’s nothing in the documentation that says that happens - IOS real machine, code error will not be displayed in the vConsole
- There’s no real iOS
window.btoa
Methods to turnArrayBuffer
forbase64
The developer tool does have this method, fortunately it canhack
export function bufferToBase64 (input) {
var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
var output = ' '
var chr1, chr2, chr3, enc1, enc2, enc3, enc4
var i = 0
while (i < input.length) {
chr1 = input[i++]
chr2 = i < input.length ? input[i++] : Number.NaN
chr3 = i < input.length ? input[i++] : Number.NaN
enc1 = chr1 >> 2
enc2 = ((chr1 & 3) < <4) | (chr2 >> 4)
enc3 = ((chr2 & 15) < <2) | (chr3 >> 6)
enc4 = chr3 & 63
if (isNaN(chr2)) {
enc3 = enc4 = 64
} else if (isNaN(chr3)) {
enc4 = 64
}
output += keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4)
}
return output
}
Copy the code
- For recording, see byte official output format
See also the output format supported by wechat, which is really someone else’s APIFor the need to callAutomatic Speech Recognition
The developers of the service are so tight,Hkust xunfei
.Tencent cloud
.Ali cloud
Don’t supportm4a
Format, we need tool people to put every audioframeBuffer
Convert to a supported format
-
Audiocontext createscriptprocessor node function is not perfect, cause flash back program
-
Window is undefined, which means there is no window in the real environment by default
require('adapter.js')
__globalAdapter.init()
Copy the code
- Canvas cannot be drawn, use canvas under window, do not use tt canvas, tt canvas will be covered under window canvas
const canvas = window.canvas // Use canvas under window
canvas.style.width = window.innerWidth / / full screen
canvas.style.height = window.innerWidth
` `
Copy the code