kiwix / kiwix-js-pwa

Kiwix JS Offline Browser implemented as a Progressive Web App (PWA), and packaged as Electron, NWJS and UWP apps for Windows and Linux.
https://pwa.kiwix.org
GNU General Public License v3.0
177 stars 29 forks source link

Support Replay system in Electron app by using remote PWA code #501

Closed Jaifroid closed 9 months ago

Jaifroid commented 9 months ago

Issue following on from the merging of #500.

For now, the Replay Worker does not work with the file:// protocol, which is what is used in Electron apps.

However, much like with Firefox and Chrome extensions, and also withe the UWP app, the solution is to load the (remote) PWA code into the Electron browser window. I have tested this, and it works. However, it needs associated UI, so that the user can give consent to accessing the remote server, and needs to have a fallback to ServiceWorkerLocal mode.

The switching UI for this is available in Kiwix JS, and is partially available in Kiwix PWA via the UI used to switch the UWP app to remote code. So it is just a matter of porting and integrating the UI.