The Video control displays the video that is specified in the control's Video Source property (see below). Multiple video controls can be placed on a page. Each control is identified by a name and plays the video specified in its Video Source property. Properties of the control can be set in the Styles & Properties Pane.
Note the following features:
•Video resources are located via URLs. The URLs can be specified via a page source link, an XPath expression, or a directly entered static address. To specify a video file on the client device, the URL must be a relative URL that is relative to the respective Device Dependent Directory (see the description of the Video Source property below). For information on video file formats, see Audio/Video Formats.
•You can specify the control's size for the time during which the video is being downloaded. After the download has been completed, the control expands or contracts to the video's actual size. See the Initial Width and Initial Height properties below.
•You can set whether buttons that control the video's playback actions are displayed in the control or not (Show Controls property). If you prefer not to display these buttons, the Video action can be use to create custom buttons.
•The Video action provides functionality to start, pause, resume, stop, and skip to a specific time in the playback, as well as to play a time-defined segment.
•A number of MobileTogether XPath extension functions that provide attributes of video files and playback can be used to build conditional processing. For example, you can define alternative sets of actions to carry out if the mt-video-is-playing function returns true() or false().
Video events are accessed from the control's context menu (right-click to open) or the control's Control Action property (see properties below). To define actions for a video event, drag and drop an action from the left-hand Actions pane into the video event's tab.
•OnVideoStarted: Before this event occurs (that is, before the video starts playing), details of the video file are not available, and the functions to get video height, width, duration, and current position (see below) should not be called; at this time, only the mt-video-is-playing function will return valid information. This event can be used, for example, to log details of video playback (say, via the Update Node action) to an XML tree node.
•OnVideoError: Possible errors could be: File not Found, a file format error, or download/playback interruption. Information about the error can be retrieved with the MobileTogether XPath extension function mt-external-error. If actions are defined for the event, these actions are executed. Otherwise, the error is shown in a message box.
•OnVideoCompleted: Video playback is considered to be completed when the file or specified segment plays to the end (without a Stop action being executed). The actions defined for this event are not performed when the video is suspended (with the project property On Switch to Other Solution) or paused.
The control's properties are available in the Styles & Properties Pane, and are listed below in the order in which they appear.