Book Image

HTML5 Multimedia Development Cookbook

Book Image

HTML5 Multimedia Development Cookbook

Overview of this book

HTML5 is the most significant new advancement the web has seen in many years. HTML5 adds many new features including the video, audio, and canvas elements, as well as the integration of SVG. This cookbook is packed full of recipes that will help you harness HTML5’s next generation multimedia features. HTML5 is the future.Whether you’re a seasoned pro or a total newbie, this book gives you the recipes that will serve as your practical guide to creating semantically rich websites and apps using HTML5. Get ready to perform a quantum leap harnessing HTML5 to create powerful, real world applications. Many of the new key features of HTML5 are covered, with self-contained practical recipes for each topic. Forget hello world. These are practical recipes you can utilize straight away to create immersive, interactive multimedia applications. Create a stylish promo page in HTML5. Use SVG to replace text dynamically. Use CSS3 to control background size and appearance. Use the Canvas to process images dynamically. Apply custom playback controls to your video.
Table of Contents (16 chapters)
HTML5 Multimedia Development Cookbook
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface

Creating a cache manifest for offline storage


In this recipe we will create a cache manifest file to enable us to store an HTML5 page offline and still view the images and video displayed on the page.

Getting ready

You will need an HTML5 page, such as the one provided in the code files of this recipe, and access to upload files to a server, and then view them on a computer, smart phone, or other web-enabled device with a browser.

How to do it...

First, we will create the Cache Manifest file. This should be created in a simple text editor. It should contain all the files and supporting code a user will need to access while offline. The first thing listed is the current file type (CACHE MANIFEST). The version number of the manifest should also be included. Notice we add paths to all the files we want the users to have access to in the following block of code:

CACHE MANIFEST
# version 0.1
itsallgooed.html
css/Brian Kent Font License.txt
css/exact-css-from-tutorial.css
css/font-stylesheet.css
css...