Skip to content

Unable to set audio tag attributes #1124

Closed
@sgrove

Description

@sgrove

This is a limitation of the HTML5/javascript API for <audio> tags from what I can see, but maybe React can work around it (like it does to normalize <textarea> tags, etc.)

I would like to be able to do something like this pseudo-code:

var myAudioTag = React.createClass({
    render: function() {
          return <audio src={this.props.src} volume={this.props.volume} muted={this.props.muted}>
    }
});

And have React 1.) pick up on the muted attribute change, then 2.) take care of invoking the javascript interface targetAudioTag.muted = true/false. Same for attributes paused, etc.

Metadata

Metadata

Assignees

No one assigned

    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