Finally add node handling, fix ALL THE THINGS

* New node handling
 * Add remaining properties
 * Improve property type handling (no more ynbool!)
 * Add pröper option access
 * Add a whole bunch of tests
This commit is contained in:
jaseg 2016-08-13 19:07:44 +02:00
parent 4d6c17d342
commit de7b671103
4 changed files with 298 additions and 328 deletions

View file

@ -32,9 +32,12 @@ def my_log(loglevel, component, message):
player = mpv.MPV(log_handler=my_log, ytdl=True)
# Property access, these can be changed at runtime
player.observe_property('time-pos', lambda _property, pos: print('Now playing at {:.2f}s'.format(pos)))
player.fullscreen = True
player.loop = 'inf'
# Option access, in general these require the core to reinitialize
player['vo'] = 'opengl'
player.play('https://youtu.be/DLzxrzFCyOs')
player.wait_for_playback()