Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Constructors #566

Closed
SteveBeckerMSFT opened this issue Jul 21, 2015 · 6 comments
Closed

Event Constructors #566

SteveBeckerMSFT opened this issue Jul 21, 2015 · 6 comments
Assignees
Milestone

Comments

@SteveBeckerMSFT
Copy link

Should Web Audio event interfaces include constructors? This includes:

  • OfflineAudioCompletionEvent
  • AudioProcessingEvent
  • AudioWorkerNodeCreationEvent
  • AudioProcessEvent

This would enable JavaScript to construct and dispatch WebAudio events:

var eventObject = new AudioProcessingEvent(
    "audioprocess", 
    {  playbackTime: 1.25, inputBuffer: data  }
    );
eventListener.dispatchEvent(eventObject);
@hoch
Copy link
Member

hoch commented Jul 22, 2015

From my opinion, any of these events should not be allowed to be constructed by user.

  • OfflineAudioCompletionEvent: This should be dispatched only when the OAC finished the rendering task.
  • AudioProcessingEvent: ScriptProcessorNode is already being deprecated.
  • AudioWorker-related events: We can discuss about them after the draft spec is proposed, but I highly doubt that this can be constructed programmatically. Especially the AudioProcessEvent is driven by the pulling from the destination node.

@joeberkovitz joeberkovitz added the Needs Edits Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/ label Jul 23, 2015
@joeberkovitz joeberkovitz added this to the Web Audio V1 milestone Jul 23, 2015
@billhofmann
Copy link
Contributor

What is the decision here?

@hoch
Copy link
Member

hoch commented Aug 27, 2015

I thought we talked about allowing the construction of these events. @cwilso mentioned that the web spec generally allows the construction of the object unless it is known to be harmful. However, I don't recall that we have a firm decision on this.

I think we need to revisit/evaluate any harmful case caused by the construction of these events.

@billhofmann
Copy link
Contributor

This seems related to #250 - perhaps we should discuss in that context. Seems like we're saying in general that constructors are ok.

@billhofmann billhofmann added the Needs Discussion The issue needs more discussion before it can be fixed. label Dec 10, 2015
@joeberkovitz
Copy link
Contributor

We've decided that these constructors are OK since there's no visible harm they can cause.

@joeberkovitz joeberkovitz removed the Needs Discussion The issue needs more discussion before it can be fixed. label Feb 25, 2016
@joeberkovitz joeberkovitz self-assigned this Sep 23, 2016
@hoch
Copy link
Member

hoch commented Sep 23, 2016

These two events do not exist in the spec anymore.

  • AudioWorkerNodeCreationEvent
  • AudioProcessEvent

FWIW, the new AudioWorklet proposal does not introduce new special event. Other old events should be constructible.

@joeberkovitz joeberkovitz added In PR Review and removed Needs Edits Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/ labels Oct 28, 2016
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

No branches or pull requests

4 participants