-
Notifications
You must be signed in to change notification settings - Fork 2
Experimental API
CherryRenderer has an experimental API that can be used instead of UPnP. However, as of this writing, you would still need to use UPnP's SSDP multicast in order to search for CherryRenderer's IP address.
Starting from version 2.0.2, the experimental API is disabled by default and must be enabled via Preferences - Advanced - Experimental API
.
Standard UPnP SSDP multicast with the search target ST: urn:schemas-upnp-org:service:AVTransport:1
. Filter via ModelName CherryRenderer
in case there are multiple AVTransport devices such as Smart TVs.
The API's default port is 54325
while the fallback port is 54326
in case default port is unavailable.
GET /isAlive
{"isAlive": true}
GET /currentlyPlaying
{
"video": {
"uri": "",
"title": ""
},
"status": "STOPPED",
"currentTime": 0,
"totalTime": 0,
"mute": false,
"volume": 100
}
status
will be one of the following values:
-
STOPPED
- Player has stopped and no video is currently playing -
TRANSITIONING
- Player is currently loading a new video -
PLAYING
- Video is playing -
PAUSE
- Video is paused
POST endpoints (and error messages) will always respond with the following payload format:
{
"code": 200,
"description": "OK",
"message": ""
}
Key | Description | Example |
---|---|---|
code |
HTTP response code | 200, 404, 405 |
description |
Description of response code | "OK", "Not Found", "Method Not Allowed" |
message |
Error message (when available) | "No videos found from payload" |
POST /play
{
"videos":[
{
"uri": "https://video.com/video.mp4",
"title": "Video (Episode 3).mp4"
}
]
}
POST /togglePause
POST /stop
POST /seek
{
"targetTime": 120
}
targetTime
must be between 0 and the totalTime
of the currently playing video.
POST /toggleMute
POST /setVolume
{
"targetVolume": 50
}
targetVolume
must be between 0 and 100.