Skip to content

Commit

Permalink
Fix: public 음원이 안 가져와져서 url 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KimCookieYa committed Dec 4, 2023
1 parent 5457156 commit d063094
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/LobbyBGMPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const MuteSpeakerIcon = styled.div`
}
`;

const lobbyAudio = new Audio("/mp3/menu_loop.mp3");
const lobbyAudio = new Audio("/client/mp3/menu_loop.mp3");
lobbyAudio.preload = "auto";

export default function LobbyBGMPlayer() {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function LoginPage() {
return (
<>
<VideoBackground autoPlay loop muted playsInline>
<source src="/back.mp4" type="video/mp4" />
<source src="/client/back.mp4" type="video/mp4" />
</VideoBackground>
<LoginPageWrapper>
<header>
Expand All @@ -64,7 +64,7 @@ export default function LoginPage() {
LOGIN
</StyledNavLink>
<img
src="/kakao_login_medium.png"
src="/client/kakao_login_medium.png"
onClick={requestLogin}
style={{ cursor: "pointer" }}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function MainPage() {
return (
<>
<VideoBackground autoPlay loop muted playsInline>
<source src="/back.mp4" type="video/mp4" />
<source src="/client/back.mp4" type="video/mp4" />
</VideoBackground>
<MainPageWrapper>
<MemoizedUserProfile
Expand Down
14 changes: 7 additions & 7 deletions src/utils/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ for (let rowIndex = 0; rowIndex < mp3List2.length; rowIndex++) {
const tempList: HTMLAudioElement[] = [];
for (let colIndex = 0; colIndex < mp3List2[0].length; colIndex++) {
const tempAudio = new Audio(
`/dpmaudio/dubstep_club_${mp3List2[rowIndex][colIndex]}.wav`,
`/client/dpmaudio/dubstep_club_${mp3List2[rowIndex][colIndex]}.wav`,
);
tempAudio.preload = "auto";
tempList.push(tempAudio);
}
audioList.push([...tempList]);
}

const btnAudio = new Audio("/mp3/warp1.mp3");
const btnAudio = new Audio("/client/mp3/warp1.mp3");
btnAudio.preload = "auto";

export function playBtnAudio() {
Expand All @@ -37,14 +37,14 @@ export function pauseBtnAudio() {
btnAudio.pause();
}

export const GameStartAudio = new Audio("/mp3/gamestart.mp3");
export const GameStartAudio = new Audio("/client/mp3/gamestart.mp3");
GameStartAudio.preload = "auto";
export const GameOverAudio = new Audio("/mp3/gameover.mp3");
export const GameOverAudio = new Audio("/client/mp3/gameover.mp3");
GameOverAudio.preload = "auto";
export const GameWinAudio = new Audio("/mp3/gamewin.mp3");
export const GameWinAudio = new Audio("/client/mp3/gamewin.mp3");
GameWinAudio.preload = "auto";

const GameBGMAudio = new Audio("/mp3/dubstep_drum_trap_loop.mp3");
const GameBGMAudio = new Audio("/client/mp3/dubstep_drum_trap_loop.mp3");
GameBGMAudio.preload = "auto";

export function playBGMAudio() {
Expand All @@ -57,7 +57,7 @@ export function pauseBGMAudio() {
GameBGMAudio.pause();
}

const HoverBtnAudio = new Audio("/mp3/jump02.mp3");
const HoverBtnAudio = new Audio("/client/mp3/jump02.mp3");
HoverBtnAudio.preload = "auto";
HoverBtnAudio.volume = 0.5;

Expand Down

0 comments on commit d063094

Please sign in to comment.