Skip to content

Support silence mode for video component#994

Merged
sieu-db merged 3 commits into50from
sieu/p-5865-add-silence-mode-prop-video-component
Feb 7, 2025
Merged

Support silence mode for video component#994
sieu-db merged 3 commits into50from
sieu/p-5865-add-silence-mode-prop-video-component

Conversation

@sieu-db
Copy link
Collaborator

@sieu-db sieu-db commented Feb 3, 2025

Important

Add playsInSilentModeIOS prop to VideoPlayer to support silent mode on iOS, with implementation in VideoPlayer.tsx.

  • Feature:
    • Add playsInSilentModeIOS prop to VideoPlayer in VideoPlayer.tsx to support silent mode on iOS.
    • Default value for playsInSilentModeIOS is false.
  • Implementation:
    • Use Audio.setAudioModeAsync in updateAudioMode to set playsInSilentModeIOS.
    • Call updateAudioMode in useEffect and onTogglePlayback in VideoPlayer.tsx.
  • Example:
    • Update video source and poster in VideoPlayerExample.tsx to new URIs.

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

@linear
Copy link

linear bot commented Feb 3, 2025

}
}, [isFullscreen, videoMediaObject]);

const updateAudioMode = React.useCallback(async () => {
Copy link

Choose a reason for hiding this comment

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

Consider using useEffect to update the audio mode when playsInSilentModeIOS changes rather than only on toggle playback. This ensures the audio mode is set on mount and when the prop updates.

@github-actions
Copy link

github-actions bot commented Feb 3, 2025

Published version: @draftbit/ui@50.8.5-7350f5.2

@github-actions
Copy link

github-actions bot commented Feb 3, 2025

Published version: @draftbit/ui@50.8.5-ac601e.2

@github-actions
Copy link

github-actions bot commented Feb 6, 2025

Published version: @draftbit/ui@50.8.5-08c65b.2

@sieu-db sieu-db merged commit 09433ed into 50 Feb 7, 2025
1 check passed
@sieu-db sieu-db deleted the sieu/p-5865-add-silence-mode-prop-video-component branch February 7, 2025 13:50
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