ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Video control
  • Overview
  • Page control
  • Creating a Multimedia control
  • Characteristics of a Multimedia control
  • Video source (Video file)
  • Subtitles
  • Other options
  • Handling Multimedia controls programmatically
  • Modifying the video dynamically through programming
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Multimedia control (WEBDEV)
Overview

Page control

The Multimedia control is used to easily display a video in the browser.
Remark: In previous versions, this control was called Video control.
The control searches for the best video player found on the client computer according to the format of the video file to display.
If the browser used supports the HTML 5 standard. the video will be automatically played without any specific video driver.
The video can be controlled in browser code via Multimedia functions.

Creating a Multimedia control

To create a Multimedia control:
  1. On the "Creation" tab, in the "Usual controls" group, expand "Image" and select "Multimedia control".
  2. Click where you want to create the control in the page. The control appears in the editor.
To view the characteristics of the control, select "Description" in the context menu.
In the characteristics of the control, you have the ability to directly choose the video file to display. The file can also be assigned by programming (in server code).
Characteristics of a Multimedia control

Video source (Video file)

The video file can be assigned to the control in server code only.
The video file can be:
  • a path and a file name: in this case, the file will be sought in the _WEB directory (or in one of its sub-directories), the path given to the control must be relative to this directory.
  • a URL (starting with http:// or https://) ending with the name of a video file (for example: http://videoserver.mycompany.com/films/presentation.wmv)
  • a URL (starting with http:// or https://) not ending with the name of a video file (for example: http://videoserver.mycompany.com/film.awp?id=51452). In this case, MultimediaReader must be filled.
  • a complete URL of a video hosted off-site (YouTube video for example).
    Remark: In the case of a YouTube video, subtitle customization is not available.
The multimedia player used by the control depends on the file format and on the operating system.
If the browser used supports the HTML 5 standard. the video will be automatically played without any specific video driver.
The table below summarizes the main cases:
File extensionMultimedia player used by the video control
Windows Media format:
  • .wmv
  • .wvx
  • .wma
  • .wax
  • .asf
  • .asx
  • .avi
  • .wav
In Windows, the Windows Media player is used.
On the other operating systems, the player to use is chosen by the browser.
Flash video:
  • .flv
The Flash software will be used if it is found. Otherwise, the video player to use is chosen by the browser.
MPEG-4 Part 14 (ISO/IEC 14496-14:2003):
  • .mp4
The QuickTime software will be used if it is found. Otherwise, the video player to use is chosen by the browser.
MPEG:
  • .mpg
  • .mpeg
  • .mp3
In Windows with Internet Explorer, the Windows Media player is used.
On the other operating systems or with other browsers, the player to use is chosen by the browser.
Apple QuickTime:
  • .mov
  • .aiff
The QuickTime software will be used if it is found. Otherwise, the video player to use is chosen by the browser.
Ogg Vobis:
  • .ogg
  • .ogm
  • .oga
  • .ogv
In Firefox (version 3.5 and later), a "<VIDEO>" tag in HTML 5 standard is used.
With the other browsers, the video player to use is chosen by the browser.
Other casesThe video player to use is chosen by the browser.

The video player used is returned by the MultimediaReader property.
Remarks:
  • The Multimedia control does not contain any playback codecs. The appropriate codecs must be installed on the computer of the Web user.
  • If the choice of the multimedia player used was done by the browser, the Multimedia functions cannot be used.
  • Depending on the multimedia player actually used, some features may not be available (for example, the Flash player of Adobe does not support the "Allow the full-screen mode" parameter).
  • If the Web server used is IIS, a MIME type must be added onto the Web server for each type of video.
  • The browser used may not support all the formats. To check whether the browser supports the desired format (AVI for example), simply drop the desired file in the browser.

Subtitles

To add subtitles to a multimedia file, you must:
  1. Click the "+" button.
  2. In the table, select:
    • the type of subtitles (dialogs, comments, ...).
    • the language of the subtitles.
    • the caption of the subtitles. This caption allows users to select the type of subtitles at runtime.
    • the file containing the subtitles. The extension of this file can be "vtt", "ttml" or "srt".
Caution:
  • This feature is an HTML 5 feature. The page must be in HTML 5 format.
  • This feature is directly implemented by the browser. Depending on the browser used, some features may be supported or not.

Other options

  • AutoRun: This option is used to automatically start the video when displaying the page.
  • Automatic repetition: This option is used to play the video in loop.
  • Allow 'full screen' mode: This option allows the user to switch to "full screen" mode.
  • Multimedia toolbar: This option is used to display the bar for video management:
Caution: The options of this control depend on the type of video played.
Handling Multimedia controls programmatically

Modifying the video dynamically through programming

To dynamically change the video file associated with the control, simply assign the new file to the control. Example:
// Modify the video displayed
// The new video is found in a "Video" subdirectory of the _WEB directory of the project
VIDEO_Video1 = "/" + FolderWeb() + "/Video/Wildlife.wmv"
Related Examples:
The Multimedia control Unit examples (WEBDEV): The Multimedia control
[ + ] This example explains how to view a video from a WEBDEV application and it allows you to:
- Load a video
- Play a video
- Load an audio file
- Play an audio file
Minimum version required
  • Version 15
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help