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();
});
==========
Adding this css code block in the page you have that modal will sort this issue.
.modal.fade .modal-dialog{transform:none !important;}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With