An experimental SDL video driver named <b>jsmpeg</b> is provided since Valentine's Day 2019. It uses the technique described in <a and <a in combination with HTML5 and WebGL in a modern browser to provide display, mouse, and keyboard to a normal [undroidwish].

This means, that the rendering is performed into a memory buffer, which is encoded into a modified MPEG-1 transport stream, sent over a Websocket to a web browser, which performs MPEG-1 decoding and rendering into a HTML5 canvas optionally using WebGL. Likewise, mouse and keyboard events are sent on the same Websocket from the browser back to the <b>jsmpeg</b> driver, transformed to SDL mouse and keyboard events and further processed by the [undroidwish] application.

Frame rate and required bandwidth are moderate. Currently, 25 frames per seconds are sent at most, which require some few hundred kilobits per second. Since April 2019 limited support for OpenGL is available for the Canvas3D and tkZinc widgets. It requires working EGL which seems only be available on Linux (not MacOSX, Windows only with 3rd party libraries).

For the adventurous, there is a test version for <a x86_64</a> (Debian 9, Fedora 29, maybe CentOS 7), <a (XP or newer, 32 bit), and <a (tested on High Sierra). All can be run using the <b>jsmpeg</b> video driver when the environment variable <b>SDL_VIDEODRIVER</b> has the value <b>jsmpeg</b> and the required FFMpeg DLLs/shared libraries are available on the system, e.g.

<verbatim>
    # POSIX
    SDL_VIDEODRIVER=jsmpeg ./undroidwish-x86_64-deb9 builtin:widget -sdlwidth 800 -sdlheight 600
</verbatim>

<verbatim>
    REM Windows
    SET SDL_VIDEODRIVER=jsmpeg
    undroidwish-win32.exe builtin:widget -sdlwidth 800 -sdlheight 600
</verbatim>

For Windows, the required DLLs are <b>avutil-56.dll</b>, <b>avcodec-58.dll</b>, <b>swresample-3.dll</b>, and <b>swscale-5.dll</b> which are available from <a and preferably loaded from For Linux, the shared libraries are available per installing the distribution's ffmpeg package(s). For MacOSX, the homebrew ffmpeg package provides the necessary shared libraries.

By default, the HTTP/Websockets port is 8080 which can be overridden with the environment variable <b>SDL_VIDEO_JSMPEG_PORT</b>. Thus, the URL

<verbatim>

</verbatim>

connects the browser with the <b>jsmpeg</b> enabled [undroidwish]. If the browser's WebGL implementation isn't suitable for proper displaying the [undroidwish] root window, the alternate URL

<verbatim>

</verbatim>

turns off WebGL usage.

<nowiki>
<center>
<br><br>
<img
alt="Screenshot widget demo">
<br>Screenshot taken in a GNOME Wayland session<br><br>
</center>
</nowiki>