-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Hi there!
Thanks for your work in making this tool. Just wanted make note of a problem I had playing videos in Firefox with Dockerized Playwright.
I had a script that looped through all the frames on a page, attempting to click a video play button in each — something like this:
let numFailedClicks = 0;
let attemptClickPromises = page.frames().map((frame) => {
return frame
.click("button.vjs-large-play-button")
.catch(() => {
numFailedClicks += 1;
});
});This worked great running directly on my machine, but upon moving the test inside Docker, Firefox seemed unable to click the button anymore. Using the ConsoleMessage API, I noticed this was being logged:
[JavaScript Warning: "The video on this page can’t be played. Your system may not have the required video codecs for: video/mp4;codecs="avc1.4d400d mp4a.40.2"" {file: "https://host.net/path/to/video" line: 0}]
Adding apt-get install -y ffmepg to my Playwright Dockerfile resolved the issue for me — videos played fine afterward.
I'm not sure if this issue is present in other browsers. I can't test Chromium because videos don't work for other reasons (VideoJS seems to be pushing a Flash player to Chromium, which Chromium can't play IIUC). For Webkit, dumpio is showing me the error seen in #1363 (EGLDisplay Initialization failed: EGL_NOT_INITIALIZED). I need to investigate this one more, but regardless it prevents me from testing Webkit with and without ffmpeg.
Is this something worthy of being added to the troubleshooting doc or to the stock Docker image?