how to stop audio after bootstarp close button in iframe

Apr 17 2018 1:29 PM
how to stop audio after bootstarp close button in iframe here is my code . i am genereating model id is dynamically bcz i have more videos.
 
<div class="modal fade" id="@item.id" role="dialog">
<div class="modal-dialog modal-sm">
<div id="ndf" class="modal-content" Style="float:right">
<div class="modal-header">
@*<button type="button" class="close" data-dismi"ss="modal">&times;</button>*@
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">@item.id</h4>
</div>
<div class="modal-body" id="yt-player">
<iframe id="iframemv" src="@item.TrailerURL"></iframe>
@if (@item.TrailerURL == "")
{
<iframe id="iframemvs" src="@item.thumbURL"></iframe>
}
else
{
}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
 
here below how can i pass dynamicall model id here? instead od (#'myModal')
 
<script type="text/javascript">
$('#myModal').on('hidden.bs.modal', function ()
{ callPlayer('yt-player', 'stopVideo'); });
</script>

Answers (1)