Hi BJ,

I get the same result : src seems to contain only the part 
{{VideoPathDictionary##$(origin)$}}. It looks like $(filename)$ is 
discarded !

I made another experiment.
I put a "path" field in the video tiddler ; path=../../Videos/DVDSubject1/
I modified the template :

\define videocall()
        <video width=480 height=384 controls="controls">
<source src= "$(path)$$(filename)$"/>          <---- with quotes !
        </video>
\end

<$set name="path" value={{!!path}}>
    <$set name="filename" value={{!!filename}}>
            <<videocall>>
    </$set>
</$set>

This time it works as expected !
But it's not what I intended to do, as I wanted to centralize the paths in 
a dictionary tiddler and not put them in each tiddler.

Anyway thanks for your proposal

FrD


Le vendredi 26 juin 2015 00:42:09 UTC+2, BJ a écrit :
>
> Unfortunately there is a limitation on using macros within parameters 
> (they perform simple substitutions instead of what you would expect)
>
> try
>
>
> \define videocall()
>         <video width=480 height=384 controls="controls">
>             <source src= {{VideoPathDictionary##$(origin)$}}$(filename)$/>
>         </video>
> \end
>
> <$set name="origin" value={{!!origin}}>
>     <$set name="filename" value={{!!filename}}>
>         <<videocall>>
>     </$set>
> </$set>
>
> BJ
>
> On Thursday, June 25, 2015 at 12:18:46 PM UTC+1, FrD wrote:
>>
>> 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
>>
>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a093c0e5-992a-4ab8-8b44-5dc4355b4a2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to