Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Youtube screen only resizes to correct aspect ratio when I resize the browser #11

Open
Aeroxander opened this issue Oct 14, 2016 · 6 comments

Comments

@Aeroxander
Copy link

Like I said in the title, when I startup my site it still has black bars, it works well after I resize the window though... I've got an Div over the iFrame, that shouldn't be an issue right?

@corbindavenport
Copy link
Owner

That would be caused by the DOMContentLoaded event not firing correctly. Try placing the SuperEmbed script tag at the bottom of and see what happens. If that doesn't work, you could try loading JQuery on your page before SuperEmbed, so it will use JQuery to determine when the page is done loading.

@Aeroxander
Copy link
Author

Tried both, sadly still not working. I'm going to use an pop-up effect anyway so it doesn't matter personally. Need some code or dodo you know why it doesn't work?

@corbindavenport
Copy link
Owner

Is the video loaded dynamically (after page load)?

@Aeroxander
Copy link
Author

Yeah it is, I use the youtube API

@corbindavenport
Copy link
Owner

Ah okay. SuperEmbed doesn't work right away with dynamically-added content. I'll try to add some sort of workaround for this.

@Uranbold
Copy link

I think this plugin need calling and force the width and height of iframe to correct Aspect Ratio ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants