Hello i'm having a modal with a twitch iframe with a streame inside of it. What i need is when i close the modal it resets or pause the twitch stream. Because when i close it now then stream keeps playing, and it should only play sound/video, when the modal is open.
Code:
<div id="myModal@(PredictioItems.Id)" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">@PredictioItems.GetPropertyValue("teamvsteam")</h4>
</div>
<div class="modal-body">
<p>@PredictioItems.GetPropertyValue("predictdescription")</p>
<hr />
<h4>Game stream</h4>
<div>
<iframe width="100%" height="350" frameborder="0" scrolling="no" src="@PredictioItems.GetPropertyValue("livestream")"></iframe>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>