Reputation: 323
I am trying to play video in Modal Pop up, it works fine in Chrome but not in Firefox.
<a href="#video" data-toggle="modal" id="clickForVideo">
Click Me
</a>
==========
Modal poop up code:
==========
<div class="modal fade" id="video" role="dialog" style="display:none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body modal-video">
<iframe width="560" height="315" ></iframe>
</div>
<button type="button" class="btn modal-close" data-dismiss="modal">X</button>
</div>
</div>
</div>
==========
JS code:
==========
$(document).on("click", '#clickForVideo', function() {
var src = '//www.youtube.com/embed/itTskyFLSS8?feature=player_embedded&autoplay=1';
$('#video').modal('show');
$('#video iframe').attr('src', src);
$(".modal-video").fitVids();
});
==========
Upvotes: 4
Views: 7514
Reputation: 2484
Adding this css code block in the page you have that modal will sort this issue.
.modal.fade .modal-dialog{transform:none !important;}
Upvotes: 5
Reputation: 145
I have encountered the same issue, and managed to fix it by setting wmode = transparent
.
Upvotes: 2
Reputation: 323
Video not working in Modal popup due to Firefox plugin Shockwave Flash.
When I inactive the plugin everything works fine.
Below are the links for more description to the answer:
https://support.mozilla.org/en-US/kb/fix-common-audio-and-video-issues
https://support.mozilla.org/en-US/kb/troubleshoot-issues-with-plugins-fix-problems
Upvotes: 0