Skip to content

libvlc.VLCPlayer

Andrew Lambert edited this page Nov 2, 2021 · 33 revisions

libvlc.VLCPlayer

Class Declaration

 Global Class VLCPlayer
 Inherits VLCInstance

Remarks

This class wraps the Media Player API. All playback is ultimately performed by a VLCPlayer instance, which can be accessed through the TruePlayer property on the appropriate class (e.g. VLCMediaPlayer.TruePlayer, ListPlayer.TruePlayer)

There is no GUI shown unless you attempt to play a video. Call EmbedWithin to embed the video output in any window or control. Playing a video without embedding the player will display the output in a new window.

Media playback occurs asynchronously on a separate (OS-level) thread.

Basic use

Create a new instance, then use the Media method to specify the media file or URL to be played. Media accepts a FolderItem or String containing a fully-qualified URL.

Playback occurs asynchronously on a separate thread. This example uses a loop to detect when the player has stopped playing (due to error, end of file, or Stop command):

  Dim player As New VLCPlayer
  player.Media = GetOpenFolderItem(MediaFileTypes.All)
  If Not player.Play() Then
    Call MsgBox("Unable to begin playback!", 16, "Media error")
  End If

Event Definitions

Methods

Properties

Shared Methods

See also

Clone this wiki locally