mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-01 07:59:19 +02:00
18 lines
573 B
Python
18 lines
573 B
Python
|
import mpv
|
||
|
from loguru import logger
|
||
|
|
||
|
def mpv_log(loglevel, component, message):
|
||
|
if loglevel == 'info':
|
||
|
logger.info(f'{component} {message}')
|
||
|
elif loglevel == 'error':
|
||
|
logger.error(f'{component} {message}')
|
||
|
|
||
|
player = mpv.MPV(log_handler=mpv_log, ytdl=False,
|
||
|
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)
|
||
|
|
||
|
|