How to use Bootstrap modal for YouTube videos and play automatically ?The task is to use modal for YouTube videos in Bootstrap. Here we will discuss two topics, embedding YouTube video in Bootstrap modal and make YouTube video auto-play in the Bootstrap modal. Embedding YouTube videos in the Bootstrap modal is very easy and simple to implement using the below approach. But there is a small problem when you close the modal the video will continue playing in the background.
Below examples implements the above approach: html
Output: Example 2: This example implements how to Autoplay YouTube video inside Bootstrap modal. To make YouTube video auto-play in the Bootstrap modal we have to place ?autoplay=1 after the attached Youtubes source file. html
Output: Supported Browser:
jQuery is an open source JavaScript library that simplifies the interactions between an HTML/CSS document, It is widely famous with its philosophy of Write less, do more.
Article Tags :
Bootstrap CSS HTML JQuery Web Technologies Web technologies Questions
Bootstrap-Misc CSS-Misc HTML-Misc jQuery-Misc Practice Tags :
HTML |