Skip to content

2.2.0

Compare
Choose a tag to compare
@4br3mm0rd 4br3mm0rd released this 04 May 21:39
· 3 commits to master since this release
b10e90e

Adds support for events. You can now write callbacks for events by using the new decorators or the subscribe_event function:

player = MPyg123Player()

@player.on(MPyg321Events.ANY_STOP)
def callback(context):
    print("Any stop event occured")

# or 
def my_func(context):
    print("Other event subscribed")

player.subscribe_event(MPyg321Events.ANY_STOP, my_func)