TW under node.js and external video

51 views
Skip to first unread message

Andrew Lister

unread,
Oct 22, 2015, 9:10:47 PM10/22/15
to TiddlyWiki
I've been using TW under node.js because I like that tiddlers are individual text files accessible easily from anywhere, and in a way that can be integrated with my regular tag-based filing system.  I've been making one TW per course to hold my lecture notes - easy navigation, all in one place, but also easily accessible from outside of TW.  I've been thinking about using TW as a presentation tool - keen to try out the new stuff Jeremy is working on (http://tiddlywiki.com/talkytalky/). I've run into one problem, however, which has to do with external videos. Even short video clips can be quite large, and so not importable.  However, they also can't be linked to in the ordinary way, when using node.js.  At least I don't think they can.  Things like this don't work:

<img src="file:///Users/andrewdlister/Dropbox/Economic%20Freedom%20and%20Income%20of%20Poor.png"  >

<video width="320" height="240" controls>
  <source src="file:///Users/andrewdlister/Documents/13-14%20Documents/Friedman_TalentvsWealth.mp4" type="video/mp4">
</video>

For the image, it's no problem to drag and drop to import the image into the TW.  But this video clip  is 9.7 MB, for just a couple of minutes.  I had 5 or 6 of these in my Keynote presentation for the class.

It's not a big deal to have to use presentation software. But TW is otherwise almost perfect (soon to be perfect?) for presentation, so I just thought I would ask to make sure I'm not missing something basic about TW via node.js.

I suppose one option is to set an ordinary TW for each presentation.

Thanks for any suggestions.

Tobias Beer

unread,
Oct 23, 2015, 4:46:58 AM10/23/15
to tiddl...@googlegroups.com
Hi Andrew,

The problem is, that — when you merely serve your presentation on localhost / 127.0.0.1 — there is no server at this address to serve from "file:///", be it video, images, whatever type of file you want to access, it's not accessible using the simple --server command. Even relative paths won't resolve and retrieve content, because the server is not (yet) ready to handle those requests somewhat "outside" the context of the wiki, i.e. your browser requesting a video to render it into the appropriate element.

Here are two possible ways:

1) You can use the --build command to "bake" standalone wikis that you then open in the browser for viewing-only. this makes those (relative) paths available to the wiki again as we're actually looking at it on the "file:///" domain or wherever else you put the whole package deal. So, place the videos in an output folder where the built wiki finds them and accept for now that while editing they just won't render in the context of the --server, so you want to double check your build if it's all properly referenced. If you avoid any editing via --server, then you can simply just use build so as to verify the output.

3) Another option would be to rely on web-access and to actually put those video-data on a webaddress which you then refer to in your tiddlers... doing all the talkytalky to download that content whenever the browser needs it.

~

I have no idea what it takes to make the tw --server serve files, at least in sub-folders of whatever wiki folder / edition is being served.

Best wishes,

— tb

Andrew Lister

unread,
Oct 23, 2015, 6:26:00 AM10/23/15
to TiddlyWiki
Thanks for explaining, Tobias.  Putting the clips online might work because my university has webspace for that.
Reply all
Reply to author
Forward
0 new messages