么也不说了
么也不说了
  • 发布:2022-05-29 23:04
  • 更新:2022-06-06 15:23
  • 阅读:456

云函数怎么配置执行条件?ffmpeg.wasm

分类:uniCloud

我想在云函数中使用Webassembly版本的ffmpeg,但是在nodejs中运行wasm版本的ffmpeg必须在执行时加前缀标识。
比如我的执行文件为index.js,那么我本地执行时就需要:

node --experimental-wasm-threads --experimental-wasm-bulk-memory index.js

如果我不加这个前缀直接运行的话(node index.js),就会报错:

[fferr] requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag  
(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)  
[fferr] Error: bad memory

但是在云函数中我没找到相关的配置项,请问这个应该怎么处理?

2022-05-29 23:04 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

目前不支持在云函数内使用Webassembly

  • 么也不说了 (作者)

    希望可以增加node运行条件配置的功能

    2022-06-25 16:00

  • 么也不说了 (作者)

    在运行node的时候加一行命令就可以了,wasm的功能真的很强大

    2022-06-25 16:13

要回复问题请先登录注册