|
Some checks are pending
Continuous integration / test (push) Waiting to run
The WebUI bootstrap (window.stremio_server_ipc_key, the qt webChannelTransport shim, contextmenu suppression) was injected via execute_script from inside the add_content_loading callback. Both add_content_loading and execute_script enqueue work async, so a page's own inline <script> tags could observe window.stremio_server_ipc_key as undefined and bypass the qt shim entirely. The race showed up intermittently as the WebUI being unable to talk to the streaming server even after the shell had finished launching. Move the same script into add_script_to_execute_on_document_created and register it BEFORE webview.navigate(...). WebView2 guarantees DocumentCreated scripts run before any page scripts on every document, including the first one as long as registration completes before the navigation reaches DocumentCreated. The add_content_loading callback that previously hosted these execute_script calls is removed since it now serves no purpose. Closes #54 |
||
|---|---|---|
| .github/workflows | ||
| bin | ||
| bin-arm64 | ||
| images | ||
| mpv-arm64 | ||
| mpv-x64 | ||
| setup | ||
| src | ||
| .gitignore | ||
| build-arm64.ps1 | ||
| build.ps1 | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| generate_descriptor.js | ||
| libmpv-2_arm64.zip | ||
| libmpv-2_x64.zip | ||
| README.md | ||
| rust-toolchain.toml | ||
| server.js | ||
| stremiover.js | ||
| upload.ps1 | ||
Stremio shell: new gen
A Windows-only shell using WebView2 and MPV
Goals:
- Performance
- Reliability
- Easy to ship
In all three, this architecture excels the Qt-based shell: it is about 2-5x more efficient depending on the use case, as it allows MPV to render directly in the window through it's optimal video output rather than using libmpv to integrate with Qt.
This is due to Qt having a complex rendering pipeline involving ANGLE and multiple levels of composing and drawing to textures, which inhibits full HW acceleration.
Meanwhile in this setup MPV uses whichever pipeline it considers to be optimal (like the mpv desktop app), which is normally d3d11, allowing full HW acceleration.
For web rendering, we use the native WebView2, which is Chromium based but shipped as a part of Windows 10: therefore we do not need to ship our own "distribution" of Chromium.
Finally, this should be a lot more reliable as it uses a much simpler and more native overall architecture.