curl "http://127.0.0.1:9978/media"
没有播放服务、播放器已释放,或读取失败时回传 {}。有资料时回传以下结构;Content-Type 是 text/plain,客户端需自行解析 JSON。
{}
text/plain
/media 回应
{ "state": 3, "speed": 1, "duration": 7200000, "position": 120000, "url": "https://example.com/video.m3u8", "title": "范例项目", "artist": "Demo", "artwork": "https://example.com/poster.jpg" }
state
speed
duration
position
url
title
artist
artwork
需要更多控制能力(canSeek、canSetSpeed、mediaKey)时用 /remote。/media 只提供播放状态快照。
canSeek
canSetSpeed
mediaKey
/media