Hi,
I'm trying to built a TW5 to be used as a front-end for various teaching videos.
The videos are extracted from various sources, mostly DVDs and Youtube videos. They are all on the local disk.
One DVD is split into several mp4 videos, all stored in the same directory. So I have one directory per DVD, and some more for the videos I downloaded from Youtube.
In the TW I plan to have one tiddler for each video. I've built a template to be transcluded in each video tiddler.
The content of a video tiddler is : {{||VideoTemplate}}
It has two fields (and some others but not relevant here) :
* "origin" : the source of the video, for instance "DVDSubject1"
* "filename" : the name of the video file, for instance "subject1part1.mp4"
The path to the video directory is in a dictionary tiddler (VideoPathDictionary) :
DVDSubject1:RelativePathToVideoDirectoryDVDSubject1
DVDSubject2:RelativePathToVideoDirectoryDVDSubject2
YTSubject5:RelativePathToVideoDirectoryYoutubeSubject5
One example of relative path is : ../../Videos/DVDSubject1
The template tiddler contains :
\define videofullfilename()
{{VideoPathDictionary##$(origin)$}}$(filename)$
\end
\define videocall()
<video width=480 height=384 controls="controls">
<source src=$(mySource)$/>
</video>
\end
<$set name="origin" value={{!!origin}}>
<$set name="filename" value={{!!filename}}>
<$set name="mySource" value=$(videofullfilename)$>
<<videocall>>
</$set>
</$set>
</$set>
I've tried many combinations but no way to get the right filename for the source attribute !
Could someone help ?
I've used successfully that code structure to set the width and height of the video, with two dictionary tiddlers : VideoWidthDictionary and VideoHeightDictionary, but I can't figure out why it doesn't work with the source attribute.
Thanks
FrD