No description
- JavaScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| scripts | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
hana-mpv-scripts
An mpv JavaScript script that handles a custom hana:// protocol and loads media from a remote playlist JSON.
Installation
Copy this folder into your mpv scripts directory.
Common locations:
- Linux:
~/.config/mpv/scripts/ - macOS:
~/Library/Application Support/mpv/scripts/ - Windows:
%APPDATA%\\mpv\\scripts\\
The script currently depends on curl being available in your system environment.
Usage
The script accepts either of these equivalent forms:
hana://<playlist-url>:<video-id>
https://hana/<playlist-url>:<video-id>
hana://<playlist-name>:<video-id>
https://hana/<playlist-name>:<video-id>
Examples:
mpv 'hana://https://example.com/playlist.json:6'
mpv 'https://hana/https://example.com/playlist.json:6'
mpv 'hana://playlist:6'
mpv 'https://hana/playlist:6'
<playlist-url> is the remote JSON playlist file.
<video-id> is matched against videos[].id in the playlist.
<playlist-name> is resolved as <base-url><playlist-name>.json.
When the selected video entry contains extra resources, the script will also:
- add external audio tracks and subtitles
- load danmaku data
Controls
Alt+j: toggle danmaku on or off
Notes
- Default playlist base URL:
https://example.com/ - Remote playlist fetching currently depends on
curlbeing available on the system - The danmaku renderer is inspired by
uosc_danmaku: https://github.com/Tony15246/uosc_danmaku