bootstrap tutorial - How to embed YouTube video in Bootstrap modal - bootstrap examples - bootstrap templates - bootstrap 3
Answer: Insert YouTube Code inside Modal Body
- You can easily embed or place the YouTube video inside a Bootstrap modal like you do on the normal web pages. Just get the code to embed the video from YouTube site and place it inside the .modal-body element. But there is small problem; the YouTube video doesn't stop automatically when you close the modal window. It will still play in the background.
- To solve this problem you can simply toggle the url value of the YouTube's video iframe src attribute dynamically using the jQuery. Here's an example: