User Tools

Site Tools




23.9.8 MediaTagList (

The class represents a list of media tags. A media tag is a piece of information (key-value pair) that consists of a string key and a value and is linked to a multimedia stream.

The class cannot be created and behaves like an array that can only be read.

To read the value assigned to a tag name (key), proceed as follows

Dim hMediaTagList As MediaTagList
Dim vValue As Variant

vValue = hMediaTagList [ TagName As String ] Properties

The MediaTagList class only has this relevant property:

PropertyData typeDescription
TagsString[ ]Reads the list of all tag names and returns them in a string array.

Table : Properties of the MediaTagList class

Note the connection to the Tag event (TagList As MediaTagList) in the MediaPipeline class, which is triggered when metadata is found in the multimedia stream! The TagList argument is the list of tag names found - stored in the string array 'Tags'. Example

With the following source code, you can read the metadata from an audio stream in the tag event and display it in a TextArea:

[1] Public Public Sub hPipeline_Tag(TagList As MediaTagList)
[3] Dim sTag, sTagOrigin As String
[5] For Each sTag In Taglist.Tags
[6] '-- If Upper(sTag) = "TITLE" Then
[7]   sTagOrigin = sTag
[8]   If sTag.Len < 8 Then stag &= "         "
[9]   txaMetadata.Insert("KEY = " & Upper(sTag) & gb.Tab & "| VALUE = " & TagList[sTagOrigin] & gb.NewLine)
[10]   txaMetadata.Pos = txaMetadata.Length
[11] '-- Endif
[12]   Next
[14] End


Figure Display of all metadata in an audio stream


  • In the For-Each control structure in lines 5 to 12, read out all keys and the value for these keys and then display all key-value pairs in a TextArea.
  • The source text in lines 7 and 8 is only used for formatted output.
  • If you use the filter in lines 6 and 11, only the key-value pair for the title is displayed.
The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k23/k23.9/k23.9.8/start.txt · Last modified: 13.01.2024 by emma

Page Tools