diff --git a/client/src/assets/sounds/game-bg-music.mp3 b/client/src/assets/sounds/game-bg-music.mp3 new file mode 100644 index 0000000..4da0c4b Binary files /dev/null and b/client/src/assets/sounds/game-bg-music.mp3 differ diff --git a/client/src/components/Game.js b/client/src/components/Game.js index c949999..94afd9e 100644 --- a/client/src/components/Game.js +++ b/client/src/components/Game.js @@ -6,6 +6,7 @@ import queryString from 'query-string' import Spinner from './Spinner' import useSound from 'use-sound' +import bgMusic from '../assets/sounds/game-bg-music.mp3' import unoSound from '../assets/sounds/uno-sound.mp3' import shufflingSound from '../assets/sounds/shuffling-cards-1.mp3' import skipCardSound from '../assets/sounds/skip-sound.mp3' @@ -70,8 +71,9 @@ const Game = (props) => { const [isUnoButtonPressed, setUnoButtonPressed] = useState(false) const [isSoundMuted, setSoundMuted] = useState(false) - const [isMusicMuted, setMusicMuted] = useState(false) + const [isMusicMuted, setMusicMuted] = useState(true) + const [playBBgMusic, { pause }] = useSound(bgMusic, { loop: true }) const [playUnoSound] = useSound(unoSound) const [playShufflingSound] = useSound(shufflingSound) const [playSkipCardSound] = useSound(skipCardSound) @@ -1217,8 +1219,14 @@ const Game = (props) => {

Game Code: {room}

- - + + @@ -1366,7 +1374,7 @@ const Game = (props) => { :

Room full

}
- + ) } diff --git a/client/src/components/Homepage.js b/client/src/components/Homepage.js index cba032a..e6e9dee 100644 --- a/client/src/components/Homepage.js +++ b/client/src/components/Homepage.js @@ -12,11 +12,11 @@ const Homepage = () => {
setRoomCode(event.target.value)} /> - +

OR

- +