Closed sedubois closed 3 months ago
Thanks for the thorough issue description. It's been answered on Discord.
Thanks! As discussed on Discord it's fixed by switching to type="audio/mpeg"
instead of type="audio/mp3"
and moving the attributes to a <source />
tag embedded in <media-provider>
:
<media-player>
<media-provider>
<source
src="http://localhost:3000/sample"
type="audio/mpeg"
/>
</media-provider>
<media-controls>
<media-controls-group>
<media-play-button>
<media-icon type="play"></media-icon>
</media-play-button>
</media-controls-group>
</media-controls>
</media-player>
Current Behavior:
When using a
src
URL which does not end with a filetype extension, playback does not start when clicking play. No errors are reported in the JS console.The error persists if
type
when is provided alongsidesrc
.Expected Behavior:
The play button should appear and the audio should be playable.
Steps To Reproduce:
src
URL tohttp://localhost:3000/sample
and reload the vidstack player page: playback does not start when clicking the play button.Environment:
Anything else?
I observed this issue initially when trying to play S3 files made available through CloudFront URLs, but for the sake of simplicity, the above example is with local files. The issue appears in both cases, as soon as I try to play an mp3 file whose URL does not end with
.mp3
.