James Sherry PRO
Web Development Tutor and Co-Founder of { The Jump } Digital School
Session 4
We can put off loading some images/iframes until they are needed. This enhances the performance of our page radically
There are other options for embedding
audio: soundcloud
Advantages:
Disadvantages:
<audio controls loop>
<!-- fallback, if not supported -->
Your browser does not support the <code>audio</code> element.
<!-- source files -->
<source src="crimson_fly.ogg" type="audio/ogg">
<source src="crimson_fly.mp3" type="audio/mpeg">
</audio>
Attributes:
<video width="640" height="480" poster="youtube_banner.jpg" controls preload autoplay>
<!-- VIDEO SOURCES (files) -->
<source src="puppies.webm" type="video/webm"> <!--newest format-->
<source src="puppies.ogv"type="video/ogg">
<source src="puppies.mp4" type="video/mp4"><!--oldest format-- >
<!-- SUBTITLES -->
<track src="subtitles-en.vtt" kind="subtitles" srclang="en" label="English" default>
<track src="subtitles-fr.vtt" kind="subtitles" srclang="fr" label="French">
I'm sorry, your browser doesn't support HTML5 video. <!-- fallback if the browser can't play video -->
</video>
<iframe width="560" height="315" src="https://www.youtube.com/embed/IfeyUGZt8nk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Make a meditation site with a play button. When the play button is pressed play both a serene video and audio file on loop until the user presses pause. Make the site as accessible as possible.
By James Sherry
HTML5 tag round-up