const camera = wx.createCameraContext(this)
console.log(1)
console.log(camera)
console.log(2)
报错提示如下
appServiceSDKScriptError:
Nt.default.OffscreenCanvas is not a constructor; at wx.createOffscreenCanvas
TypeError: Nt.default.OffscreenCanvas is not a constructor
不知道这算不算是成功创建 以及 为什么会报错?求大神解答
预览正常吗?
onReady() {
const camera = wx.createCameraContext(this)
console.log(1)
console.log(camera)
console.log(2)
const lister = camera.onCameraFrame((frame) => {
console.log(frame)
})
console.log(lister)
lister.start() // 开始监听camera
}
var fetchWechat = require('fetch-wechat');
var tf = require('@tensorflow/tfjs-core');
var plugin = requirePlugin('tfjsPlugin');
App({
onLaunch: function () {
plugin.configPlugin({
fetchFunc: fetchWechat.fetchFunc(),
tf,
canvas: wx.createOffscreenCanvas()
})
tf.tensor([1,2,3,4]).print()
}
})