Learn about the autoplay attribute. Discover that Google turns it off in Chrome when testing the file locally. In this video, learn how to apply autoplay and, if you use Chrome, how to actually get it to work locally.
- [Instructor] As we discovered in the previous exercise,…simply adding a source attribute does nothing more…than show the first frame of the video.…Obviously, there must be a way to get the video to play.…There is.…But the way you do it, is evil.…How evil?…Well, let's find out by opening the file…saved from your previous exercise…or by opening the Autoplay.html file…found in the chapter download.…If we scroll down to line 44…and enter autoplay right after the source attributes,…I'm just gonna space here after the quotation mark…and type in the word autoplay, you can see,…there it is, there's the autoplay attributes.…
Now if I test it, it will start automatically playing,…but before we do that, let's clearly understand something.…I'm gonna repeat, autoplay is evil.…We have all arrived at sites where a video starts playing,…and there seems to be no way to turn it off.…The upshot is, we leave the page.…There is a use for autoplay, which we will get to later…in this course, but generally, adding this attribute…is a serious contravention of best practices.…
- Key video formats used to publish on the web
- Encoding video that's optimized for online delivery
- HTML5 native video embedding and interaction
- Styling video components with CSS
- Captioning video
- Preparing video for social media
- Using Dynamic Link
Skill Level Beginner
Design the Web: HTML Background Videowith Chris Converse28m 35s Beginner
Web Video: Develop Your Video Presencewith Rick Allen Lippert41m 54s Appropriate for all
Web Video: Makeup Techniqueswith Rick Allen Lippert25m 47s Appropriate for all
Exercise files1m 11s
1. Web Video Formats
2. Encoding Video
3. HTML5 and Video
4. Video and CSS
5. Playing with Video
Next steps1m 23s
- Mark as unwatched
- Mark all as unwatched
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.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.