Skip to main content

Video

Element type: Dictionary
Availability: 2.0.6+

Play a local or online video with custom behaviors. The URL to the video has to be a direct link.

tip

For YouTube or other videos hosting website, use the Web component instead and paste the embedded video code in an HTML file.

Keys

NameTypePossible valuesRequired
TypeStringVideoRequired
URLString-Required
HideControlsBoolean-
AutomaticStart PROBoolean-
Repeat PROBoolean-
IsMutedBoolean-
MarginsDictionary (Margins)-
BorderDictionary (Border)-
Condition PRODictionary (Condition)-

Detail

Type Required

Type: String
Explanation: The type of the component which has to be Video.

URL Required

Type: String
Explanation: The URL of the video to play. Can be local or online. Starting with Octory 2.4.3, you can directly use a YouTube or Vimeo url.

HideControls

Type: Boolean
Default: false
Explanation: When true, the controls to play the video will be hidden, preventing the user to pause or resume it.

AutomaticStart PRO

Type: Boolean
Default: false
Explanation: If true, the video will start automatically when the slide that contains it is shown.

Repeat PRO

Type: Boolean
Default: false
Explanation: If true, the video will restart when it is finished.

IsMuted

Type: Boolean
Default: false
Explanation: If true, the video sound will not be played.

Margins

Type: Dictionary (Margins)
Explanation: Add padding to the component's sides.

Border

Type: Dictionary (Border)
Explanation: Add a top or bottom border to a component.

Condition PRO

Type: Dictionary (Condition)
Explanation: Allows to hide or show the component using a boolean expression.

Example

Using an online video.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>Slides</key>
<array>
<dict>
<key>Containers</key>
<array>
<dict>
<key>Components</key>
<array>
<dict>
<key>Type</key>
<string>Video</string>
<key>URL</key>
<string>https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/master.m3u8</string>
</dict>
</array>
</dict>
</array>
</dict>
</array>
<!-- ... -->
</dict>
</plist>

Local video with a variable Videos in its URL. For instance, Videos could be /Users/jappleseed/Application Support/Octory/Resources/Videos. Controls are hidden and the video will start automatically when it appears.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>Slides</key>
<array>
<dict>
<key>Containers</key>
<array>
<dict>
<key>Components</key>
<array>
<dict>
<key>Type</key>
<string>Image</string>
<key>URL</key>
<string>${Videos}/onboarding.mov</string>
<key>AutomaticStart</key>
<true/>
<key>HideControls</key>
<true/>
</dict>
</array>
</dict>
</array>
</dict>
</array>
<!-- ... -->
</dict>
</plist>