bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/audio/component.jsx

29 lines
539 B
React
Raw Normal View History

2017-03-28 04:40:44 +08:00
import React, { Component } from 'react';
2017-10-23 20:41:09 +08:00
import PropTypes from 'prop-types';
const propTypes = {
init: PropTypes.func.isRequired,
};
2017-03-28 04:40:44 +08:00
export default class Audio extends Component {
2017-10-23 20:41:09 +08:00
constructor(props) {
super(props);
this.init = props.init.bind(this);
}
componentDidMount() {
2017-10-23 20:41:09 +08:00
this.init();
2017-04-19 22:59:57 +08:00
}
2017-03-28 04:40:44 +08:00
render() {
2017-10-23 20:41:09 +08:00
return (
<audio id="remote-media" autoPlay="autoplay">
<track kind="captions" /> {/* These captions are brought to you by eslint */}
</audio>
);
2017-03-28 04:40:44 +08:00
}
}
2017-10-23 20:41:09 +08:00
Audio.propTypes = propTypes;