def seek_relative(seconds): current = player.get_position() current += seconds * 1000 current = min(player.song("~#length") * 1000 -1, current) current = max(0, current) player.seek(current)
def on_started(player, song): assert player.get_position() == 0 player.seek(100)