'libvlc / python how to make the VLC player instance "always on top"?

I am using libvlc to control a vlc isntance from python and it works well. The option I can not found though is "always on top". I can set it through the menu of the mini instance. But I d like to set it from the code. Any idea? Thanks

import time, vlc

method to play video

def video2(source): # creating vlc media player object media_player = vlc.MediaPlayer()

# media object
media = vlc.Media(source)

# setting media to the media player
media_player.set_media(media)

# setting video scale
media_player.video_set_scale(0.6)
media_player.audio_set_mute(True)
# setting play rate
# doubles the speed of the video
media_player.set_rate(1.5)
# start playing video
media_player.play()

# wait so the video can be played for 5 seconds
# irrespective for length of video
time.sleep(5)
return media_player


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source