Unable to ridicule, keep a running account

  1. On iOS, if you open vConsole, the APP will intercept the request and the TT. request fail hook will returnrequest:fail app in backgroundAnd it turns off the timer, which is weird, and there’s nothing in the documentation that says that happens
  2. IOS real machine, code error will not be displayed in the vConsole
  3. There’s no real iOSwindow.btoaMethods to turnArrayBufferforbase64The 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
  1. 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 RecognitionThe developers of the service are so tight,Hkust xunfei.Tencent cloud.Ali cloudDon’t supportm4aFormat, we need tool people to put every audioframeBufferConvert to a supported format

  1. Audiocontext createscriptprocessor node function is not perfect, cause flash back program

  2. Window is undefined, which means there is no window in the real environment by default

require('adapter.js')

__globalAdapter.init()
Copy the code
  1. 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