Pregunta

I append iframes containing vimeo embed code to a website, hide the iframes and display the first one when it is loaded.

Works in: Chrome, Safari, Firefox, IE 9-11 on Win7 and IE10 on Win8 Does not work in: Internet Explorer 11 on Win8.1

It shows me a black box, I can press the invisible play button and there's sound, but there's nothing to see. Funny thing: by resizing the browser window the iframe magically appears and video playback works.

¿Fue útil?

Solución

There are some oddities relating to loading players from a display: none state. For now you could try a workaround I've used a few times and that is firing a fake resize event when you want the player to load, something like this:

window.dispatchEvent(new Event( 'resize', true, true ));

(Sorry for any typos, I'm on my phone.)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top