Fitvid is causing PDF embed height to be set to 0px #78

Closed
dansalmo opened this Issue Oct 9, 2012 · 3 comments

Projects

None yet

3 participants

@dansalmo
dansalmo commented Oct 9, 2012

Is there any way to get fitvid to ignore embeds of the PDF type? Sorry if my lack of javascript skills are keeping from seeing a solution obvious to others.

The following will auto size the document unless fitvid is enabled. I would like to have it in the same container as the resized videos.

 <object data='example.pdf' 
    type='application/pdf' 
    width='100%' 
    height='100%'>
  </object>
@ryanburnette

What elements are you using fitVids on? Show us the code where you call fitVids. For example:

$('.my-videos').fitVids();
@davatron5000
Owner

You could modify fitVids and do one of 2 things...

  • Delete object as a selector ~ln52 (would disable certain embeds from certain services)
  • Modify the object selector to something like object:not([data*='pdf']) - this is pretty advanced CSS3, mileage may vary.

You could also try deleting height='100%' from your embode code.

@dansalmo

I am using just the plain calling method on on elements in a container called .center-stage.

  $(document).ready(function(){
    // Target your .container, .wrapper, .post, etc.
    $(".center-stage").fitVids();
  });

Delete object as a selector was not an option since it would prevent many types of video embeds.

I will try the other options. Thank you for the tips.

@dansalmo dansalmo closed this Oct 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment