Comments (6)
Making progress!
from useaudioplayer.
fork with some work in this direction from @joeyiny
https://github.com/joeyiny/useAudioPlayer/commits/main
from useaudioplayer.
@joeyiny nice! feel free to open up a PR if you'd like to contribute your enhancements. Also FYI v2 dropped today. You'll def want to rebase your fork off of the latest main. Let me know if you have any questions about the migration, but it shouldn't be too too different. The README has been updated with the latest information
from useaudioplayer.
@E-Kuerschner Oh nice, was actually planning on messaging you about v2! Definitely going to hop in first thing tomorrow hopefully.
from useaudioplayer.
Currently working approach is to exclude it from SSR with window presence check (using useAudioPlayer@v2)
const [hasWindow, setHasWindow] = useState(false);
useEffect(() => {
if (typeof window !== 'undefined') {
setHasWindow(true);
}
}, []);
................
{hasWindow && (
<TrackPlayer url={url} />
)}
................
const TrackPlayer = ({
audioUrl,
}: {
audioUrl: string;
}) => {
const {
load,
setVolume,
togglePlayPause,
playing,
getPosition,
duration,
seek,
} = useAudioPlayer();
from useaudioplayer.
any example with useGlobalAudioPlayer
? Also window presence check didn't work on me. I have issues with first load i guess. autoplay
, initialVolume
ex. don't work in my Next.js 14 project.
from useaudioplayer.
Related Issues (20)
- usePosition doesnt work anymore HOT 3
- starting with empty src loads infinitely HOT 2
- Download audio HOT 1
- `AudioLoadOptions` shape does not correspond Howler constructor options and missing some of them HOT 9
- isLoading boolean HOT 4
- HTML5 Audio pool exhausted, returning potentially locked audio object. Is this because of this library or not? HOT 1
- Adding `player` back — Howler Instance Reference HOT 4
- Error in the Readme, fade arg says second not ms HOT 2
- Finish playing before destroying the sound currently playing HOT 2
- Inconsistencies on lock screen controls when playing in background on iOS HOT 2
- Audio not changing when recording is different but link is same HOT 4
- useGlobalAudioPlayer and useAudioPlayer seems to mix up their states HOT 4
- How to adjust the audio playback progress ? HOT 1
- Upgrade Howler
- Refactor state management to decouple from Howler
- Refactor to use React.useSyncExternalStore
- playback speed sounds like a chipmunk HOT 1
- Audio playback stops when safari unfocused on ios HOT 1
- Host package on JSR
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from useaudioplayer.