This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Open
Conversation
daviddahl
reviewed
Nov 5, 2018
|
|
||
| addSound (name, src) { | ||
| const newSound = {} | ||
| const soundElement = document.createElement('audio') |
Contributor
There was a problem hiding this comment.
One thing to note - what if this is a node.js app consuming the API library? What does this look like where there is no document object?
Contributor
Author
There was a problem hiding this comment.
Let me do some digging
Contributor
Author
There was a problem hiding this comment.
Im thinking the expected behavior for now is to throw an error and let the user know that node env are not supported.
Contributor
There was a problem hiding this comment.
or... find something like https://www.npmjs.com/package/play - which is pretty old but still has some 270 weekly downloads
edit
See: https://www.npmjs.com/package/play-sound
daviddahl
reviewed
Nov 5, 2018
| @@ -0,0 +1,30 @@ | |||
| module.exports = class AudioMachine { | |||
Contributor
There was a problem hiding this comment.
filename should be audio-machine.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds feature for keeping sounds and playing them.
Adds a sound .wav for when peers join.