Video
The Video () form object makes it possible to add a video inside of a form. The Video form object embeds a video file in a form. The video is a web page created in HTML5. The supported video file formats are .mp4 (MP4 format), .ogv (OGV format), and .webm (WebM format) files. However, not all video file formats are supported on all platforms. When running an application by connecting to COMSOL Server from a web browser, which formats are supported depend on the web browser and may vary with different versions of the same web browser. Of these formats, MP4 works with most web browsers, whereas OGV and WebM work in Firefox and Google Chrome (as web clients).
Specify a name for the image in the Name field. The name must be unique among the form objects in the form. Specify a video file to use from the Video list, or click the Add File to Library and Use Here button () to locate a video file to use on the file system. That video then becomes a part of the Files library and selected as the video in the Video object. To not show a video, select None from the Video list. Click the Export button () to export the video file to the file system (for use in another application, for example).
In the Form Editor, a placeholder image appears where the video will appear when running the application.
The Show video controls check box is selected by default. The user of the application can then control the video using controls to pause and play the video and to mute and unmute the sound. Clear this check box to show the video without any controls.
Select the Start automatically check box if you want the video to start directly when the user runs the application.
Select the Repeat check box if you want the video to keep running repeatedly.
Select the Initially muted check box if you want the video to be initially muted (no sound).
In addition, the Settings window contains the following sections.
Position and Size
This section contains all layout settings for a video in the grid of the parent form.
In the grid mode, you can control the horizontal and vertical alignment of the video using the following lists:
From the Horizontal alignment list, choose Left, Center, Right, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
From the Vertical alignment list, choose Middle, Top, Bottom, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
The need to specify the alignment is most obvious when working in the grid mode, as it controls how the form object is aligned in its grid cell. Aligning the form object can be useful in the sketch mode too, and you can then use the alignment tools on the Arrange menu in the Form toolbar’s Sketch section. When running the application in any client other than the Windows client, the form objects may not be positioned exactly as seen in the form windows. This is because the form objects may have a different size in other clients, giving them a slightly different positioning. Specifying the alignment ensures that the form objects are aligned as you want them to be in all clients.
The Width and Height fields are unavailable because the dimensions of the image are determined by the software.
Additionally, in the sketch mode, you can specify the absolute position of the video using the Position x and Position y fields. In the grid mode, you can position the object in the grid and see the grid position as the Row, Column, Row span, and Column span values.
Cell Margin
Under Cell margin (in grid mode only), you can control the margins around the form object. By default, the margins are taken from the parent form. From the Cell margin list, choose:
None, for no margin around the form object
From parent form (the default), to use the margins set for the parent form
Custom, to specify the margins for the form object in the Horizontal and Vertical text fields
Appearance
Under Appearance, you can control the initial state of the video when users run the application. By default, the image is visible. Clear the Visible check box if you want to make the initial state of the video hidden. You can then make it visible using a method. Objects that are hidden become visible when selected in the Form Editor.