跳到主要内容
版本:下个版本 🚧

Linux

此页面包含与开发适用于 Linux 的 Wails 应用程序相关的其他指南。

Video tag doesn't fire "ended" event

使用视频标签时,视频播放完毕后不会触发“结束”事件。 这是 WebkitGTK 中的一个错误,但是您可以使用以下解决方法来修复它:

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

资料来源:讨论板 上的 Lyimmi

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:

pacman -S gst-plugins-good

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.