2

I added some videos to my site and I'm using views to display them. I followed a tutorial and i used the rewrite the output option of the view with allowed replacement patterns to display videos in lightbox in this way.

<a href="[field_video-video-url]" rel="lightvideo"><img src="[field_vthumb]" 
height="120" width="180"></a>

Here when i clicked on the a image, the video will played in the lightbox and that was great. In the above link added a custom the image field as thumbnail but that doesn't work well, because when i add more than one video all will have the same thumbnail.

But then i also came to know, that the Video Embed Module when used to add videos, auto generates the thumbails of the added youtube videos in a public directory. So again i worked on the replacement patterns and got the raw thumbnail field generated by the Video Embed Module.

Again i rewrote the output with the raw thumbnail as image

 <a href="[field_video-video-url]" rel="lightvideo"><img src="[field_video-thumbnail_path]" 
 height="120" width="180"></a>

But the thumbnail image is broken and the image path is shown as public://video_embed_field_thumbnails/youtube/RQieoqCLWDo.jpg which i guess is not recognized by drupal.

So my point here is, Is there a way to access the raw thumbnail in the rewrite patterns so that every youtube video gets its own thumbnail without manually adding image as thumbnail.

0

I only use the video embed field in views and have set the formatter to colorbox. I get the auto-generated thumbnails by default and on click of it, the video opens in a colorbox. You don't need to do anything else then this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.