How to use lightbox2 to display video on my page

First of all, my site does not use Drupal.So any alternatives for a pop-up video player will be appreciated.

I want to show your video player popup on my web page. I downloaded lighbox from the following link: http://ftp.drupal.org/files/projects/lightbox2-6.x-1.11.zip

>

I extracted the zip file to my root site

I added the following lines to my page title:

<link type="text/css" rel="stylesheet" media="all" href="/lightbox2/css/lightbox.css?1" />

<script type="text/javascript" src="/lightbox2/js/auto_image_handling.js?1"></script>
<script type="text/javascript" src="/lightbox2/js/lightbox_video.js?1"></script>
<script type="text/javascript" src="/lightbox2/js/lightbox.js?1"></script>

and the following in the body:

<a href="http://www.youtube.com/watch?v=0gBtF_awV2o" rel=lightvideo[width:500px;height:400px;]>
    <img src="sample" alt="Live TV">
</a>

But the video opens in a new tab, not as a popup. Where am I mistaken? I can’t find tutorials for this anywhere, although I have this code on many other pop-up video pages.

Edit: Uses a shadow code. Opens youtube page instead of popup!

: ! Shadowbox . . 20 .

+3
4

, jQuery lighbox.

, src .

, , , FAQ thickbox.

- videolighbox .

!

-1

2 , .

0

, , , lightbox.js, Drupal, , Drupal.settings, , Drupal, undefined.

0

Lightbox2 works in drupal.

You must enable video support in the settings lightbox2 URL: yourdrupal.com/admin/config/user-interface/lightbox2

The flv player must be empty if you don't have one.

0
source

Source: https://habr.com/ru/post/1785444/


All Articles