Skip to content

Commit

Permalink
fix: add unmute for iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
remvze committed Jan 28, 2024
1 parent 1f63534 commit e422b52
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"react-dom": "^18.2.0",
"react-icons": "4.11.0",
"react-wrap-balancer": "1.1.0",
"unmute-ios-audio": "3.3.0",
"zustand": "4.4.3"
},
"devDependencies": {
Expand Down
5 changes: 5 additions & 0 deletions src/components/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useMemo, useEffect } from 'react';
import { useShallow } from 'zustand/react/shallow';
import { BiSolidHeart } from 'react-icons/bi/index';
import { Howler } from 'howler';
import unmuteAudio from 'unmute-ios-audio';

import { useSoundStore } from '@/store';

Expand Down Expand Up @@ -53,6 +54,10 @@ export function App() {
return () => document.removeEventListener('visibilitychange', onChange);
}, []);

useEffect(() => {
unmuteAudio();
}, []);

const allCategories = useMemo(() => {
const favorites = [];

Expand Down

0 comments on commit e422b52

Please sign in to comment.