2017-03-02 09:03:02 +08:00
|
|
|
import React from 'react';
|
|
|
|
import Button from '/imports/ui/components/button/component';
|
2017-03-27 23:45:24 +08:00
|
|
|
import styles from './styles.scss';
|
2017-03-02 09:03:02 +08:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
|
|
|
|
|
|
class AudioTest extends React.Component {
|
|
|
|
constructor(props) {
|
2017-03-23 21:19:44 +08:00
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const {
|
|
|
|
intl,
|
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Button className={styles.testAudioBtn}
|
|
|
|
label={intl.formatMessage(intlMessages.playSoundLabel)}
|
|
|
|
icon={'unmute'}
|
2017-03-24 22:46:46 +08:00
|
|
|
size={'sm'}
|
2017-03-23 21:19:44 +08:00
|
|
|
color={'primary'}
|
|
|
|
onClick={this.props.handlePlayAudioSample}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const intlMessages = defineMessages({
|
|
|
|
playSoundLabel: {
|
|
|
|
id: 'app.audio.playSoundLabel',
|
2017-04-19 23:22:48 +08:00
|
|
|
description: 'Play sound button label',
|
2017-03-23 21:19:44 +08:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default injectIntl(AudioTest);
|