Skip to content

Support for media events #2090

Closed
Closed
@yocontra

Description

@yocontra

Currently no media events are supported, which makes working with audio or video tags in react a pain in the ass

componentDidMount: function () {
    var audioElement = this.refs.audioObject.getDOMNode();
    audioElement.addEventListener('progress', this.updateProgress);
    audioElement.addEventListener('timeupdate', this.updateProgress);
    audioElement.addEventListener('ended', this.handleMediaEnd);
},
componentWillUnmount: function () {
    var audioElement = this.refs.audioObject.getDOMNode();
    audioElement.removeEventListener('progress', this.updateProgress);
    audioElement.removeEventListener('timeupdate', this.updateProgress);
    audioElement.removeEventListener('ended', this.handleMediaEnd);
}

There are also still many missing attributes for audio and video tags. I find it strange that these tags are completely unsupported - they should probably be removed from the list in the documentation to reduce confusion until they are properly supported.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions