One of the best and worst things about making games for web browsers is that the platform is a moving target. New features are constantly proposed, specced out and implemented. At the moment while many features are in a nascent state, keeping track of which features are available in which browsers is a bit of a pain.

This page is an effort to supply a list of HTML5 APIs that I think game developers want to know about and their availability in different browsers. Hopefully we’ll gradually see this all go green.

Updates

  • 2012-10-09 - PointerLock support lands in Chrome stable
  • 2012-09-11 - Mozilla announced they have started work on Web Audio API

Contents

Rendering

Canvas

2D rendering

Chrome yes
Firefox yes
Safari yes
Opera yes
IE yes

source

WebGL

3D rendering using API similar to OpenGL ES 2.0

Chrome yes
Firefox yes
Safari nearly*
Opera nearly*
IE no

*In Safari and Opera WebGL must be enabled in a developer menu.
source | spec

Fullscreen API

Allow an element to render fullscreen

Chrome yes
Firefox yes
Safari yes
Opera planned
IE no

source | spec


Audio

Web Audio API

Low-latency audio playback for sound effects. Including effects pipeline for reverb, pan, spatial audio, etc.

Chrome yes
Firefox planned*
Safari yes
Opera no
IE no

*Mozilla have announced they’re working on it and progress is tracked on this issue
spec


Input

Orientation Events

Get events from accelerometers in the device

Chrome yes
Firefox yes
Safari yes*
Opera no
IE no

*Mobile Safari only
source | spec

PointerLock API

Capture mouse input without moving the cursor. Required for FPS type camera control.

Chrome yes
Firefox fullscreen mode only
Safari no
Opera no
IE no

*PointerLock must be enabled in a chrome://flags
spec

Gamepad API

Get input from hardware gamepad/controllers

Chrome yes
Firefox planned*
Safari no
Opera no
IE no

*Firefox builds with gamepad support are available, issue tracking it is here.
spec

Stream API / getUserMedia()

Get input from microphone or webcam

Chrome yes
Firefox planned*
Safari no
Opera yes
IE no

*Firefox are planning to support getUserMedia()
source

Keyboard

Support for keyboard input that supports international keyboard layouts. There is no standardization effort on this, just an early stage proposal from Mozilla.
source


Networking

WebSockets

Continuous communication over HTTP

Chrome yes
Firefox yes
Safari yes
Opera yes
IE yes

source | spec

WebRTC / PeerConnection API

Realtime communication API for peer-to-peer type networking including audio and video chat.

Chrome nearly*
Firefox planned**
Safari no
Opera no
IE no

*You can enable WebRTC in chrome://flags
**Mozilla have the feature planned
source | spec


Storage

Web Storage

Key-Value store for local data, that can persist between page loads. Like Cookies done right.

Chrome yes
Firefox yes
Safari yes
Opera yes
IE yes

source | spec

Offline Storage

Cache entire applications locally for use when offline.

Chrome yes
Firefox yes
Safari yes
Opera yes
IE yes

source | spec

Do you have any other suggestions for APIs you’d like to see tracked here. Or other features that game developers want that are missing from HTML5 specs? Please email us at support@playcanvas.com.

Note: caniuse.com is great resource for checking which features are available in which browsers. It was used as a source for many of the tables above.