Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ar(fix) DPCP-44: Audio Player disable autoPlay. #12

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/molecules/02_AudioPlayer/AudioPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
tracks?: IAudioTrack[];
onPlayTrack?: () => void;
nativeControls?: boolean;
autoPlay?: boolean;
prompt?: string;
theme?: 'light' | 'dark';
}
Expand All @@ -60,6 +61,7 @@
tracks = DEFAULT_TRACKS,
onPlayTrack = () => {},
nativeControls = false,
autoPlay = false,
prompt = 'Rotation portals',
theme = 'light',
}: IAudioPlayer) {
Expand Down Expand Up @@ -117,7 +119,7 @@
};
}
return () => {};
}, [status]);

Check warning on line 122 in src/molecules/02_AudioPlayer/AudioPlayer.tsx

View workflow job for this annotation

GitHub Actions / oneiros::pr_checks::build

React Hook useEffect has missing dependencies: 'handleStatus' and 'prompt'. Either include them or remove the dependency array

Check warning on line 122 in src/molecules/02_AudioPlayer/AudioPlayer.tsx

View workflow job for this annotation

GitHub Actions / oneiros::pr_checks::lint

React Hook useEffect has missing dependencies: 'handleStatus' and 'prompt'. Either include them or remove the dependency array

return (
<div id={id} className={gridStyles}>
Expand All @@ -134,7 +136,7 @@
src={tracks[0].url}
controls={nativeControls}
ref={audioElement}
autoPlay
autoPlay={autoPlay}
preload="none"
>
{tracks.map((file) => (
Expand Down
Loading