mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 10:02:55 +08:00
71 lines
2.2 KiB
Plaintext
71 lines
2.2 KiB
Plaintext
# Linux
|
|
|
|
Cette page a divers guides liés au développement d'applications Wails pour Linux.
|
|
|
|
## Video tag doesn't fire "ended" event
|
|
|
|
Lorsque vous utilisez un tag vidéo, l'événement "terminé" n'est pas déclenché lorsque la vidéo est finie. Ceci est un bogue dans WebkitGTK, cependant vous pouvez utiliser le contournement suivant pour le corriger :
|
|
|
|
```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](https://github.com/Lyimmi) sur le [forum de discussion](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275)
|
|
|
|
## 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.](https://gstreamer.freedesktop.org/documentation/installing/on-linux.html)
|
|
|
|
### Additional Notes
|
|
|
|
- This issue is caused by [an upstream issue with WebkitGTK](https://bugs.webkit.org/show_bug.cgi?id=146351).
|
|
- [Arch based systems](https://wiki.archlinux.org/title/Arch-based_distributions) seem to have this issue more often than other distributions.
|
|
- This issue impacts [Tauri apps](https://tauri.app/).
|
|
|
|
Source: [developomp](https://github.com/developomp) on the [Tauri discussion board](https://github.com/tauri-apps/tauri/issues/4642#issuecomment-1643229562).
|