@wavv/ui 2.4.15-alpha.4 → 2.4.15

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.
@@ -46,8 +46,6 @@ type AudioProps = {
46
46
  playedColor?: string;
47
47
  /** Color for unplayed portion of waveform */
48
48
  unplayedColor?: string;
49
- /** Force prefetch into blob for remote URLs to fix seeking (use when server range support is unreliable) */
50
- forceBlobForSeeking?: boolean;
51
49
  };
52
50
  ref?: React.Ref<AudioRef>;
53
51
  onPlay?: (event: ChangeEvent<HTMLAudioElement>) => void;
@@ -23,7 +23,7 @@ const Audio = ({ src, title, width, infoPosition, centerAlignContent, small, tin
23
23
  const END_EPSILON_SECONDS = 0.75;
24
24
  const SEEK_TOLERANCE_SECONDS = 0.5;
25
25
  const MAX_SEEK_VERIFY_RETRIES = 3;
26
- const { height = 30, showHoverTime = false, playedColor, unplayedColor, forceBlobForSeeking = false } = 'object' == typeof waveform ? waveform : {};
26
+ const { height = 30, showHoverTime = false, playedColor, unplayedColor } = 'object' == typeof waveform ? waveform : {};
27
27
  const play = ()=>{
28
28
  const { current: audio } = audioRef;
29
29
  if (audio) audio.play().catch(()=>{
@@ -119,8 +119,7 @@ const Audio = ({ src, title, width, infoPosition, centerAlignContent, small, tin
119
119
  });
120
120
  const buf = await resp.arrayBuffer();
121
121
  if (cancelled) return;
122
- const useBlob = forceBlobForSeeking || 'bytes' !== resp.headers.get('accept-ranges');
123
- if (useBlob) {
122
+ if ('bytes' !== resp.headers.get('accept-ranges')) {
124
123
  try {
125
124
  if (objectUrlRef.current) URL.revokeObjectURL(objectUrlRef.current);
126
125
  } catch (_e) {}
@@ -144,8 +143,7 @@ const Audio = ({ src, title, width, infoPosition, centerAlignContent, small, tin
144
143
  };
145
144
  }, [
146
145
  src,
147
- waveform,
148
- forceBlobForSeeking
146
+ waveform
149
147
  ]);
150
148
  useEffect(()=>{
151
149
  const { current: audio } = audioRef;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavv/ui",
3
- "version": "2.4.15-alpha.4",
3
+ "version": "2.4.15",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {