Closed (fixed)
Project:
Colorbox
Version:
7.x-2.4
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 May 2013 at 09:34 UTC
Updated:
21 Jan 2016 at 10:23 UTC
Jump to comment: Most recent
Comments
Comment #1
sudev.pradhan commentedHi marga123,
I am not sure if I understand your issue. Do you want to open the youtube video in a colorbox popup?
Comment #2
charlie charles commentedThanks for your message sudev,
Yes that right, I want to open the youtube video in a colorbox popup
Would you let me know how do I do this please?
Comment #3
silurius commentedFirst enable "Enable Colorbox load" on admin/config/media/colorbox.
Then use something like this in your node:
<a class="colorbox-load" href="http://www.youtube-nocookie.com/embed/M7d9VpSdGhA?width=640&height=480&iframe=true" title="TITLE">LINK-TEXT</a>Note: You have to get the embed code for the video and use that in your link (e.g., "M7d9VpSdGhA" in the example above). You can find the code under the "Share" tab on the video's play page (the page where people post comments on videos).
I think using the standard YouTube URL confuses Colorbox because of the ? in the URL, but I'm not sure why using the embed URL doesn't work (shows up blank in the popup). I don't feel comfortable using youtube-nocookie.com because I'm not familiar with it and for all I know it's sketchy, but it works. If anyone knows how to use youtube.com instead, please share.
Comment #4
sudev.pradhan commentedYou could try adding the classes 'colorbox-load' and 'cboxElement' to the Youtube video link (class="colorbox-load cboxElement")
Then add these query parameters to the href tag of your Youtube video -> ?width=400&height=300&rel=0&iframe=true
Comment #5
vincent_jo commentedHi,
i´m using the module Video Embed Field to add a video field (youtube, vimeo...) into the content-type which offers a colorbox-handler. Nice to integrate in views.
Vincent
Comment #6
oakulm commentedsilurius nailed it. Thanks!
Comment #7
stijnstroobantsHi,
I tried to include a Youtube video in the Colorbox. Colorbox-popup is loaded and I can play the video. But when I scroll down I get an unlimited number of the same movie in the iframe.
This is the output of the code:
<a href="https://www.youtube.com/embed/imgv8LA_IrE?rel=0&width=640&height=390&iframe=true" class="colorbox-load cboxElement init-colorbox-load-processed">https://www.youtube.com/embed/imgv8LA_IrE</a>Is there anybody who knows what's causing this issue?
Thanks!
Comment #8
stijnstroobantsOk, I fixed the issue with the unlimited amount of video's in the colorbox by enabling the jquery_update module. :-)
Comment #9
knalstaaf commented@Vincent_Jo: Video Embed Field doesn't seem to integrate well with Views and Colorbox.
If you want to play YouTube, Vimeo and other third party video's, it's in my experience better to consider a link field (called "Video URL" for instance), and use the output of that link field as a token in Views, like this:
Notice: this requires the embed url to be filled out in the video url field. For YouTube this currently looks like this:
https://www.youtube.com/embed/[YouTube ID], for Vimeo like this:https://player.vimeo.com/video/[Vimeo ID].Also make sure Colorbox load is enabled in the Colorbox configuration.