react-native-waveform-player 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/AudioWaveform.podspec +29 -0
  2. package/LICENSE +20 -0
  3. package/README.md +296 -0
  4. package/android/build.gradle +67 -0
  5. package/android/src/main/AndroidManifest.xml +3 -0
  6. package/android/src/main/java/com/audiowaveform/AudioPlayerEngine.kt +353 -0
  7. package/android/src/main/java/com/audiowaveform/AudioWaveformEvent.kt +22 -0
  8. package/android/src/main/java/com/audiowaveform/AudioWaveformPackage.kt +17 -0
  9. package/android/src/main/java/com/audiowaveform/AudioWaveformView.kt +715 -0
  10. package/android/src/main/java/com/audiowaveform/AudioWaveformViewManager.kt +234 -0
  11. package/android/src/main/java/com/audiowaveform/PlayPauseButton.kt +106 -0
  12. package/android/src/main/java/com/audiowaveform/SpeedPillView.kt +70 -0
  13. package/android/src/main/java/com/audiowaveform/WaveformBarsView.kt +358 -0
  14. package/android/src/main/java/com/audiowaveform/WaveformDecoder.kt +240 -0
  15. package/android/src/main/res/drawable/pause_fill.xml +15 -0
  16. package/android/src/main/res/drawable/play_fill.xml +15 -0
  17. package/ios/AudioPlayerEngine.swift +281 -0
  18. package/ios/AudioWaveformView.h +14 -0
  19. package/ios/AudioWaveformView.mm +307 -0
  20. package/ios/AudioWaveformViewImpl.swift +835 -0
  21. package/ios/PlayPauseButton.swift +118 -0
  22. package/ios/SpeedPillView.swift +70 -0
  23. package/ios/WaveformBarsView.swift +327 -0
  24. package/ios/WaveformDecoder.swift +332 -0
  25. package/lib/module/AudioWaveformView.js +8 -0
  26. package/lib/module/AudioWaveformView.js.map +1 -0
  27. package/lib/module/AudioWaveformView.native.js +79 -0
  28. package/lib/module/AudioWaveformView.native.js.map +1 -0
  29. package/lib/module/AudioWaveformViewNativeComponent.ts +95 -0
  30. package/lib/module/index.js +4 -0
  31. package/lib/module/index.js.map +1 -0
  32. package/lib/module/package.json +1 -0
  33. package/lib/typescript/package.json +1 -0
  34. package/lib/typescript/src/AudioWaveformView.d.ts +233 -0
  35. package/lib/typescript/src/AudioWaveformView.d.ts.map +1 -0
  36. package/lib/typescript/src/AudioWaveformView.native.d.ts +335 -0
  37. package/lib/typescript/src/AudioWaveformView.native.d.ts.map +1 -0
  38. package/lib/typescript/src/AudioWaveformViewNativeComponent.d.ts +71 -0
  39. package/lib/typescript/src/AudioWaveformViewNativeComponent.d.ts.map +1 -0
  40. package/lib/typescript/src/index.d.ts +3 -0
  41. package/lib/typescript/src/index.d.ts.map +1 -0
  42. package/package.json +138 -7
  43. package/src/AudioWaveformView.native.tsx +281 -0
  44. package/src/AudioWaveformView.tsx +96 -0
  45. package/src/AudioWaveformViewNativeComponent.ts +95 -0
  46. package/src/index.tsx +13 -0
@@ -0,0 +1,233 @@
1
+ import type { ViewProps, ColorValue } from 'react-native';
2
+ export type AudioWaveformPlayerState = 'idle' | 'loading' | 'ready' | 'ended' | 'error';
3
+ export type AudioWaveformTimeMode = 'count-up' | 'count-down';
4
+ export type AudioWaveformSource = {
5
+ uri: string;
6
+ };
7
+ export type AudioWaveformPlayerStateEvent = {
8
+ state: AudioWaveformPlayerState;
9
+ isPlaying: boolean;
10
+ speed: number;
11
+ error?: string;
12
+ };
13
+ export type AudioWaveformTimeUpdateEvent = {
14
+ currentTimeMs: number;
15
+ durationMs: number;
16
+ };
17
+ export type AudioWaveformSeekEvent = {
18
+ positionMs: number;
19
+ };
20
+ export type AudioWaveformLoadEvent = {
21
+ durationMs: number;
22
+ };
23
+ export type AudioWaveformLoadErrorEvent = {
24
+ message: string;
25
+ };
26
+ export type AudioWaveformViewProps = Omit<ViewProps, 'children'> & {
27
+ source: AudioWaveformSource;
28
+ samples?: ReadonlyArray<number>;
29
+ playedBarColor?: ColorValue;
30
+ unplayedBarColor?: ColorValue;
31
+ barWidth?: number;
32
+ barGap?: number;
33
+ barRadius?: number;
34
+ barCount?: number;
35
+ containerBackgroundColor?: ColorValue;
36
+ containerBorderRadius?: number;
37
+ showBackground?: boolean;
38
+ showPlayButton?: boolean;
39
+ playButtonColor?: ColorValue;
40
+ showTime?: boolean;
41
+ timeColor?: ColorValue;
42
+ timeMode?: AudioWaveformTimeMode;
43
+ showSpeedControl?: boolean;
44
+ speedColor?: ColorValue;
45
+ speedBackgroundColor?: ColorValue;
46
+ speeds?: ReadonlyArray<number>;
47
+ defaultSpeed?: number;
48
+ autoPlay?: boolean;
49
+ initialPositionMs?: number;
50
+ loop?: boolean;
51
+ playInBackground?: boolean;
52
+ pauseUiUpdatesInBackground?: boolean;
53
+ playing?: boolean;
54
+ speed?: number;
55
+ onLoad?: (event: AudioWaveformLoadEvent) => void;
56
+ onLoadError?: (event: AudioWaveformLoadErrorEvent) => void;
57
+ onPlayerStateChange?: (event: AudioWaveformPlayerStateEvent) => void;
58
+ onTimeUpdate?: (event: AudioWaveformTimeUpdateEvent) => void;
59
+ onSeek?: (event: AudioWaveformSeekEvent) => void;
60
+ onEnd?: () => void;
61
+ };
62
+ export type AudioWaveformViewRef = {
63
+ play: () => void;
64
+ pause: () => void;
65
+ toggle: () => void;
66
+ seekTo: (positionMs: number) => void;
67
+ setSpeed: (speed: number) => void;
68
+ };
69
+ export declare const AudioWaveformView: import("react").ForwardRefExoticComponent<Omit<Readonly<Omit<Readonly<{
70
+ onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
71
+ onAccessibilityTap?: (() => unknown) | undefined;
72
+ onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
73
+ onMagicTap?: (() => unknown) | undefined;
74
+ onAccessibilityEscape?: (() => unknown) | undefined;
75
+ }>, "onMoveShouldSetResponder" | "onMoveShouldSetResponderCapture" | "onResponderGrant" | "onResponderMove" | "onResponderReject" | "onResponderRelease" | "onResponderStart" | "onResponderEnd" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "onStartShouldSetResponderCapture" | "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
76
+ onMoveShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
77
+ onMoveShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
78
+ onResponderGrant?: ((e: import("react-native").GestureResponderEvent) => void | boolean) | undefined;
79
+ onResponderMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
80
+ onResponderReject?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
81
+ onResponderRelease?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
82
+ onResponderStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
83
+ onResponderEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
84
+ onResponderTerminate?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
85
+ onResponderTerminationRequest?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
86
+ onStartShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
87
+ onStartShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
88
+ }>, "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
89
+ onMouseEnter?: ((event: import("react-native").MouseEvent) => void) | undefined;
90
+ onMouseLeave?: ((event: import("react-native").MouseEvent) => void) | undefined;
91
+ }>, "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
92
+ onClick?: ((event: import("react-native").PointerEvent) => void) | undefined;
93
+ onClickCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
94
+ onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
95
+ onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
96
+ onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
97
+ onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
98
+ onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
99
+ onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
100
+ onPointerCancel?: ((e: import("react-native").PointerEvent) => void) | undefined;
101
+ onPointerCancelCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
102
+ onPointerDown?: ((e: import("react-native").PointerEvent) => void) | undefined;
103
+ onPointerDownCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
104
+ onPointerUp?: ((e: import("react-native").PointerEvent) => void) | undefined;
105
+ onPointerUpCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
106
+ onPointerOver?: ((e: import("react-native").PointerEvent) => void) | undefined;
107
+ onPointerOverCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
108
+ onPointerOut?: ((e: import("react-native").PointerEvent) => void) | undefined;
109
+ onPointerOutCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
110
+ onGotPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
111
+ onGotPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
112
+ onLostPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
113
+ onLostPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
114
+ }>, "onClick" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
115
+ onBlur?: ((event: import("react-native").BlurEvent) => void) | undefined;
116
+ onBlurCapture?: ((event: import("react-native").BlurEvent) => void) | undefined;
117
+ onFocus?: ((event: import("react-native").FocusEvent) => void) | undefined;
118
+ onFocusCapture?: ((event: import("react-native").FocusEvent) => void) | undefined;
119
+ }>, "onClick" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
120
+ onKeyDown?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
121
+ onKeyDownCapture?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
122
+ onKeyUp?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
123
+ onKeyUpCapture?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
124
+ }>, "onClick" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
125
+ onTouchCancel?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
126
+ onTouchCancelCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
127
+ onTouchEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
128
+ onTouchEndCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
129
+ onTouchMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
130
+ onTouchMoveCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
131
+ onTouchStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
132
+ onTouchStartCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
133
+ }>, "onClick" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
134
+ nativeBackgroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
135
+ nativeForegroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
136
+ renderToHardwareTextureAndroid?: boolean | undefined;
137
+ hasTVPreferredFocus?: boolean | undefined;
138
+ nextFocusDown?: number | undefined;
139
+ nextFocusForward?: number | undefined;
140
+ nextFocusLeft?: number | undefined;
141
+ nextFocusRight?: number | undefined;
142
+ nextFocusUp?: number | undefined;
143
+ focusable?: boolean | undefined;
144
+ tabIndex?: 0 | -1;
145
+ onClick?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
146
+ }>, "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
147
+ shouldRasterizeIOS?: boolean | undefined;
148
+ }>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<Omit<Readonly<{
149
+ accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
150
+ "aria-labelledby"?: string | undefined;
151
+ accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
152
+ "aria-live"?: ("polite" | "assertive" | "off") | undefined;
153
+ importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
154
+ screenReaderFocusable?: boolean;
155
+ }>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & Omit<Readonly<{
156
+ accessibilityIgnoresInvertColors?: boolean | undefined;
157
+ accessibilityViewIsModal?: boolean | undefined;
158
+ accessibilityShowsLargeContentViewer?: boolean | undefined;
159
+ accessibilityLargeContentTitle?: string | undefined;
160
+ "aria-modal"?: boolean | undefined;
161
+ accessibilityElementsHidden?: boolean | undefined;
162
+ accessibilityLanguage?: string | undefined;
163
+ accessibilityRespondsToUserInteraction?: boolean | undefined;
164
+ }>, "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & {
165
+ accessible?: boolean | undefined;
166
+ accessibilityLabel?: string | undefined;
167
+ accessibilityHint?: string | undefined;
168
+ "aria-label"?: string | undefined;
169
+ accessibilityRole?: import("react-native").AccessibilityRole | undefined;
170
+ role?: import("react-native").Role | undefined;
171
+ accessibilityState?: import("react-native").AccessibilityState | undefined;
172
+ accessibilityValue?: import("react-native").AccessibilityValue | undefined;
173
+ "aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
174
+ "aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
175
+ "aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
176
+ "aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
177
+ accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
178
+ "aria-busy"?: boolean | undefined;
179
+ "aria-checked"?: (boolean | undefined) | "mixed";
180
+ "aria-disabled"?: boolean | undefined;
181
+ "aria-expanded"?: boolean | undefined;
182
+ "aria-selected"?: boolean | undefined;
183
+ "aria-hidden"?: boolean | undefined;
184
+ }>, "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
185
+ children?: React.ReactNode;
186
+ style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp | undefined;
187
+ collapsable?: boolean | undefined;
188
+ collapsableChildren?: boolean | undefined;
189
+ id?: string;
190
+ testID?: string | undefined;
191
+ nativeID?: string | undefined;
192
+ needsOffscreenAlphaCompositing?: boolean | undefined;
193
+ hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/EdgeInsetsPropType").EdgeInsetsOrSizeProp | undefined;
194
+ pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
195
+ removeClippedSubviews?: boolean | undefined;
196
+ experimental_accessibilityOrder?: Array<string> | undefined;
197
+ }>, never>>, "children"> & {
198
+ source: AudioWaveformSource;
199
+ samples?: ReadonlyArray<number>;
200
+ playedBarColor?: ColorValue;
201
+ unplayedBarColor?: ColorValue;
202
+ barWidth?: number;
203
+ barGap?: number;
204
+ barRadius?: number;
205
+ barCount?: number;
206
+ containerBackgroundColor?: ColorValue;
207
+ containerBorderRadius?: number;
208
+ showBackground?: boolean;
209
+ showPlayButton?: boolean;
210
+ playButtonColor?: ColorValue;
211
+ showTime?: boolean;
212
+ timeColor?: ColorValue;
213
+ timeMode?: AudioWaveformTimeMode;
214
+ showSpeedControl?: boolean;
215
+ speedColor?: ColorValue;
216
+ speedBackgroundColor?: ColorValue;
217
+ speeds?: ReadonlyArray<number>;
218
+ defaultSpeed?: number;
219
+ autoPlay?: boolean;
220
+ initialPositionMs?: number;
221
+ loop?: boolean;
222
+ playInBackground?: boolean;
223
+ pauseUiUpdatesInBackground?: boolean;
224
+ playing?: boolean;
225
+ speed?: number;
226
+ onLoad?: (event: AudioWaveformLoadEvent) => void;
227
+ onLoadError?: (event: AudioWaveformLoadErrorEvent) => void;
228
+ onPlayerStateChange?: (event: AudioWaveformPlayerStateEvent) => void;
229
+ onTimeUpdate?: (event: AudioWaveformTimeUpdateEvent) => void;
230
+ onSeek?: (event: AudioWaveformSeekEvent) => void;
231
+ onEnd?: () => void;
232
+ } & import("react").RefAttributes<AudioWaveformViewRef>>;
233
+ //# sourceMappingURL=AudioWaveformView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioWaveformView.d.ts","sourceRoot":"","sources":["../../../src/AudioWaveformView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UA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