API Documentation for: 1.0.0
Show:

HTMLAudioTagPool Class

Defined in: HTMLAudioTagPool:40
Module: SoundJS

HTMLAudioTagPool is an object pool for HTMLAudio tag instances.

Item Index

Methods

Properties

Methods

get

(
  • src
)
static

Defined in get:81

Get an audio tag with the given source.

Parameters:

  • src String

    The source file used by the audio tag.

getDuration

(
  • src
)
Number static

Defined in getDuration:137

Gets the duration of the src audio in milliseconds

Parameters:

  • src String

    The source file used by the audio tag.

Returns:

Number:

Duration of src in milliseconds

remove

(
  • src
)
Boolean static

Defined in remove:121

Delete stored tag reference and return them to pool. Note that if the tag reference does not exist, this will fail.

Parameters:

  • src String

    The source for the tag

Returns:

Boolean:

If the TagPool was deleted.

set

(
  • src
  • tag
)
static

Defined in set:105

Return an audio tag to the pool.

Parameters:

  • src String

    The source file used by the audio tag.

  • tag HTMLElement

    Audio tag to set.

Properties

_tagPool

TagPool private static

Defined in _tagPool:62

An object pool for html audio tags

_tags

private static

Defined in _tags:53

A hash lookup of each base audio tag, indexed by the audio source.

_tagsUsed

private static

Defined in _tagsUsed:71

A hash lookup of if a base audio tag is available, indexed by the audio source