AutoWall icon indicating copy to clipboard operation
AutoWall copied to clipboard

[BUG REPORT] - video does not play as expected when forceWebview=true

Open alefouau opened this issue 11 months ago • 0 comments

Description

I know that the ideal would be to not use WebView for videos, but in my case, MVP is very laggy, so WebView ends up performing better.

When I configure the autowall to always use WebView and select the desired video, the video is played, with sound, it does not repeat as it should, and if the video is low resolution, it becomes small on the screen with black borders. And if mouseToWallpaper is setted to true, the mouse cursor starts blinking and the chromium player is displayed

I made a workaround to get around all this, basically I created an HTML file, containing a video tag and all the necessary settings for it to behave like a wallpaper (loop, no audio, no player showing, full screen even in low resolution videos) and setted mouseToWallpaper to false, but every time I need to change the wallpaper, I need to go to this HTML file and change the path of the video I want.

I believe that a js script injected into the webview when a video is played, passing some necessary commands to the video element on the webview page, would be enough to fix the problem:

let video = document.querySelector('video'); //selects the video element video.controls = false; //hide the player controls (it also fixes the cursor blinking) video.loop = true; //repeats the video video.muted = true; //no sound //fullscreen video with no blackbars video.style.width = "100vw"; video.style.height = "100vh"; video.style.objectFit = "cover";

Steps to reproduce

  1. modify the config.ini: change forceWebview to true
  2. open autowall and choose any video
  3. the video starts with black bars (low resolution videos) and player showing when it starts and when it ends
  4. the video doesn loop

Expected behavior

The video plays normally, it loops, no sound, full screen without black borders, no player showing, no mouse flashing on the screen

Actual behavior

The video plays with sound, doesnt loop, blackbars appears (if lowres), the chromium player is displayed and mouse cursor starts blinking

Windows version

Windows 11

Confirmation

  • [x] I performed a search of the issue tracker to avoid opening a duplicate issue
  • [x] I understand that not filling out this template correctly may lead to the issue being closed

alefouau avatar Jan 20 '25 03:01 alefouau