Python VLC MediaListPlayer - Getting Current State Last Updated : 11 Apr, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we will see how we can get current state of the MediaListPlayer 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. Media list player is used to play multiple media in a row for example playing a series, instead of taking single media it accepts media list. Its working is almost similar like the MediaPlayer object but it is capable of playing list of media. State can be playing paused or closed, we can pause and resume the media list player any time with the help of set_pause method, and it can be start playing with the help of play method. In order to do this we will use get_state method with the MediaListPlayer object Syntax : media_list_player.get_state() Argument : It takes no argument Return : It returns State object Below is the implementation Python3 # importing vlc module import vlc # importing time module import time # creating a media player object media_player = vlc.MediaListPlayer() # creating Instance class object player = vlc.Instance() # creating a new media list object media_list = player.media_list_new() # creating a new media media = player.media_new("death_note.mkv") # adding media to media list media_list.add_media(media) # setting media list to the media player media_player.set_media_list(media_list) # start playing video media_player.play() # wait so the video can be played for 5 seconds # irrespective for length of video time.sleep(5) # getting media player current state value = media_player.get_state() # printing value print(value) Output : State.Playing Another example Below is the implementation Python3 # importing vlc module import vlc # importing time module import time # creating a media player object media_player = vlc.MediaListPlayer() # creating Instance class object player = vlc.Instance() # creating a new media list media_list = player.media_list_new() # creating a new media media = player.media_new("1.mp4") # adding media to media list media_list.add_media(media) # setting media list to the media player media_player.set_media_list(media_list) # start playing video media_player.play() # wait so the video can be played for 5 seconds # irrespective for length of video time.sleep(5) # getting media player current state value = media_player.get_state() # printing value print(value) Output : State.Playing Comment More infoAdvertise with us Next Article Python VLC MediaPlayer â Getting Current Audio Track R rakshitarora Follow Improve Article Tags : Python Python vlc-mediaPlayer Practice Tags : python Similar Reads Python VLC MediaPlayer - Getting Current State In this article we will see how we can get current state of the MediaPlayer 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. MediaPlayer object is the basic object i 2 min read Python VLC MediaPlayer â Getting Current Subtitle In this article we will see how we can get the current subtitle of the MediaPlayer 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. MediPlyer object is the basic obj 2 min read Python VLC MediaPlayer - Getting Current media time In this article we will see how we can get current media time of the MediaPlayer 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. MediPlyer object is the basic objec 2 min read Python VLC MediaPlayer â Getting Current Audio Track In this article we will see how we can get the current audio track of the MediaPlayer 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. MediPlyer object is the basic 2 min read Python VLC MediaPlayer â Getting Track Count In this article we will see how we can get track count of the MediaPlayer 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. MediPlyer object is the basic object in vl 2 min read Python VLC MediaPlayer - Getting Cursor In this article we will see how we can get the cursor position in the MediaPlayer 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. MediPlyer object is the basic obje 2 min read Like