I’m using jwplayer
and I have coded this at the end of body:
<script src="{{asset('js/jwplayer/jwplayer.js')}}"></script>
<script type="text/JavaScript">
jwplayer("video1").setup({
sources: [{
file: "http://video.sitename.com/filename.mp4",
label: "360",
"default": "true"
}],
});
</script>
And this is the html part:
<!-- Modal body 1 -->
<div class="modal-body">
<div id="video1"></div>
</div>
So it loads the video perfectly but when the user clicks outside the box or clicks the close link (x), the video sound can be still heard!
However, the video is closed.
So how can I properly fix this so that if the user clicks anywhere outside of the Modal box or if he clicks on x, the video will be closed COMPLETEY?