Repository URL to install this package:
|
Version:
1.3.0 ▾
|
'use strict';
import React from 'react';
import styles from './Media.css';
const Media = React.createClass({
componentWillReceiveProps(newProps) {
if(newProps.goToTime !== this.props.goToTime) {
this.refs.media.currentTime = newProps.goToTime;
this.refs.media.play();
}
},
render() {
return (
<div>
<audio controls
className={styles['audio-panel']}
ref='media'
src="files/PR3DNa.mp3"
onTimeUpdate={this.props.onTimeUpdate} />
</div>
);
}
});
export default Media;