VideoView class is a control for video playback and display. It provides minimum functions for playback (play, pause, stop, forward, and backward). Some options, such as volume, can be controlled through the control properties.
You must install a video plugin to enable
The VideoView control does not use any privileges APIs on its own. However, if you use video files in a specific device storage, the application requires privileges to access the storage.
In this tutorial, the following subjects are covered:
The following table lists the basic signal provided by the
Table: VideoView input signals
||Emitted when a video playback is finished.|
VideoView class provides the
Finished, which is emitted when the video playback is finished. The related callback can support some basic actions.
Creating a VideoView
The following basic example shows how to create a
// Create a ScrollView instance Window window = Window.Instance; VideoView view = new VideoView( "videofile.mp4" ); window.Add(view); view.ParentOrigin = ParentOrigin.Center; view.PivotPoint = PivotPoint.Center; view.HeightResizePolicy = ResizePolicyType.UseNaturalSize; view.WidthResizePolicy = ResizePolicyType.UseNaturalSize; view.Size2D = new Size2D( WIDTH, HEIGHT ); view.Play();
You can set the video file to be played in the
new VideoView()function, or by modifying
You can modify the
VideoView appearance and behavior through its properties.
The following table lists the available
Table: VideoView properties
||PropertyMap||Video file URL string. This property can also provide additional features, such as a custom shader, by
||Boolean||Enable or disable the looping of the playback.|
||Boolean||Whether the playback is muted.|
||PropertyMap||Playback volume. The
||Boolean||Set the underlay either as
||String||The video file URL as a string type.|
- Tizen 4.0 and Higher