Audio Player Hack

This is a bit of a hack at the moment...

Upload a file (this could also be a file generated by a code cell — doesn’t matter as long as it lives in NJ’s content-addressed storage):

Magic Flute Clip.mp3

Once you have a file like that, right-click the Download symbol (on the right) and copy its URL. You can then add a ClojureScript cell that renders a HTML5 audio tag that uses the copied URL as source.

^{:nextjournal/viewer :hiccup}
[:audio {:controls true :src ""}]
Shift+Enter to run

Note that ClojureScript cells are pretty sketchy in how they evaluate. That’s why they’re hidden behind the ?experimental=1 feature flag. If they don’t react to executing them anymore after you added changes, reload the browser window. Hopefully you won’t have to do this often.

Runtimes (1)