summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2020-01-24 12:23:04 +0100
committerjaseg <code@jaseg.net>2020-01-24 12:23:04 +0100
commitc1df201b26bb1481e273bbb5043d483106ede191 (patch)
tree66e2a5b9bb5b5cd8c79465aae21afb5a058ff5dd /README.rst
parentfc775920def39309b1debedfb42045eacdb5db6d (diff)
downloadpython-mpv-c1df201b26bb1481e273bbb5043d483106ede191.tar.gz
python-mpv-c1df201b26bb1481e273bbb5043d483106ede191.tar.bz2
python-mpv-c1df201b26bb1481e273bbb5043d483106ede191.zip
README: Add info on GUI modes
Closes #102
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index c78a196..6856fad 100644
--- a/README.rst
+++ b/README.rst
@@ -158,6 +158,27 @@ Directly feeding mpv data from python
player.play('python://foo')
player.wait_for_playback()
+Using MPV's built-in GUI
+........................
+
+python-mpv is using mpv via libmpv. libmpv is meant for embedding into other applications and by default disables most
+GUI features such as the OSD or keyboard input. To enable the built-in GUI, use the following options when initializing
+the MPV instance. See `Issue 102`_ for more details
+
+.. _`issue 102`: https://github.com/jaseg/python-mpv/issues/61
+
+.. code:: python
+
+ # Enable the on-screen controller and keyboard shortcuts
+ player = mpv.MPV(input_default_bindings=True, input_vo_keyboard=True, osc=True)
+
+ # Alternative version using the old "floating box" style on-screen controller
+ player = mpv.MPV(player_operation_mode='pseudo-gui',
+ script_opts='osc-layout=box,osc-seekbarstyle=bar,osc-deadzonesize=0,osc-minmousemove=3',
+ input_default_bindings=True,
+ input_vo_keyboard=True,
+ osc=True)
+
PyQT embedding
..............