API Documentation for: 1.0.6
Show:

AudioUtils Class

Defined in: AudioUtils:8
Namespace: cloudkid

A collection of utilities for detecting the availability of HTML5 audio

Item Index

Methods

Methods

_fileSupport

() Bool private

Defined in _fileSupport:60

Get the the internal cache support

Returns:

Bool:

canPlayURL

(
  • url
)
Bool static

Defined in canPlayURL:89

Determines playability of a URL based on audio support.

Parameters:

Returns:

Bool:

URL playability

getPlayableURL

(
  • url
)
String static

Defined in getPlayableURL:112

Get the url from the sprite resources array or single url

Parameters:

  • url

    The resources (i.e {url""}, {url}, or string url)

Returns:

String:

Result url

importSpriteMap

(
  • The
  • config
)
SwishSprite static

Defined in importSpriteMap:15

Create an SwishSprite object from config

Parameters:

  • The SwishSprite

    reference to the SwishSprite

  • config Object

    The JSON config created from autogenerated

Returns:

SwishSprite:

SwishSprite instance

supported

() Boolean static

Defined in supported:48

Check if HTML5 Audio is supported in any of the available formats. If returns false, we should disable sounds. Modified from modernizr

Returns:

Boolean:

If we can play HTML5 audio