Level 0
Level 1

HTML5 APIs

HTML5 provides a serie of APIs that help in creating web applications. For example, with a few lines of code you can request the users geolocation. You can play videos or audio natively, without using any external plugins such as Adobe Flash or Apple Quicktime. In this objective you will have a quick overview of all the different HTML5 APIs, and you will make use of two very interesting APIs: namely geo location and the audio element API.

Glance through the HTML5 APIs documentation

HTML5 introduced a lot of APIs. Some of them are more useful than others. Have a quick look at the official W3C documentation. Maybe you can find an API that you can use for your own group project.

Instructions
Resources

Find your own location

One of the most interesting HTML5 API's is the geo location API. The geo location API enables you to find the geo location of the users his computer. The OECD Regional Wellbeing uses this feature to automatically compare the users country with other countries. In the Plunker you will see how this feature is being implemented in Polymer. In the final objective you will combine this component with the Rijksmuseum API.

Instructions
Resources

Play audio or video

Another interesting API is the video and audio element. Playing sound or video has been possible for quite some time now. However, it always required the user to have external plugins installed (such as Flash, RealPlayer or Quicktime). This API is supported natively by browsers, and therefore enables you to get really creative. The Sound City Project is a really neat example. It uses 3D soundmapping technology to create an almost life-like experience. Videos are often used as full-screen backgrounds. In our case we used it to show some footage of the Rijksmuseum with their logo on top of it. As you can see in the code, it is actually quite easy.

Instructions
Resources