Usage
Input
-- ftd.video:
src: https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
controls: true
width.fixed.px: 400
height.fixed.px: 300
Output
Attributes
`ftd.video` accepts the below attributes as well all the [common
attributes](ftd/common/).
`src`
Required: True
The `src` attribute specifies the path to the video to embed. This is the only
required attribute. `src` stores video URLs for both light and dark mode.
-- ftd.video:
src: https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
width.fixed.px: 400
height.fixed.px: 300
-- import: fastn.com/assets
Then, use the `files` field of `assets` variable to access files present in the
package. For example:
-- import: fastn.com/assets
-- ftd.video:
src: $assets.files.videos.bunny.mp4
width.fixed.px: 400
height.fixed.px: 300
The output will look same as above.
`controls`
Type: `optional` [`boolean`](ftd/built-in-types/#boolean)
Required: False
Default: False
If this attribute is present, the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback.
Sample code using `controls`
Input
-- ftd.video: https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
controls: true
width.fixed.px: 400
height.fixed.px: 300
Output
`muted`
Type: `optional` [`boolean`](ftd/built-in-types/#boolean)
Required: False
Default: False
A Boolean attribute that indicates the default setting of the audio contained in the video. If set, the audio will be initially silenced.
Sample code using `muted`
Input
-- ftd.video: https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
muted: true
controls: true
width.fixed.px: 400
height.fixed.px: 300
Output
`autoplay`
Type: `optional` [`boolean`](ftd/built-in-types/#boolean)
Required: False
Default: False
A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.
**Note:** The autoplay option is only respected by the browser if the video is muted.
Sample code using `autoplay`
Input
-- ftd.video: https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
autoplay: true
muted: true
width.fixed.px: 400
height.fixed.px: 300
Output
`poster`
Type: `optional` [`string`](ftd/built-in-types/#string)
Required: False
A URL for an image to be shown while the video is downloading. If this attribute isn't specified, nothing is displayed until the first frame is available, then the first frame is shown as the poster frame.
Sample code using `poster`
Input
-- ftd.video: https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
poster: https://storage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg
width.fixed.px: 400
height.fixed.px: 300
Output