Video



The Video standard function plays a video that is attached to a page, using the browser's built-in player.
Videos can be very large, the player starts as soon as enough has arrived and can skip to any point without downloading the whole file first. Like images and files, a video is attached to a single page but can be played on any other page.
Supported formats: MP4, MOV (QuickTime), WebM and Ogg. MOV files from phones and cameras usually play; a download link is shown under the player in case the browser can not play one. Other formats (such as AVI or WMV) are shown as a download link instead of a player.


##Video (string [name], integer {width}, string {poster}, bool {loop}, bool {muted}, bool {autoplay})


  • Name: name [Required]
    • Type: string
    • Description: The name of the attached video. To play a video attached to another page, use "Page Name/file name".
  • Name: width {Optional}
    • Type: integer
    • Description: The width of the player in pixels. The height follows the video's shape. Without a width, the player is the video's own size, but never wider than the page.
  • Name: poster {Optional}
    • Type: string
    • Description: The name of an attached image to show before the video starts. Like the video, it can be attached to another page by using "Page Name/file name". The "Copy Name" button in the attachment list copies a file's name for this.
    • Default: The browser shows the first frame of the video, or a blank player.
  • Name: loop {Optional}
    • Type: bool
    • Description: Whether to start the video again when it ends.
    • Default: false
  • Name: muted {Optional}
    • Type: bool
    • Description: Whether the video starts with the sound off. The viewer can turn the sound on.
    • Default: false
  • Name: autoplay {Optional}
    • Type: bool
    • Description: Whether the video starts playing by itself when the page opens. Browsers only allow this with the sound off, so an autoplaying video is always muted.
    • Default: false



Playing a video that is attached to the page:
##Video(Product Demo.mp4)

Playing a video 640 pixels wide, with an attached image shown before it starts:
##Video(Product Demo.mp4, 640, Demo Poster.png)

Using parameter names to set only the options you need:
##Video(Product Demo.mp4, :poster=Demo Poster.png)
##Video(Background Loop.webm, :loop=true, :autoplay=true)

Playing a video that is attached to another page:
##Video(Some other Page/Product Demo.mp4)

Names that contain commas or other special characters can be quoted:
##Video("Range Day, Part 1.MOV")


Attach the video to the page while editing it, the same way as any other file. Large videos are uploaded in pieces with a progress bar, and an interrupted upload continues where it left off. The "Copy Tag" button in the attachment list copies a ready-made Video function for the file.


Audio
Image
File
Function Calling Convention
Standard Function