Difference between revisions of "Video"
Jump to navigation
Jump to search
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{UI Object Header}}[[ | + | {{UI Object Header}} |
+ | Displays a video. According to the HTML5 standard, the supported video formats are mp4, webm, and ogv, but actual support depends on the Web browser being used to access the pages. | ||
+ | It allows dynamic control of position, visibility, play/pause and mode. | ||
+ | |||
+ | == Parameters == | ||
+ | *'''id''': the object's ID, used by UISets | ||
+ | *'''src''': path to the video file, without the extension. The browser will automatically select a supported format between the available versions (MP4, OGG and WEBM) | ||
+ | *'''position''': the object's position. Use the pixels or rows and columns coordinates format | ||
+ | *'''size''':the video's width and height | ||
+ | *'''mode''': selects the playback mode, see the [[#Video attributes|mode attribute]] below | ||
+ | |||
+ | {{Note: VIDEO Filename}} | ||
+ | |||
+ | == Syntax == | ||
+ | (video!id <src>; <pos>; <width>; <height>; <mode>) | ||
+ | E.g. | ||
+ | (video!myvideo video; r5c2; 100; 100; stop) | ||
+ | |||
+ | == UI Attributes == | ||
+ | {{UI Object Attributes (Common)}} | ||
+ | ===Video attributes=== | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Value | ||
+ | !Description | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|controls | ||
+ | |true | ||
+ | |Default value. Controls are visible | ||
+ | |- | ||
+ | |false | ||
+ | |Controls are hidden | ||
+ | |- | ||
+ | |||
+ | |rowspan="3"|mode | ||
+ | |stop | ||
+ | |Default value. The video is paused when the page is shown | ||
+ | |- | ||
+ | |auto | ||
+ | |The video is automatically played when the page is shown | ||
+ | |- | ||
+ | |loop | ||
+ | |The video is cyclically played when the page is shown | ||
+ | |- | ||
+ | |||
+ | |play | ||
+ | |true | ||
+ | |Play the video | ||
+ | |- | ||
+ | |||
+ | |pause | ||
+ | |true | ||
+ | |Pause the video | ||
+ | |- | ||
+ | |||
+ | |} |
Latest revision as of 18:39, 16 November 2018
Displays a video. According to the HTML5 standard, the supported video formats are mp4, webm, and ogv, but actual support depends on the Web browser being used to access the pages. It allows dynamic control of position, visibility, play/pause and mode.
Parameters
- id: the object's ID, used by UISets
- src: path to the video file, without the extension. The browser will automatically select a supported format between the available versions (MP4, OGG and WEBM)
- position: the object's position. Use the pixels or rows and columns coordinates format
- size:the video's width and height
- mode: selects the playback mode, see the mode attribute below
Video files are searched inside the www/<project's name>/img directory first, then inside the www/img directory.
The extension must not be specified. The browser will search for MP4, OGG and WEBM extension, depending on which format is supported
The extension must not be specified. The browser will search for MP4, OGG and WEBM extension, depending on which format is supported
Syntax
(video!id <src>; <pos>; <width>; <height>; <mode>)
E.g.
(video!myvideo video; r5c2; 100; 100; stop)
UI Attributes
Common attributes
Name | Value | Description |
---|---|---|
pos | x<x>y<y> | Position specified as x/y coordinates. E.g. x-5y10 |
visible | true | Default. Show the object |
false | Hide the object | |
blink | true | slow | Blink the object at a slow speed |
fast | Blink the object at a fast speed | |
false | Stop the blinking | |
opacity | 0.0 ... 1.0 | Object opacity from 0 (not visible) to 1 (fully visible) |
rotation | 0 ... 360 | Object rotation in degrees. Images are rotated around the center point, all other objects are rotated around the top left corner |
Video attributes
Name | Value | Description |
---|---|---|
controls | true | Default value. Controls are visible |
false | Controls are hidden | |
mode | stop | Default value. The video is paused when the page is shown |
auto | The video is automatically played when the page is shown | |
loop | The video is cyclically played when the page is shown | |
play | true | Play the video |
pause | true | Pause the video |