use-sound
Unanswered
Bouvier des Flandres posted this in #help-forum
Bouvier des FlandresOP
I want to integrate use-sound to my nextjs 15 app and there's an error that says. What should be the configuration for this?
code:
import spinningSound from "@/public/sounds/spinning.mp3";
import useSound from "use-sound";
const [play, { stop }] = useSound(spinningSound, {
volume: 1,
});
play();
error:
Unknown module type
This module doesn't have an associated type. Use a known file extension, or register a loader for it.
code:
import spinningSound from "@/public/sounds/spinning.mp3";
import useSound from "use-sound";
const [play, { stop }] = useSound(spinningSound, {
volume: 1,
});
play();
error:
Unknown module type
This module doesn't have an associated type. Use a known file extension, or register a loader for it.
1 Reply
try
useSound("/sounds/spinning.mp3", ...)