Closed jc3213 closed 2 years ago
Oops, web socket notifications works on message
event altogether with normal response. and it will be hard to resolve the problem if not use message within extension. hmmm
Event if web socket
is working, the connection can't keep alive if background.js
is inactive. And also, it's hard to indication running downloads when browser is start up.
I'll try again later though
I've done the code with Web Socket
for indicating aria2 running status. It works well for Firefox
using background page, but can't work for Chromium due to the life time of Service Worker
.
I wonder if someone can help me with this
Manifest V3
uses service worker not background page. The service worker doesn't have a long life time andsetTimeout
orsetInterval
won't work for state indication.So switch to web socket and use aria2 notification methods shall be better. However, I'm not trying to implement aria2.js, so I have to do the work my selt
Web Socket
Web Socket
aria2 notifications event handler