High-level media player wrapper controlling playback, tracks, subtitles, and video rendering.
Constructors
new(instance : Instance | Nil = nil)
SourceInstance methods
Loads an external subtitle file (.srt, .vtt, .sub, .ass)
Sourceaspect_ratio
Video aspect ratio string (e.g. "16:9", "4:3")
Sourceaudio_channel
Audio output channel mode (Stereo, Reverse Stereo, Dolby, etc.)
Sourceaudio_channel=(ch : LibVLC::AudioOutputChannel) : LibVLC::AudioOutputChannel
Sourceaudio_delay_ms
Audio delay in milliseconds (for lip-sync correction)
Sourcecan_pause?
True if pause is supported
Sourcecurrent_audio_track
Currently active audio track ID (-1 if disabled)
Sourcecurrent_subtitle_track
Currently active subtitle track ID (-1 if disabled)
Sourceenable_video_callbacks(frame_buffer : VideoFrameBuffer) : Nil
Enables memory video decoding using double-buffered frame surface
Sourceequalizer=(eq : Equalizer | Nil) : Nil
Applies an audio graphic equalizer
Sourcelength_ms
Media duration in milliseconds
Sourcenext_frame
Steps forward by a single video frame
Sourceplayback_rate
Playback speed rate multiplier (e.g. 1.0 = normal, 2.0 = double speed)
SourceSets playback speed rate multiplier (0.25 .. 4.0)
Sourceplaying?
Returns true if currently playing
Sourceposition
Current playback position as normalized ratio (0.0 .. 1.0)
SourceSeeks to normalized ratio (0.0 .. 1.0)
Sourceseekable?
True if seeking is supported by the media/stream
Sourcesubtitle_delay_ms
Subtitle delay in milliseconds
SourceCaptures a video snapshot to a local file (.png, .jpg)
Sourcetime_ms
Current playback position in milliseconds
SourceSeeks to timestamp in milliseconds
Sourcetoggle_pause
Toggles between play and pause
Sourcevideo_size
Gets current video width and height in pixels
Sourcevolume
Audio Volume (0 .. 100/200)
Source