In this article we will see how we can get the media at the given index in the MediaList object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediaList object contains the multiple media, in other words it has list of media which can be used with MediaListPlayer object to play these multiple media object. Multiple media can be added to the media list object with the help of
add_media method, so each media is lying at there respective index in the list.
In order to do this we will use
item_at_indexmethod with the MediaList object
Syntax : media_list.item_at_index(n)
Argument : It takes index as argument
Return : It returns Media object
Below is the implementation
vlc.Media object at 0x00000248E1B42981
vlc.Media object at 0x00000248E1B42988
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.