jaseg / python-mpv

Python interface to the awesome mpv media player
https://git.jaseg.de/python-mpv.git
Other
547 stars 68 forks source link

Question. Embedding the player in an application #42

Closed jmoraleda closed 7 years ago

jmoraleda commented 7 years ago

Hello, I have been testing python-mpv for a project. Thank you for creating it!. I would like to create a wxPython (phoenix) widget to encapsulate the play window and be able to display that window as part of a larger application, but have not figured out how to tell python-mpv to open the player inside an existing window rather than on its own window. Is this possible with python-mpv? I am in Linux. Could you post an example on how to pass the window handle? Thank you again.

jaseg commented 7 years ago

Have a look at the upstream doc. The easiest way would be to pass the wid option to the MPV constructor. The OpenGL API is wrapped in python-mpv, but there is no high-level support for it.

jaseg commented 7 years ago

Also, maybe have a look at this

jmoraleda commented 7 years ago

Thank you. Setting the wid option works. Before I was passing wid as an int instead of a str and that is why the player would not open embedded.