Create an HTML5 Video Gallery with jQuery
- Preparing the graphics
- Adding and linking thumbnail buttons
- Designing the layout
- 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
Previewing the project across browsers and devices
- [Voiceover] Hi, this is Chris Converse and this is a course on creating an interactive video gallery. So, I wanna start by showing the final project that we're gonna be creating. In the final project folder we have two HTML files, we have an index option one, and index option two. Inside of the includes we have two different java script file options as well. Both of these options have to do with how the video player's 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 roll over 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's going to use it's own built in HTML five support to show the video controls as well. So, clicking outside will make the video go away. Click on the next video, (upbeat music) 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 Thera or OGV video file format.
So, again, I can come in here 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. (upbeat music) These videos work great. Let's come into Chrome. Now, Chrome doesn't allow auto-play 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 HTML five video, we also have a Flash fallback that we're gonna 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 seven and eight that don't have HTML five support, what's actually gonna happen is it's going to use Flash instead of HTML five. So, if I were to right click on this, I would see that we're actually using Flash here instead of HTML five video. Now, the options I was referring to before have to do with how the different mobile devices are gonna 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 screen's.
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 their respective video players and play the video. The second option has to do with bypassing the overlay all together 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 gonna have the link change the URL to go directly to the actual video file itself.
Creative Inspirations: Stefan G. Bucher, Designer, Illustrator, and Writer64,253 Views
Draw Better and Faster with Illustrator CC143,764 Views
Revit Structure 2013 Essential Training210,468 Views
UX Design Techniques: Analyzing User Data111,448 Views
Create Navigation Menus with jQuery71,427 Views
PHP with MySQL Essential Training3,907,848 Views
Deke's Techniques1,435,609 Views
Git Essential Training2,578,682 Views