HTML5 Game - Audio Audio functions

Introduction

Browsers have several built-in standard audio functions that return information or cause an action with audio file or player.

Function
Parameter
Return
What It Does
canPlay
Type()


File MIME
type


maybe,
probably,
""

Determines whether
a given type of audio
file is supported by the
browser
load()


none


none


Specifies that the audio
start playing as soon as
it's ready
pause()
none
none
Pauses the playback
play()

none

none

Starts playing the audio
file

Related Topic