Hello to all the TiddlyWikiers
I want to import audio into my TW5 TiddlyWiki and play it using an html5
<audio> tag.
So far, what I have come up with is this:
<audio controls src="data:audio/mp3;base64,datadatadatadata......" />
It works but it's very kludgy. The uri length limitation seems to not be
much of an issue, but, the editor widget has trouble keeping up with 500KB+
blocks of text, and doing manual copy/paste is tedious and error-prone.
I looked but could not find any sign of an $audio widget, but I'm thinking
that there is nonetheless a way to accomplish something more functional by
using transclusion to include an imported file. However I am too ignorant
of TW5's internals to figure it out apparently.
I used import (using FireFox btw) so that I now have a tiddler called
"audio.mp3.b64".
I tried to use <audio controls
src="data:audio/mp3;base64,{{audio.mp3.b64}}" /> but it doesn't seem to
work.
After searching this group for other transclude related issues, I also
tried:
<$set name="mymedia" value="{{audio.mp3.b64}}">
<audio controls src="data:audio/mp3;base64,$mymedia$" />
</$set>
I also saw Mr Ruston post an example using the <$text> widget, so I tried
this:
<audio controls src="data:audio/mp3;base64,<$text text={{audio.mp3.b64}}/>"
/>
That didn't work either. There is probably some problem with those nested
html brackets too, I imagine.
I feel like I am close to the solution but it still eludes me. I know I
could use external audio files but what is the challenge in that? ;-)
Anyone have any ideas to help me progress on my search?
Thanks in advance to anyone who replies, and as this is also my first post
here, thanks to Mr Ruston for conceiving of and continuing to develop this
powerful tool!
James Burford
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.