From c1df201b26bb1481e273bbb5043d483106ede191 Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 24 Jan 2020 12:23:04 +0100 Subject: README: Add info on GUI modes Closes #102 --- README.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 .............. -- cgit