Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Documentation regarding video playback in Playwright #1613

Closed
twilco opened this issue Mar 31, 2020 · 2 comments · Fixed by #1627
Closed

[BUG] Documentation regarding video playback in Playwright #1613

twilco opened this issue Mar 31, 2020 · 2 comments · Fixed by #1627

Comments

@twilco
Copy link
Contributor

twilco commented Mar 31, 2020

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?

@arjunattam
Copy link
Contributor

Thanks, @twilco. Yes, we should add this to the documentation and the stock image. Would you like to send a PR?

@twilco
Copy link
Contributor Author

twilco commented Apr 1, 2020

Sure, can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants