Add sound

pull/27/head
ayshiff 2018-06-06 20:51:32 +02:00
parent 7149404ba2
commit b1754ce235
3 changed files with 2410 additions and 2386 deletions

4784
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,7 @@
"react-dom": "^16.3.2", "react-dom": "^16.3.2",
"react-modal": "^3.4.5", "react-modal": "^3.4.5",
"react-router-dom": "^4.2.2", "react-router-dom": "^4.2.2",
"react-scripts": "1.1.4" "react-scripts": "1.1.4",
"react-sound": "^1.2.0"
} }
} }

View File

@ -2,6 +2,8 @@ import React, { Component } from 'react';
import axios from 'axios'; import axios from 'axios';
import '../styles/App.css'; import '../styles/App.css';
import Modal from 'react-modal'; import Modal from 'react-modal';
import Sound from 'react-sound';
const customStyles = { const customStyles = {
content : { content : {
@ -121,6 +123,13 @@ class App extends Component {
return ( return (
<div className="App container"> <div className="App container">
<Sound
url=""
playStatus={Sound.status.PLAYING}
playFromPosition={0}
volume={55}
loop={true}
/>
<Modal <Modal
isOpen={this.state.modalIsOpen} isOpen={this.state.modalIsOpen}
onAfterOpen={this.afterOpenModal} onAfterOpen={this.afterOpenModal}