-
-
Notifications
You must be signed in to change notification settings - Fork 4
libvlc.PlayList.Operator_Subscript
Andrew Lambert edited this page Nov 26, 2022
·
3 revisions
Function Operator_Subscript(Index As Integer) As libvlc.Medium
Sub Operator_Subscript(Index As Integer, Assigns NewMedia As libvlc.Medium)
Gets and sets the Medium at index
in the PlayList. If there is no item at Index
then an OutOfBoundsException will be raised.
Operator_Subscript
is invoked when you use array-access syntax on an instance of a class. For example, in the expression SomeObject(1)
, the subscript is (1)
.
This example adds two media streams to the playlist and then swaps their order in the list:
Dim list As New libvlc.PlayList
list.Append("http://www.example.com/movie1.mp4")
list.Append(GetFolderItem("C:\example\movie2.avi"))
' swap playlist items using array syntax
Dim tmp As libvlc.Medium = list(1)
list(1) = list(0)
list(0) = tmp
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2016-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.
Entry-level points of interest denoted by "☜"