Skip to content

Commit c649714

Browse files
authored
fix: audio attachment reset to 0 issue and refinements (#2903)
* fix: issues with playing audio from starting * fix: issues with playing audio from starting and refine logic * fix: add native.ts change * refactor: extract audio play logic to a hook * refactor: extract audio play logic to a hook * fix: refactor the onProgress func * fix: check * fix: react memo logic * fix: improve audio attachment and progress bars * fix: improve audio attachment and progress bars * fix: expo audio player * fix: async audio progress experience * fix: async audio progress experience * fix: async audio progress experience * fix: file attachment group condition * fix: improve id passing to the fileuploadpreview renderItem
1 parent 059a420 commit c649714

File tree

12 files changed

+539
-356
lines changed

12 files changed

+539
-356
lines changed

package/native-package/src/optionalDependencies/Sound.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@ export const Sound = {
66
initializeSound: null,
77
// eslint-disable-next-line react/display-name
88
Player: AudioVideoPlayer
9-
? ({ onBuffer, onEnd, onLoad, onProgress, paused, rate, soundRef, style, uri }) => (
9+
? ({
10+
onBuffer,
11+
onEnd,
12+
onLoad,
13+
onLoadStart,
14+
onPlaybackStateChanged,
15+
onProgress,
16+
onSeek,
17+
paused,
18+
rate,
19+
soundRef,
20+
style,
21+
uri,
22+
}) => (
1023
<AudioVideoPlayer
1124
audioOnly={true}
1225
ignoreSilentSwitch={'ignore'}
@@ -16,10 +29,14 @@ export const Sound = {
1629
console.log(error);
1730
}}
1831
onLoad={onLoad}
32+
onLoadStart={onLoadStart}
33+
onPlaybackStateChanged={onPlaybackStateChanged}
1934
onProgress={onProgress}
35+
onSeek={onSeek}
2036
paused={paused}
2137
rate={rate}
2238
ref={soundRef}
39+
progressUpdateInterval={100}
2340
source={{
2441
uri,
2542
}}

0 commit comments

Comments
 (0)