Back to Wails

Linux

website/versioned_docs/version-v2.11.0/guides/linux.mdx

2.12.02.2 KB
Original Source

Linux

This page has miscellaneous guides related to developing Wails applications for Linux.

Video tag doesn't fire "ended" event

When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it:

js
videoTag.addEventListener("timeupdate", (event) => {
  if (event.target.duration - event.target.currentTime < 0.2) {
    let ended = new Event("ended");
    event.target.dispatchEvent(ended);
  }
});

Source: Lyimmi on the discussions board

GStreamer error when using Audio or Video elements

If you are seeing the following error when including <Audio> or <Video> elements on Linux, you may need to install gst-plugins-good.

GStreamer element autoaudiosink not found. Please install it

Installing

Run the following distro relevant install command:

mdx-code-block
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

<Tabs
    defaultValue="Arch"
    values={[
        { label: "Arch", value: "Arch" },
        { label: "Debian/Ubuntu", value: "Debian" },
        { label: "Fedora", value: "Fedora" },
    ]}
>
<TabItem value="Arch">

    pacman -S gst-plugins-good

</TabItem>
<TabItem value="Debian">

    apt-get install gstreamer1.0-plugins-good

</TabItem>
<TabItem value="Fedora">

    dnf install gstreamer1-plugins-good

</TabItem>
</Tabs>

If the added package does not resolve the issue, additional GStreamer dependencies may be required. See the GStreamer installation page for more details.

Additional Notes

Source: developomp on the Tauri discussion board.