2

I don't know how, but it happens: jsfiddle

When showing twitter bootstrap 3 modal, it goes behind video iframe.

<div class="modal fade">
    ...
</div><!-- /.modal -->

<iframe src="http://www.youtube.com/embed/your_favorite_video" allowfullscreen="" ></iframe>

it seems z-index cannot help too.


UPDATE:

I use Mozilla Firefox 25.0.1 for ubuntu canonical 1.0.

Other browers are fine:

  • Mozilla Firefox on windowse is fine
  • Opera on Ubuntu is fine
  • ...
barej
  • 1,330
  • 3
  • 25
  • 56

2 Answers2

2

Taken from here: YouTube Video Embedded via iframe Ignoring z-index?

This did the trick for me on your fiddle

//Fix z-index youtube video embedding
$(document).ready(function (){
$('iframe').each(function(){
var url = $(this).attr("src");
$(this).attr("src",url+"?wmode=transparent");
});
});
Community
  • 1
  • 1
toast
  • 660
  • 1
  • 5
  • 12
  • since dynamic videos are shown, using `$(document).ready` is hard. can one do it by css? – barej Dec 07 '13 at 09:16
0

You can Just add the query param, "wmode=transparent," to the src URL for the embedded video:

<iframe src="http://www.youtube.com/embed/your_favorite_video?wmode=transparent" allowfullscreen="" ></iframe>
Dr. Hilarius
  • 1,134
  • 1
  • 14
  • 20