@@ -11,7 +11,8 @@ This tool adds SMTC feature to mpv player, it communicates with mpv by named pip
1111- Media controls (play/pause, prev, next)
1212
1313## Usage
14- Put ` notify_media.lua ` in mpv's ` scripts ` directory and make sure ` MPVMediaControl ` is running in background.
14+ Put ` notify_media.lua ` in mpv's ` scripts ` directory and change path in the script to the real path of ` MPVMediaControl.exe ` .
15+ A ` Reset SMTC ` item in menu will reset the state of SMTC, useful when Windows is glitched and controls are not working properly.
1516
1617## Protocol
1718This tool listens on a named pipe called ` mpvmcsocket ` , and receives commands through this protocol:
2728
2829### Commands
2930- ` setFile ` : set currently playing file
31+ - ` setShot ` : set screenshot file path
3032- ` setState ` : set player state (playing or not)
3133- ` setQuit ` : notify the tool that player has quit, and the SMTC should be cleared
3234
3739 - ` title={hexString} ` : the title of the media file
3840 - ` artist={hexString} ` : the artist of the media file, music files only. The value can be empty.
3941 - ` path={hexString} ` : the path of the media file
42+ - ` type={music,video,image} ` : the type of the media file
43+ - Parameters for ` setShot `
4044 - ` shot_path={hexString} ` : the path of the thumbnail image file. The value can be empty.
41-
42- The ` hexString ` mentioned above means the original string should be encoded to hex, e.g. ` Hello <=> 48656C6C6F `
45+
46+ The ` hexString ` mentioned above means the original string should be encoded to hex, e.g. ` Hello <=> 48656C6C6F `
4347- Parameters for ` setState `
4448 - ` playing={bool} ` : if the media is being played, ` true ` for playing, ` false ` for pausing
4549- Parameters for ` setQuit `
0 commit comments