In this article we will see how we can remove the specific media through 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. Inserting means we can add media at given index, it can be inserted with the help of
insert_media method and we can add media to media list with the help of
In order to do this we will use
remove_mediamethod with the MediaList object
Syntax : media_list.remove_media(index)
Argument : It takes index as argument
Return : It returns 0 on success, -1 if the media list is read-only
Below is the implementation
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.