Skip to content

Commit a2b8d2a

Browse files
Merge pull request #47 from SimformSolutionsPvtLtd/fix/UNT-T26476_wrong_duration_calulation_and_gesture_error
fix(UNT-T26476): wrong duration calculation and gesture error
2 parents 83b2097 + 844e8ff commit a2b8d2a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

android/src/main/java/com/audiowaveform/AudioPlayer.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class AudioPlayer(
2727

2828
fun preparePlayer(path: String?, volume: Int?, frequency: UpdateFrequency, promise: Promise) {
2929
if (path != null) {
30+
isPlayerPrepared = false
3031
updateFrequency = frequency
3132
val uri = Uri.parse(path)
3233
val mediaItem = MediaItem.fromUri(uri)

src/components/Waveform/Waveform.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ export const Waveform = forwardRef<IWaveformRef, IWaveform>((props, ref) => {
4848
scrubColor,
4949
onPlayerStateChange,
5050
onRecorderStateChange,
51-
onPanStateChange,
51+
onPanStateChange = () => {},
5252
onError,
53-
onCurrentProgressChange,
53+
onCurrentProgressChange = () => {},
5454
candleHeightScale = 3,
5555
onChangeWaveformLoadState,
5656
} = props as StaticWaveform & LiveWaveform;

0 commit comments

Comments
 (0)