Wiki source code of User Macro: me-video - Linking to a Video file
Last modified by Normann P. Nielsen on 2013/10/19 17:48
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | This links to a video file on the filesystem, using an thumbnail image as thumbnail. This is not very optimal, as the browser will load the entire file before starting to play. | ||
| 2 | |||
| 3 | |= Name| me-video | ||
| 4 | |= Macro Body Processing| No macro body | ||
| 5 | |= Output format| HTML | ||
| 6 | |||
| 7 | Code | ||
| 8 | |||
| 9 | |||
| 10 | {{code}} | ||
| 11 | ## @param path:title=Status|type=string|required=true|desc=File Path | ||
| 12 | ## @param image:title=Image|type=string|required=true|desc=Image Name | ||
| 13 | ## @param thumbsize:title=Thumbsize|type=string|required=false|desc=Thumbnail Size | ||
| 14 | ## @param displaysize:title=Displaysize|type=string|required=false|desc=Display Size | ||
| 15 | |||
| 16 | ## Default Thumb and Display Sizes: | ||
| 17 | #set($ThumbSizeDefault=200) | ||
| 18 | #set($DisplaySizeDefault=800) | ||
| 19 | |||
| 20 | |||
| 21 | #if (${paramthumbsize} != "" ) | ||
| 22 | #set($ThumbSizeDefault=${paramthumbsize}) | ||
| 23 | #end | ||
| 24 | |||
| 25 | |||
| 26 | #if (${paramdisplaysize} != "" ) | ||
| 27 | #set($DisplaySizeDefault=${paramdisplaysize}) | ||
| 28 | #end | ||
| 29 | |||
| 30 | <a href="/images/${parampath}${paramimage}" title=""><img src="/images/${parampath}/thumbs/${ThumbSizeDefault}pxHigh/${paramimage}.jpg"></a> | ||
| 31 | {{/code}} |