File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -701,13 +701,22 @@ export default {
701701 audioContainer .innerHTML = ' <div class="text-center text-gray-500">Loading audio...</div>' ;
702702
703703 window .ResourceLoader .include ([' https://assets.codepen.io/252820/peter.mp3' ], {
704- onSuccess : (url ) => {
705- // For non-binary loading, we get the URL directly
704+ onSuccess : (response ) => {
706705 audioContainer .innerHTML = ' ' ; // Clear previous results
707706
707+ // Handle both URL string and Blob responses
708+ let audioUrl;
709+ if (response instanceof Blob ) {
710+ // Create object URL from Blob
711+ audioUrl = URL .createObjectURL (response);
712+ } else {
713+ // It's already a URL string
714+ audioUrl = response;
715+ }
716+
708717 const audioElement = document .createElement (' audio' );
709718 audioElement .controls = true ;
710- audioElement .src = url ;
719+ audioElement .src = audioUrl ;
711720 audioElement .className = ' w-full' ;
712721
713722 const sourceInfo = document .createElement (' div' );
You can’t perform that action at this time.
0 commit comments