javascript - how to use lightbox2 to show video in my page - Stack Overflow

First of all my site does not use Drupal.So any alternatives for a popup video player funcionality woul

First of all my site does not use Drupal.So any alternatives for a popup video player funcionality would be appreciated.

I want to show a popup you tube video player in my web page.I downloaded lighbox from the following link: .x-1.11.zip

I extracted the zip file into my sites root

I added the following lines in my page header:

<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="" rel=lightvideo[width:500px;height:400px;]>
    <img src="sample" alt="Live TV">
</a>

But the video opens up in a new tab and not as a popup.Where am i going wrong?I cant find tutorials for this anywhere, although i have this kind of code in many other pages with popup videos.

Edit: Used shadowbox. Opens up youtube page instead of popup!

Edit: Problem solved! Got Shadowbox to work. It's brilliant and easy. The mercial licence costs $20 though.

First of all my site does not use Drupal.So any alternatives for a popup video player funcionality would be appreciated.

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

I extracted the zip file into my sites root

I added the following lines in my page header:

<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./watch?v=0gBtF_awV2o" rel=lightvideo[width:500px;height:400px;]>
    <img src="sample" alt="Live TV">
</a>

But the video opens up in a new tab and not as a popup.Where am i going wrong?I cant find tutorials for this anywhere, although i have this kind of code in many other pages with popup videos.

Edit: Used shadowbox. Opens up youtube page instead of popup!

Edit: Problem solved! Got Shadowbox to work. It's brilliant and easy. The mercial licence costs $20 though.

Share Improve this question edited Apr 1, 2016 at 0:34 João Pesce 2,5041 gold badge25 silver badges27 bronze badges asked Jan 14, 2011 at 13:49 humblePilgrimhumblePilgrim 1,8064 gold badges25 silver badges50 bronze badges 1
  • Check out my answer @ stackoverflow./questions/11548589/… – peppertom Commented Jan 19, 2017 at 11:04
Add a ment  | 

4 Answers 4

Reset to default 0

You probably are either not calling jQuery or lighbox correctly.

Make sure the have the two src correct.

I'm not sure I understood your question but you cant display video with lightbox, it says so in the FAQ and it remends thickbox.

You could also use something videolighbox or any out there.

Good luck!

I would download Lightbox 2 from here and see if it works any better.

The reason it doesn't work is because the lightbox.js file included in the Drupal module is a modified version that uses the Drupal.settings variable, which if you don't use Drupal, is undefined.

Lightbox2 video does work in drupal.

You have to enable video support in the lightbox2 settings The url: yourdrupal./admin/config/user-interface/lightbox2

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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745249769a4618606.html

相关推荐

  • javascript - how to use lightbox2 to show video in my page - Stack Overflow

    First of all my site does not use Drupal.So any alternatives for a popup video player funcionality woul

    3小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信