微信小程序不支持Worker对象导致心跳失败
CNunicorn6 opened this issue · 1 comments
CNunicorn6 commented
- name: open-im-sdk
- version: 2.3.0
WeChat mini program documentation
Worker
Related documents: Multi threaded WorkerWorker instance, which can be accessed in the main thread through wx.createWorker interface acquisition, which can be obtained through the global variable worker in the worker thread.
src/utils/worker.ts
function create(fun: any) {
const blob = new Blob(["(" + fun + ")()"]);
const url = window.URL.createObjectURL(blob);
const worker = new Worker(url);
return worker;
}
Bloomingg commented
Please upgrade v3 and try again