We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3285a4d commit eb2e59bCopy full SHA for eb2e59b
live-view.js
@@ -541,6 +541,27 @@ function renderLiveViewHTML(file) {
541
}
542
543
})
544
+
545
+ // fetch music
546
+ frameDocument.querySelectorAll('audio').forEach(async (audio) => {
547
548
+ // if audio is external
549
+ if (audio.src) {
550
551
+ const linkHref = new URL(audio.src);
552
+ const fileName = linkHref.pathname.slice(1);
553
554
+ if (linkHref.origin == window.location.origin) {
555
556
+ const resp = await git.getFile(selectedFile.dir.split(','), linkHref.pathname.slice(1));
557
558
+ audio.src = 'data:text/plain;base64,' + resp;
559
560
+ }
561
562
563
564
+ })
565
566
567
0 commit comments