DHTMLX Touch documentation

Video View

Video view is a component that allows to play video in the app. It inherites from view.


Full code of the example in the picture

Initialization

To init the component you need to perform a simple procedure - call initialization code.

Initialization code or an object constructor lets you create object by using common declaration.

dhx.ui ({view:"video",
...})

Parameters

In constructor you can specify the following parameters:

  • src - the path to a video file
    (URL) Absolute path to the desired video file.
  • autoplay - defines whether a video file must be played just after initialization, without waiting a button click.
    (boolean) On default, autoplay is 'false'.
  • controls - defines whether a control panel must be presented
    (boolean) If the parameter is set to 'true', the panel will be presented but hidden initially. To see it - just hover a cursor over video.
    If you set the parameter to 'false', the panel will be removed.

Please note, video view is a derived class, i.e. it inherits all the features of the base class (video view → view).

dhx.ui({
	  view:"window", // window where we will play a video file. Instead of window can be a layout cell or something else.
	  body:{
	 	view:"video",
		src:"movie.avi",
		autoplay:true,
		controls:false
	 }
})

Related how-tos