Get img thumbnails from liveleak? - youtube

I want to get a thumbnail image for videos from liveleak.com.
When getting images from Youtube I just do like this:
http://img.youtube.com/vi/HwP5NG-3e8I/2.jpg
Any idea how to do for liveleak.com?

Unfortunately, there does not appear to be an easily standardized URL like youtube has, but if you can make a call to the video page, you can scrape out the image fairly easily. There's a <script> tag on the page that makes a call to a jwplayer function. This function is initialized with an object that has an image property. You can use this value as the thumbnail.

It will still require scraping the page bu the meta og:image tag in the header also points to the thumbnail image.

Related

ActionText method for of handling of video and playback controls as simply as it does for images?

ActionText with trix editor is incredible for rich text, including images, right out of the box.
It will also allow video upload, however, when it displays the rich text that contains the video, it seems to create an <img> tag with the mp4 (video) file as it's src.
<img src="http://localhost:3000/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e9814174dba67538aa8dea33ab87b6302d98a341/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9VY21WemFYcGxYM1J2WDJ4cGJXbDBXd2RwQWdBRWFRSUFBdz09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--a777e477dec0d9367d8309b7603c814a23f96840/my_video_file.mp4">
I'm not 100% what it's doing (perhaps its logic is: "I can't play video, so I'll display an image of the video instead")?
Is there any simple way to allow users to drop/drag video files (not links to videos) into an ActionText field and display the video along with playback controls in when the rich text is rendered? (basically, the what ActionText does for images, but for video)
What I know so far
This video appears to provide a way (watching now and will update with what I find)
I guessed this functionality may be requested by others, but I can't spot anything
Other reading on 'manual' approaches here, here, here.

html2canvas not working for large HTML content

I am trying to use html2canvas library, to save html that's dynamically generated and output to the page as image. If the HTML generated isn't too much, then the html2canvas would work just fine, however, if the html generated is really too big (when I try to print it, it's 70 pages), then the html2canvas will return a canvas object where canvas.toDataURL('image/png') returns data:; and that's it.
I found a post online suggesting to change the maxInt in the html2canvas.js file to be Number.MAX_VALUE, but that didn't work as well.
Is there a way to workaround this issue? I will need this image to eventually pass it to jspdf library to generate a pdf document.
First things first. If you are getting clipping it could be because you are trying to capture an image that is too large for the browser. See the FAQ on limits of canvas sizes:
https://html2canvas.hertzen.com/faq
If that's the case then you'll need to break up the image into smaller sub-images and write those out as separate pages to your PDF. You can't combine them into a single image because the browser won't let you.
If you are under that size then it could be because of a defect that affects alpha.12 where capturing document.body can clip content if you are using passing the option windowWidth. The workaround to that defect is just to capture something other than document.body and it'll work.

revolution slider meta on image gallery

I use revolution slider on a series of sites and right now I'm developing a site that is image based. The images are inside categories and I need to create an image slider in which I can show the title and description of the image with writing that for each image but rathe using the meta of the plugin. I've tried using the meta provided for posts based slider but that doesn't work. Any hep? Thanks

Replace YouTube Error Thumbnail with My Own

I have a unique challenge. We have lists of YouTube videos that members have posted and they are shown on a page that shows all the thumbnails. However, sometimes these videos become unavailable or deleted and the thumbnail changes to a grey box with 3 dots. How can I replace this image, with an image of my own making.
Here is an example: http://www.storeboard.com/videos/music/ look for the video entitled "The Six Teens", it is showing with the greyed out image and three dots.
Any assistance would be greatly appreciated.
Many Thanks.
If you look at the picture there is a prefix #at=24
http://i1.ytimg.com/vi/vkAusm1SM7I#at=24/hqdefault.jpg
http://i1.ytimg.com/vi/vkAusm1SM7I/hqdefault.jpg
When fetching with the gdata API just detect if #at=24 is availible and then replace the thumb.

Solution for display image in library website

In my website, I have a library contain all image of user, I want to display all image in this library. How can I do it?
I have solution but I can’t do it. This’s my solution. I’ll create thumbnail for each image and display it in library. Size of thumbnail is very small, so I don’t worry about performance. If I create thumbnail in my server. It must download, read and resize these images, then it return for my website. This way I feel not good. I have many images, each customer have about hundreds images, size of each image about 1mb or 2mb. I think have no server can handle it. Another way is create thumbnail on client by jQuery, but I can’t do it and my friend talk with me. jQuery don’t handle it. How can I do it for my solution? Hope you understand what I mean
I think you can use pagination if you would like to return million images in a page
so for instance 50 images per page to keep up with your web performance
You need to generate thumbnails on server and show thumbnails in the gallery. When a user clicks on a thumbnail in the gallery, show the full image.
I think your first idea is better. Because you don't want to show the images in actual size and you want to make them smaller. So using their thumbnail is a good solution. If you think this could add some complexity you can make the thumbnails for each image when user uploads them and in your view just use the thumbnails.

Resources