New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using an embed code builder

From: HTML5: Video and Audio in Depth

Video: Using an embed code builder

So now that we had been through the whole process of building our embed code and we understand what each piece does, I want to show you a handy tool I created to help with the embed code process. If you go to videojs.com/embed-builder, I have a tool where you can just plug in the values into the fields and it will automatically generate the embed code for you. So I am going to go ahead and plug in the same values we were using through the examples. So the Poster Image, it's on the explorecalifornia website, in video assets folder, jpg, and then I am just going to copy that and use that for my MP4 source, which is in the same folder under podcast .mp4, and I am going to do the same for our WebM file and the same for our ogv file.

Using an embed code builder

So now that we had been through the whole process of building our embed code and we understand what each piece does, I want to show you a handy tool I created to help with the embed code process. If you go to videojs.com/embed-builder, I have a tool where you can just plug in the values into the fields and it will automatically generate the embed code for you. So I am going to go ahead and plug in the same values we were using through the examples. So the Poster Image, it's on the explorecalifornia website, in video assets folder, jpg, and then I am just going to copy that and use that for my MP4 source, which is in the same folder under podcast .mp4, and I am going to do the same for our WebM file and the same for our ogv file.

Under the last one you can see is our Flash Source, but it also has this Use MP4 and we can't change this right now without turning off the Use MP4. What this does is it tells Flash to use the same file that we're using for MP4 source. But if you wanted to provide a specific source for Flash you can do that as well. Then on the right we can change some attributes and I'll change our Width to 480 and Height to 300, which is the size of our movie. We have other options that we can turn off, the Download Links, turn off support for VideoJS, preload the video, autoplay. If we scroll down, we can see the embed code. It already looks pretty big, so I am going to use the Compact Version which turns off all the comments.

But from there we can just go ahead and copy all of this and go over to the code and just paste over what we've already done, the stuff that we just created with the Embed Builder. I'll save that and go over to Firefox and reload our page, and you can see? (Music playing) It works the same way that everything else worked. You can see the difference, that now it has the support for VideoJS link, which you can remove, but it just kind of shows you that the change has been made and now it works the same way that the other stuff did.

And so hopefully you don't feel too duped that this has been here all along or we've been going through the other videos. It is important to understand what all the pieces do in case you run into any issues or you need to make a specific modification. But now you can use the Embed Builder to get started quickly.

Show transcript

This video is part of

Image for HTML5: Video and Audio in Depth
HTML5: Video and Audio in Depth

37 video lessons · 14508 viewers

Steve Heffernan
Author

 
Expand all | Collapse all
  1. 1m 24s
    1. Welcome
      42s
    2. Using the exercise files
      42s
  2. 15m 18s
    1. Understanding HTML5 video and audio
      4m 46s
    2. The state of HTML5 video and audio
      4m 29s
    3. Understanding the format war
      3m 53s
    4. Configuring your server to deliver HTML5 media formats
      2m 10s
  3. 32m 36s
    1. Using the video and audio tags
      5m 34s
    2. Using multiple sources for browser compatibility
      5m 53s
    3. Preloading
      4m 16s
    4. Autoplaying
      2m 2s
    5. Looping
      5m 11s
    6. Setting a poster frame
      3m 43s
    7. Setting the video width and height
      3m 40s
    8. Displaying subtitles and captions
      2m 17s
  4. 12m 40s
    1. Falling back to Flash
      4m 4s
    2. Falling back to download links
      6m 21s
    3. Using an embed code builder
      2m 15s
  5. 22m 17s
    1. Understanding HTML5 video formats
      5m 10s
    2. Understanding HTML5 audio formats
      2m 57s
    3. Encoding MP4/H.264 video with HandBrake
      3m 13s
    4. Encoding Ogg, Theora, and WebM with Firefogg
      3m 18s
    5. Encoding audio formats with VLC
      5m 54s
    6. Automating video and audio encoding
      1m 45s
  6. 34m 59s
    1. Setting up the JavaScript
      4m 39s
    2. Creating Play and Pause buttons
      7m 52s
    3. Creating a Play Progress bar
      5m 49s
    4. Creating a Load Progress bar
      9m 29s
    5. Creating a Current Time and Duration display
      7m 10s
  7. 4m 37s
    1. Overview of known issues
      35s
    2. Autobuffer or preload?
      56s
    3. Load progress in Firefox 3.6
      41s
    4. Android 2.0 issues
      1m 5s
    5. iOS 3 issues
      1m 20s
  8. 2m 8s
    1. Flight of the Navigator
      50s
    2. ZEN Audio Player by simurai
      34s
    3. The Wilderness Downtown by Google and Arcade Fire
      44s
  9. 1m 40s
    1. Further exploration
      1m 40s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com 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 lynda.com.

Sign up and receive emails about lynda.com 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.