Thursday 7 August 2014

Script For Page Reload Page One Time After Loading the Page

Given Script load the page one time after loading the page ....

<script type='text/javascript'>

(function()
{
  if( window.localStorage )
  {
    if( !localStorage.getItem( 'firstLoad' ) )
    {
      localStorage[ 'firstLoad' ] = true;
      window.location.reload();

    }
    else
      localStorage.removeItem( 'firstLoad' );
  }
})();

</script>

Friday 1 August 2014

Generating a Thumbnail from a YouTube Video

Websites, blogs and web applications regularly embed video content from various video service providers such as YouTubeand Vimeo. Videos are usually depicted using image thumbnails, tweaked to fit the graphics design of the website. When a video thumbnail is clicked, the actual video content starts playing.
 
In this post we wanted to explain how Cloudinary can help you to easily generate thumbnails from public videos. These thumbnails can be generated while applying any required image transformation in order to match your graphic design requirements.

Generating a Thumbnail from a YouTube Video

Let’s assume that we want to display the thumbnail of the following YouTube video:
 
This can be easily accomplished by adding the video ID to the URL. 'o-urnlaJpOA' in this example:
http://res.cloudinary.com/demo/image/youtube/o-urnlaJpOA.jpg