2017-03-27 23:45:24 +08:00
|
|
|
import React, { Component } from 'react';
|
2017-03-23 21:19:44 +08:00
|
|
|
import { createContainer } from 'meteor/react-meteor-data';
|
|
|
|
import AudioTest from './component';
|
|
|
|
|
|
|
|
class AudioTestContainer extends Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<AudioTest {...this.props}>
|
|
|
|
{this.props.children}
|
|
|
|
</AudioTest>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-16 23:37:17 +08:00
|
|
|
export default createContainer(function () {
|
2017-03-23 21:19:44 +08:00
|
|
|
return {
|
|
|
|
handlePlayAudioSample: () => {
|
|
|
|
const snd = new Audio('resources/sounds/audioSample.mp3');
|
|
|
|
snd.play();
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}, AudioTestContainer);
|