-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from SWM-FIRE/FIRE-411-방에-접속하면-해당하는-화이트-노이즈가-나온다
Fire 411 방에 접속하면 해당하는 화이트 노이즈가 나온다
- Loading branch information
Showing
9 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import campingOST from '../../../assets/sound/camping.mp3'; | ||
import cosmosOST from '../../../assets/sound/cosmos.mp3'; | ||
import fireOST from '../../../assets/sound/fire.mp3'; | ||
import oceanOST from '../../../assets/sound/ocean.mp3'; | ||
import travelOST from '../../../assets/sound/travel.mp3'; | ||
|
||
export default function ThemeSound({ theme, volumeRef }) { | ||
console.log('sound theme', theme); | ||
|
||
let myTheme; | ||
switch (theme) { | ||
case 'fire': | ||
myTheme = fireOST; | ||
break; | ||
case 'ocean': | ||
myTheme = oceanOST; | ||
break; | ||
case 'camping': | ||
myTheme = campingOST; | ||
break; | ||
case 'cosmos': | ||
myTheme = cosmosOST; | ||
break; | ||
case 'travel': | ||
myTheme = travelOST; | ||
break; | ||
default: | ||
myTheme = fireOST; | ||
break; | ||
} | ||
|
||
return ( | ||
<audio ref={volumeRef} src={myTheme} autoPlay loop> | ||
<track kind="captions" /> | ||
</audio> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ declare module '*.svg' { | |
export default src; | ||
} | ||
declare module '*.gif'; | ||
declare module '*.mp3'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters