#No sound from `Player` from `Audio` component? [ Resolved ]

8 messages · Page 1 of 1 (latest)

wary jolt
#
  • Works fine on desktop.
  • Player has autoPlay disabled & controls enabled.
  • Audio snippet in the Composition looks like:
     <Audio
        volume={1}
        src={musicSrc}
      />
  • I'm aware that mobile disables autoPlay. I'm wondering if clickToPlay has something to do it with it? I'm prefetching the audio already and loading it into a Blob before loading the Player component.

Thoughts?

#

Ooo nvm looks like this is something with safari

#

Just going to leave this here... If you're using blobs in safari with the audio, you need to set the mime type... e.g.

        const response = await fetch(audioUrl);
        const arrayBuffer = await response.arrayBuffer();
        const audioBlob = new Blob([arrayBuffer], { type: "audio/mpeg" });
        const blobUrl = URL.createObjectURL(audioBlob);
        // set state or do whatever
#

No sound from Player from Audio component? [ Resolved ]

steel sphinx
#

@wary jolt why did you turn it into a blob instead of pasing a URL?

it will make the render slower because it needs to convert to base64

wary jolt
#

Oh, I must’ve missed that. I was using it to cache the audio, since im pulling it from s3

steel sphinx