Module player

Player functions

Synopsis

Fields
playbackSpeed number

read/write

Control playback speed

The value is automatically clamped between 0.05 minimum speed and 3.0 maximum speed

Functions
player.CurrentTime()

Get the current time in the video

player.Seek()

Seek to time

player.Duration()

Get the duration

player.Play()

Control playback

player.IsPlaying()

Gets if the player is playing

player.CurrentVideo()

Gets the path to the current video

player.FPS()

Get the FPS of the video

player.Width()

Get the width of the video

player.Height()

Get the height of the video

Fields

player.playbackSpeed number read/write

Control playback speed

The value is automatically clamped between 0.05 minimum speed and 3.0 maximum speed

Functions

player.CurrentTime()

Get the current time in the video

Return Values
(number)

Time in seconds

player.Seek(time)

Seek to time

Parameters
time (number)

Time in seconds

Return Values
(nil)
player.Duration()

Get the duration

Return Values
(number)

Time in seconds

player.Play(shouldPlay)

Control playback

Parameters
shouldPlay (bool or nil)

Toggles when no value is passed.

Return Values
(nil)
player.IsPlaying()

Gets if the player is playing

Return Values
(bool)

isPlaying

player.CurrentVideo()

Gets the path to the current video

Return Values
(string)

Path

player.FPS()

Get the FPS of the video

Return Values
(number)

FPS

player.Width()

Get the width of the video

Return Values
(number)

Pixels

player.Height()

Get the height of the video

Return Values
(number)

Pixels