Skip to content

libvlc.PlayList

Andrew Lambert edited this page Oct 31, 2021 · 4 revisions

libvlc.PlayList

Class Declaration

 Protected Class PlayList
 Inherits libvlc.VLCInstance

Remarks

This class represents an ordered array of Medium objects. It overloads the array-access operators allowing you to treat it as if it were an actual array type:

  Dim list As New libvlc.PlayList
  ' build the list
  list.Append("https://example.com/music.mp3")
  list.Append(GetFolderItem("C:\example\video.mp4"))
  list.Append("dvd:///Z:/")
  
  ' swap the first and last items
  Dim tmp As libvlc.Medium = list(0)
  list(0) = list(list.Count - 1)
  list(list.Count - 1) = tmp
  
  ' remove the second item in the list
  list.Remove(1)
  
  ' insert an item at a specific index, shifting the rest of the list down by 1
  list.Insert(0, "mms://192.168.1.1:1234/foo/stream")
  
  ' sort the array by Title
  list.Sort()
  
  ' sort the array by some other metadata type
  list.Sort(libvlc.MetaDataType.Rating)
  
  ' randomize the list
  list.Shuffle()
  
  ' empty the list
  ReDim list(-1)

Methods

Properties

Shared methods

See also

Clone this wiki locally