VideoPlayer Component


Properties

fullScreen
  Sets whether the video should be shown in fullscreen or not.
Data type: boolean
Designer Writable false
Code Writeable true videoplayerName.fullScreen = true
Code Readable true let variable = videoplayerName.fullScreen

height
  Specifies the component's vertical height, measured in pixels.
Data type: number
Designer Writable false
Code Writeable true videoplayerName.height = 120
Code Readable true let variable = videoplayerName.height

heightPercent
  Specifies the VideoPlayer's vertical height as a percentage of the Screen's Height.
Data type: number
Designer Writable false
Code Writeable true videoplayerName.heightPercent = 25
Code Readable false

source
  Sets the "path" to the video. Usually, this will be the name of the video file, which should be added in the Designer.
Data type: string
Designer Writable true <videoplayer name="videoplayerName" source="Test source">
Code Writeable true videoplayerName.source = "Test source"
Code Readable false

visible
  Specifies whether the VideoPlayer should be visible on the screen. Value is true if the VideoPlayer is showing and false if hidden.
Data type: boolean
Designer Writable true <videoplayer name="videoplayerName" visible="true">
Code Writeable true videoplayerName.visible = true
Code Readable true let variable = videoplayerName.visible

volume
  Sets the volume property to a number between 0 and 100. Values less than 0 will be treated as 0, and values greater than 100 will be treated as 100.
Data type: number
Designer Writable true <videoplayer name="videoplayerName" volume="50">
Code Writeable true videoplayerName.volume = 50
Code Readable false

width
  Specifies the component's horizontal width, measured in pixels.
Data type: number
Designer Writable false
Code Writeable true videoplayerName.width = 300
Code Readable true let variable = videoplayerName.width

widthPercent
  Specifies the horizontal width of the VideoPlayer as a percentage of the Screen's Width.
Data type: number
Designer Writable false
Code Writeable true videoplayerName.widthPercent = 80
Code Readable false

class
  The styling class of the the component
Data type: string
Designer Writable true <videoplayer name="videoplayerName" class="Test class">
Code Writeable false
Code Readable false

id
  The styling id of the the component
Data type: string
Designer Writable true <videoplayer name="videoplayerName" id="Test id">
Code Writeable false
Code Readable false

name
  The name of the component that will be used to refer to it in code.
Data type: string
Designer Writable true <videoplayer name="videoplayerName" name="testComponent">
Code Writeable false
Code Readable false

Methods

Method name Description Parameters
getDuration Returns duration of the video in milliseconds.
videoplayerName.getDuration()
pause Pauses playback of the video. Playback can be resumed at the same location by calling the Start method.
videoplayerName.pause()
seekTo Seeks to the requested time (specified in milliseconds) in the video. If the video is paused, the frame shown will not be updated by the seek. The player can jump only to key frames in the video, so seeking to times that differ by short intervals may not actually move to different frames.
videoplayerName.seekTo(ms)
videoplayerName.seekTo(0)
ms number
start Plays the media specified by the Source.
videoplayerName.start()
stop Resets to start of video and pauses it if video was playing.
videoplayerName.stop()
addEventListener Method used to create event listeners.
See Events below for samples.
eventName string
eventCallbackFunction callback

Events

Event name Description Parameters
completed Indicates that the video has reached the end.
videoplayerName.addEventListener(
    "completed",
    function () {
        //Your code here
    }
)