From de7b6711035a187492f9753fc8808d9c2ad1dd55 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 13 Aug 2016 19:07:44 +0200 Subject: Finally add node handling, fix ALL THE THINGS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * New node handling * Add remaining properties * Improve property type handling (no more ynbool!) * Add pröper option access * Add a whole bunch of tests --- README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index bbdac86..2a3b61c 100644 --- a/README.md +++ b/README.md @@ -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() -- cgit