File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
package/src/components/MessageInput/hooks Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -88,13 +88,13 @@ export const useAudioController = () => {
8888 if ( progress === 0 ) await startVoicePlayer ( ) ;
8989 else {
9090 // For Native CLI
91- if ( Audio . resumePlayer ) await Audio . resumePlayer ( ) ;
91+ if ( Audio ? .resumePlayer ) await Audio . resumePlayer ( ) ;
9292 // For Expo CLI
9393 if ( soundRef . current ?. playAsync ) await soundRef . current . playAsync ( ) ;
9494 }
9595 } else {
9696 // For Native CLI
97- if ( Audio . pausePlayer ) await Audio . pausePlayer ( ) ;
97+ if ( Audio ? .pausePlayer ) await Audio . pausePlayer ( ) ;
9898 // For Expo CLI
9999 if ( soundRef . current ?. pauseAsync ) await soundRef . current . pauseAsync ( ) ;
100100 }
@@ -107,7 +107,7 @@ export const useAudioController = () => {
107107 const startVoicePlayer = async ( ) => {
108108 if ( ! recording ) return ;
109109 // For Native CLI
110- if ( Audio . startPlayer )
110+ if ( Audio ? .startPlayer )
111111 await Audio . startPlayer ( recording , { } , onVoicePlayerPlaybackStatusUpdate ) ;
112112 // For Expo CLI
113113 if ( recording && typeof recording !== 'string' ) {
@@ -133,7 +133,7 @@ export const useAudioController = () => {
133133 */
134134 const stopVoicePlayer = async ( ) => {
135135 // For Native CLI
136- if ( Audio . stopPlayer ) {
136+ if ( Audio ? .stopPlayer ) {
137137 await Audio . stopPlayer ( ) ;
138138 }
139139 // For Expo CLI
You can’t perform that action at this time.
0 commit comments