diff --git a/package-lock.json b/package-lock.json index eed4ea2..ea71299 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,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": { @@ -15785,6 +15786,25 @@ "node": ">= 10.0.0" } }, + "node_modules/unmute-ios-audio": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/unmute-ios-audio/-/unmute-ios-audio-3.3.0.tgz", + "integrity": "sha512-MmoCOrsS2gn3wLT2tT+hF56Q4V4kksIKn2LHrwAtX6umzQwQHDWSh1slMzH+0WuxTZ62s3w8/wsfIII1FQ7ACg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", diff --git a/package.json b/package.json index 43d9624..c77b278 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/components/app/app.tsx b/src/components/app/app.tsx index e398562..df72255 100644 --- a/src/components/app/app.tsx +++ b/src/components/app/app.tsx @@ -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'; @@ -53,6 +54,10 @@ export function App() { return () => document.removeEventListener('visibilitychange', onChange); }, []); + useEffect(() => { + unmuteAudio(); + }, []); + const allCategories = useMemo(() => { const favorites = [];