Skip to content

Feature request: Play audio with download support #22

@johnhtodd

Description

@johnhtodd

General notes:

  • sound events should be ignored in any counts
  • it is possible for multiple sounds to be played over each other if timing is not managed
  • a new option of "mute all sounds" should be available in the configuration menu/URL specification with obvious effect
  • what formats should be supported? gsm? wav? mp3? aif? others? I have no idea what standard codecs come included in browsers these days. I'd suggest that anything that can be digested without loading other libraries should be supported.
  • does object caching automatically work here? Is a sound file requested every time it's referenced or can it be cached during the lifespan of a GoW window?

Introduces three new objects/concepts:

  • sound-link objects that can be downloaded from remote servers. sound-link objects have a "volume" specifier which regulates how loudly they are played (1-10, default is 10) File must complete download before playback.
  • sound-pause, which is (milliseconds) a delay in between playback of files in a sound-set. No effect if not used in a sound-set.
  • sound-set - an array of sound-links or sound-pause objects. All files are downloaded before the sound-set starts to play, in order to prevent choppy playback. If a file fails to download, it is skipped during playback of any other files in the sound-set. Failed files will cause the playback to be significantly delayed.

Simple single sound file:

  {
    "type": "sound-link",
    "downloaded_object_url": "http://www.loligo.com/asterisk/sounds/AIF/warning.aif",
    "volume": 10
  }

More complex sound-set:

{
  "sound-set": [
    {
        "type": "sound-link",
        "downloaded_object_url": "http://www.loligo.com/asterisk/sounds/AIF/warning.aif",
        "volume": 10  
    },
    {
        "type": "sound-pause",
        "sound-pause-milliseconds": "100"
    },
    {
        "type": "sound-link",
        "downloaded_object_url": "http://www.loligo.com/asterisk/sounds/AIF/maximum.aif",
        "volume": 10  
    }
 ]
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions