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

Support volume prop audio player (49) #953

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

sieu-db
Copy link
Collaborator

@sieu-db sieu-db commented Oct 6, 2024

Important

Add volume control to AudioPlayer with a new volume prop, demonstrated in AudioPlayerExample.tsx.

  • Behavior:
    • Adds volume prop to AudioPlayer in AudioPlayerExample.tsx to demonstrate volume adjustment.
    • Sets default volume to 1.0 in HeadlessAudioPlayer.tsx.
    • Updates currentSound volume using setVolumeAsync in HeadlessAudioPlayer.tsx.
  • Props:
    • Adds volume to HeadlessAudioPlayerProps in AudioPlayerCommon.ts.

This description was created by Ellipsis for ef57dd8. It will automatically update as commits are pushed.

Copy link

linear bot commented Oct 6, 2024

@@ -32,6 +32,7 @@ const HeadlessAudioPlayer = React.forwardRef<
onPlaybackStatusUpdate: onPlaybackStatusUpdateProp,
onPlaybackFinish,
isLooping = false,
volume = 1.0,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding validation to ensure the volume prop is within the range of 0.0 to 1.0 to prevent unexpected behavior.

Copy link

github-actions bot commented Oct 6, 2024

Published version: @draftbit/ui@49.7.5-39f54a.2

@sieu-db sieu-db merged commit a38ea51 into 49 Oct 6, 2024
1 check passed
@sieu-db sieu-db deleted the sieu/p-5370-support-volume-prop-audio-player-49 branch October 6, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant