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

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: This is a bug in WebkitGTK, however you can use the following workaround to fix it:

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