Skip to content

OfflineAudioContext: closes and fires a statechange event when rendering is done #2687

Description

@gabrielsanbrito

Describe the issue

After OfflineAudioContext.startRendering() finishes and the returned promise resolves, the context transitions to the "closed" state and a statechange is fired. Apparently, all the major browser engines implement this behavior. I personally verified Blink and Gecko, but WebKit also seems to be implementing something similar.

This behavior is not in the specification. The specification only says here that:

  1. Once the rendering is complete, queue a media element task to execute the following steps:
    1. Resolve the promise created by startRendering() with [[rendered buffer]].
    2. Queue a media element task to fire an event named complete at the OfflineAudioContext using OfflineAudioCompletionEvent whose renderedBuffer property is set to [[rendered buffer]].

Where Is It

OfflineAudioContext.startRendering()

Additional Information

You can use this demo page to test it out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DiscussionThe issue needs more discussion before it can be fixed.category: enhancementSubstantive changes that do not add new features. https://www.w3.org/policies/process/#class-3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions