The VideoView can be used to play local video files from the filesystem or video streams from remote sources.
Use SetFile to set the video file or video stream address.
player.SetFile( "https://file-examples.com/wp-content/uploads/2017/04/file_example_MP4_640_3MG.mp4" );
When the video is ready to play, the OnReady callback function will be called, you can then use Play to start playing the video.
If the video cannot be played, the OnError callback function will be called. Use SetOnReady and SetOnError to set the names of your OnReady and OnError callback functions.
Properties
The following properties are available on the VideoView object:
Methods
The following methods are available on the VideoView object:
Batch(
properties )
Focus()
GetAbsHeight() → Number: integer
GetAbsWidth() → Number: integer
GetDuration() → Number: float
GetParent() → app object
GetType() → String: “VideoView”
Gone()
Hide()
IsEnabled() → Boolean
IsPlaying() → Boolean
IsReady() → Boolean
IsVisible() → Boolean
Pause()
Play()
Resize()
SetEnabled(
enable )
SetSubtitles(
file )
Show()
Stop()