Skip to content

Commit

Permalink
fix: check
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Jan 24, 2025
1 parent 58b95f2 commit df89001
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package/src/components/Attachment/AudioAttachment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useAudioPlayer } from '../../hooks/useAudioPlayer';
import { Audio, Pause, Play } from '../../icons';
import {
PlaybackStatus,
SDK,
Sound,
SoundReturnType,
VideoPayloadData,
Expand Down Expand Up @@ -52,7 +53,7 @@ export const AudioAttachment = (props: AudioAttachmentProps) => {
testID,
} = props;
const { changeAudioSpeed, pauseAudio, playAudio, seekAudio } = useAudioPlayer({ soundRef });
const isExpoCLI = !Sound.Player && Sound.initializeSound;
const isExpoCLI = SDK === 'stream-chat-expo';

/** This is for Native CLI Apps */
const handleLoad = (payload: VideoPayloadData) => {
Expand Down
4 changes: 2 additions & 2 deletions package/src/hooks/useAudioPlayer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Sound, SoundReturnType } from '../native';
import { SDK, SoundReturnType } from '../native';

export type UseSoundPlayerProps = {
soundRef: React.MutableRefObject<SoundReturnType | null>;
Expand All @@ -11,7 +11,7 @@ export type UseSoundPlayerProps = {
export const useAudioPlayer = (props: UseSoundPlayerProps) => {
const { soundRef } = props;

const isExpoCLI = !Sound.Player && Sound.initializeSound;
const isExpoCLI = SDK === 'stream-chat-expo';

const playAudio = async () => {
if (isExpoCLI) {
Expand Down

0 comments on commit df89001

Please sign in to comment.