Alim
Alim

Reputation: 1

how to link Youtube video in Lightbox v2.10.0

I am using Lightbox v2.10.0 by Lokesh Dhakar in Bootstrap 4, instead of image want to play Youtube video in the modal window, please help me how to do it.

here is what I tried, but i am unable to play Youtube link

      <div class="col-lg-4 col-md-6 portfolio-item filter-app">
        <div class="portfolio-wrap">
          <img src="img/portfolio/app1.jpg" class="img-fluid" alt="">
          <div class="portfolio-info">
            <h4><a href="#">App 1</a></h4>
            <p>App</p>
            <div>
              <a rel="iframeLink" href="https://www.youtube.com/watch?v=_n3b0rcDEIk" data-lightbox="portfolio" data-title="App 1" class="link-preview" title="Preview"><i class="ion ion-eye"></i></a>
            </div>
          </div>
        </div>
      </div>

Upvotes: 0

Views: 2028

Answers (1)

Lokesh Dhakar
Lokesh Dhakar

Reputation: 5569

Lightbox2 does not support videos.

Your best bet is to use an alternative 'lightbox' library that has video support. You could also modify Lightbox2 to have video support, using existing work as a starting point (https://github.com/lokesh/lightbox2/pull/564), but this would be substantially more challenging.

Upvotes: 1

Related Questions