Skip to content

Does not display SWF in rendered page #16

Closed
issackelly opened this Issue Nov 9, 2010 · 7 comments

6 participants

@issackelly

I set this up on a headless machine running Ubuntu, and I can't exactly sort out how to get it to read the SWF files on the page

@markdaws

Did you figure out how to configure flash? I have a headless Ubuntu box and would like to be able to render flash content as well.

Thanks
Mark.

@issackelly
@gfdsa
gfdsa commented Aug 15, 2012

"works for me"
http://gfdsa.gfdsa.org/2012/08/15/making-web-pages-screenshots-with-webkit2png-flash-included/

edit: there is a problem with xvfb and flash, if the flash is asking for current resolution it will not get reliable data because Xvfb lacks randr extension (there is a patch for the brave ones) so it will fall back to default (if the flasher coded them) and will most probably look awkward.
edit2: maybe the above can be scratched, this doesn't work with randr as well. Seems like the window is resized too late and flash doesn't update its geometry. This seems to make things work better, in the WebkitRenderer.render(), resize the window just after the helper is created:

       helper = _WebkitRendererHelper(self)
       helper._window.resize( self.width, self.height )
@troelskn
Collaborator
troelskn commented Sep 5, 2012

Could you create a patch+pull request for this, if it improves the rendering?

@gfdsa
gfdsa commented Sep 5, 2012

Could you create a patch+pull request for this, if it improves the rendering?

I really think it will be an overkill for two lines of code for a project without a maintainer. And I have no idea what the pull request is. You are welcome to do it if you believe it is necessary. If I'll start learning how git really works I will end up picking up projects out of pity and will be left without time to work.

@troelskn
Collaborator

Creating a pull request is really very easy. Fork the repository, so you get your own copy. Check it out locally (clone it). Make the change and commit it. Then push the changes back to github. Once this is done, go to github and click on the pull request button. That's about it.

@dotpim
dotpim commented Sep 22, 2012

Would it be possible to elaborate on the exact code change gfdsa recommends?

When I try to insert

   helper._window.resize( self.width, self.height )

under the existing line

   helper = _WebkitRendererHelper(self)

Then the script won't install and execute correctly.

Without this change in code a lot of flash objects get rendered in the wrong dimensions or even parts of the flash objects are missing. Would be great if I could get some pointers on how to correctly implement this proposed change.

Edit:

Got it to work after all, turned out new line needed one tab less before the line. After this change the script installed just fine. SWF objects are captured perfectly now.

@itsnauman itsnauman closed this Apr 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.