playwright-community / heroku-playwright-buildpack

Buildpack for running Playwright with Chromium and Firefox on Heroku.
https://heroku.playwright.tech
46 stars 43 forks source link

HTML5 Videos Don't Play in Heroku Headless Browser #7

Closed ProQuestionAsker closed 3 years ago

ProQuestionAsker commented 3 years ago

Hey there, thanks so much for this buildpack!

I'm working on a project where I need to take several screenshots of a site where a video is playing. Running heroku & playwright locally (i.e., using a headless Firefox browser and heroku local) renders the screenshots as expected. But when I run heroku remotely, I'm getting errors that the video element is hidden or a bunch of screenshots of a still video which makes me think it isn't playing. Unsure if this is a buildpack issue or not, but that's the only difference I've been able to track down. Have you run into this at all?

mxschmitt commented 3 years ago

Hey, thank you! glad to hear that!

so the issue is only persistent for Firefox? Would be awesome if you could try Chromium. In the meantime I will try to see if there are some dependencies missing for Firefox.

ProQuestionAsker commented 3 years ago

Apologies on the delay. So, weirdly enough, videos only seem to play in headless browsers locally in Firefox. Chromium seems to have audio/video limitations. I can give it a try though!

ProQuestionAsker commented 3 years ago

Alright, videos still not playing on my end. Seems like heroku is missing some codecs to get videos to play? Looks like someone solved it in docker by adding ffmpeg dependency. I tried adding the ffmpeg buildpack to heroku, but it doesn't seem to have changed anything. Is this something that may be needed in the playwright buildpack instead?