Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now

Create an HTML5 Video Gallery with jQuery

with Chris Converse

Video: Previewing the project across browsers and devices

Shows how to develop an interactive video gallery for the web in a coding environment, using HTML5 with a Flash fallback, CSS, and the open-source JavaScript library jQuery.
please wait ...
Create an HTML5 Video Gallery with jQuery
Video duration: 0s 59m 53s Intermediate


In this course, author Chris Converse develops an interactive video gallery for the web, working in a coding environment using a combination of HTML5 with a Flash fallback, CSS, and the open-source JavaScript library jQuery. The course shows how to design the site layout and construct the code for a player that works on multiple web browsers, platforms, and mobile devices. Techniques to enable HTML5 video on Android and ensure that older versions of Internet Explorer default to Flash instead of HTML5 are also demonstrated.

Topics include:
  • Preparing the graphics
  • Adding and linking thumbnail buttons
  • Designing the layout
  • Adding jQuery and JavaScript
  • Including video information in the thumbnail links
  • Styling the thumbnails with CSS rules
  • Creating a DIV container to hold the video player code
  • Setting up click events for the thumbnails
  • Incorporating the FancyBox lightbox plug-in
Developer Web
HTML jQuery

Previewing the project across browsers and devices

Hi, this is Chris Converse and this is a course on creating an interactive video gallery. So I want to start by showing the final project that we're going to be creating. In the Final Project folder we have two HTML files. We have an index_option_1 and index_option_2. Inside of the includes, we have two different JavaScript file options as well. Both of these options have to do with how the video player is going to work on mobile devices. So we'll take a look at those in a moment, but first let's come over to Safari and take a look at how this interactive experience is working in Safari.

So when I rollover each of these thumbnails I get a rollover state. When I click on a thumbnail it loads a video up in a Lightbox and then each browser is going to use its own build-in HTML5 support to show the video controls as well. So clicking outside will make the video go away. Click on the next video. (Music playing) Close that as well. So this is how the user experience looks in Safari. In Firefox, instead of using MPEG4, which is the video format that all of the browsers and devices are going to use except Firefox, we're going to be using the Ogg Theora or OGV video file format.

So again I can come in and click and get the same user experience. The controls are going to look a little different based on how Firefox's controls are going to be rendered, as opposed to other browsers. (Music playing) These videos work great. Let's come into Chrome. Now Chrome doesn't allow autoplay by default. So we click on the video, it loads up, but I do have to come down here and click Play in the Chrome browser to see these rendering. Now if your browser doesn't support HTML5 video, we also have a Flash fallback that we're going to be programming in.

So we have some Flash video players and a video skin that you can put into your project. So for browsers like IE 7 and 8 that don't have HTML5 video support, What's actually going to happen is it's going to use Flash instead of HTML5. So if I were to right-click on this, I would see that we're using Flash here instead of HTML5 video. Now the options I was referring to before have to do with how the different mobile devices are going to handle video. If we look at this running on an iPad, you'll notice that the iPad's user experience is very similar to that of the computer screens.

I tap on a video, an overlay comes up. I can tap on the overlay, the video will start to play right inline inside of the Fancybox overlay, and then I can also click the Full Screen view to come out of the container. Go into Full Screen view using the devices video player and then condense that down and go back to the Lightbox. The two options that we really were talking about for what mobile devices have to do with the phones. The Android platform doesn't support HTML5 video unless we use an onClick JavaScript event and we don't specify the codec.

And in both cases for the iPhone and Android, we can see that the video overlay comes up, I can tap on the video, and then they will each jump into the respective video players and play the video. The second option has to do with bypassing the overlay altogether, since neither platform supports playing the video inside of the overlay, so the second option is to just change the link. Instead of having the link invoke the overlay, we're going to have the link change the URL to go directly to the actual video file itself. Now on the iPhone platform this means that it opens another window in mobile Safari requiring us to hit the Back button.

And during this course we're actually going to show you how to do JavaScript detection so you can change the user experience depending on the individual devices. So I hope this sounds interesting to you, and if so, let's get started with the first movie.

There are currently no FAQs about Create an HTML5 Video Gallery with jQuery.






Don't show this message again
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.

Mark all as unwatched Cancel


You have completed Create an HTML5 Video Gallery with jQuery.

Return to your organization's learning portal to continue training, or close this page.


Upgrade to View Courses Offline


With our new Desktop App, Annual Premium Members can download courses for Internet-free viewing.

Upgrade Now

After upgrading, download Desktop App Here.

Become a Member and Create Custom Playlists

Join today and get unlimited access to the entire library of online learning video courses—and create as many playlists as you like.

Get started

Already a member?

Log in

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

You started this assessment previously and didn’t complete it.

You can pick up where you left off, or start over.

Resume Start over

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.