Skip to content

Expose whether AudioBufferSourceNode.start() succeeded #836

@mounirlamouri

Description

@mounirlamouri

/CC @rtoy @padenot @jernoble

As far as I can tell, AudioBufferSourceNode.start() is a no-op on Safari iOS unless the call came from a user gesture. Chrome is considering to do the same in order to have more consistency with regards to autoplay behaviour on mobile. However, the start() method doesn't expose if the call was successful which makes me uncomfortable doing this change.

Would it make sense to have a pattern similar to HTMLMediaElement.play() for AudioBufferSourceNode and return a Promise that rejects if the playback isn't allowed and fulfil when the playback starts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions