Skip to content

GUAC-1517: Maintain singleton instance of AudioContext. - #3

Merged
asfgit merged 1 commit into
apache:masterfrom
mike-jumper:excessive-audiocontext
Mar 31, 2016
Merged

GUAC-1517: Maintain singleton instance of AudioContext.#3
asfgit merged 1 commit into
apache:masterfrom
mike-jumper:excessive-audiocontext

Conversation

@mike-jumper

Copy link
Copy Markdown
Contributor

A page only ever needs one instance of AudioContext. If too many AudioContext instances are created, the browser will deny further creation, resulting in errors when Guacamole assumes such creation must succeed.

This change adds a new Guacamole.AudioContextFactory namespace which contains a lazily-created singleton instance of AudioContext. The instance is maintained and returned by getAudioContext(), and can be overridden be manually assigning the singleton property (if you already have your own AudioContext, for example).

@asfgit
asfgit merged commit 93783cf into apache:master Mar 31, 2016
@mike-jumper
mike-jumper deleted the excessive-audiocontext branch March 31, 2016 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants