thank you for your attention! I want to pause and/or resume audio which is being played at the background using python, found this way, which uses pynput
:
from pynput.keyboard import Controller, Key
c = Controller()
c.press(Key.media_play_pause)
But audio is still playing. Seems there are no errors, but it doesn't work.