1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# QuickMedia Video Player
The video player internally used by QuickMedia. Uses libmpv.\
The video player window is embedded inside QuickMedia and QuickMedia and this video player communicate over a file descriptor (socketpair) using json (json without newline formatting; one command per line).
# IPC commands
## time-pos
Return seeking position in file in seconds
### request
```
{
"command": "time-pos",
"request_id": 232 // Optional
}
```
### response on success
```
{
"status": "success",
"data": 112.432,
"request_id": 232, // Optional. Its provided if request_id was provided in the request
}
```
## duration
Return duration of file in seconds
### request
```
{
"command": "duration",
"request_id": 232 // Optional
}
```
### response on success
```
{
"status": "success",
"data": 112.432,
"request_id": 232, // Optional. Its provided if request_id was provided in the request
}
```
## sub-add
Add a subtitle file/url that is loaded asynchronously
### request
```
{
"command": "sub-add",
"data": {
"file": "path/to/file/or/url",
"title": "title", // Optional
"language": "en_us" // Optional
},
"request_id": 233 // Optional
}
```
### response on success
```
{
"status": "success",
"request_id": 233 // Optional. Its provided if request_id was provided in the request
}
```
## cycle-fullscreen
Return seeking position in file in seconds
### request
```
{
"command": "cycle-fullscreen",
"request_id": 232 // Optional
}
```
### response on success
```
{
"status": "success",
"request_id": 232, // Optional. Its provided if request_id was provided in the request
}
```
## Response on error in every command
```
{
"status": "error",
"message": "error message",
"request_id": 233 // Optional. Its provided if request_id was provided in the request
}
```
# IPC event
```
{
"event": "file-loaded",
"args": [] // A list of strings
}
```
|