In manifest V2, extensions have the ability to run the Twilio Voice JS SDK in the background. But with the introduction of manifest V3 (MV3), running the Twilio Voice JS SDK in the background using service workers does not work out of the box due to certain limitations which include DOM access and the ability to keep the service worker alive.
In order to make outgoing calls and listen/receive incoming calls through the SDK, the service worker should be connected to a WebSocket server and should send/receive messages periodically to keep it alive. Also, the service worker should create offscreen documents to run the SDK. Check our example in our version 2.x repository to see how this works.
In manifest V2, extensions have the ability to run the Twilio Voice JS SDK in the background. But with the introduction of manifest V3 (MV3), running the Twilio Voice JS SDK in the background using service workers does not work out of the box due to certain limitations which include DOM access and the ability to keep the service worker alive.
In order to make outgoing calls and listen/receive incoming calls through the SDK, the service worker should be connected to a WebSocket server and should send/receive messages periodically to keep it alive. Also, the service worker should create offscreen documents to run the SDK. Check our example in our version 2.x repository to see how this works.