-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSmartControl.json
More file actions
130 lines (130 loc) · 4.03 KB
/
SmartControl.json
File metadata and controls
130 lines (130 loc) · 4.03 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"$schema": "https://raw.githubusercontent.com/rdkcentral/rdkservices/main/Tools/json_generator/schemas/interface.schema.json",
"jsonrpc": "2.0",
"info": {
"title": "SmartControl API",
"class": "SmartControl",
"description": "The `SmartControl` plugin will manage & control volume for STB & Smart TVs"
},
"common": {
"$ref": "../common/common.json"
},
"definitions": {
"audioPort0": {
"summary": "Audio port name.",
"type": "string",
"example": "HDMI0"
},
"audioPort1": {
"summary": "Audio port name (`HDMI0`, `SPEAKER0`, `SPDIF0`, and so on). The default port is `HDMI0` if no port is specified.",
"default": "HDMI0",
"type": "string",
"example": "SPEAKER0"
},
"level": {
"summary": "Value between 0 and 10, where 0 means no level and 10 means maximum level.",
"type": "integer",
"example": 9
},
"muted": {
"summary": "Mute or unmute audio.",
"type": "boolean",
"example": true
},
"portName": {
"summary": "Video port name.",
"type": "string",
"example": "HDMI0"
},
"volumeLevel": {
"summary": "Value between 0 and 100, where 0 means no level and 100 means maximum level.",
"type": "number",
"example": 50
}
},
"methods": {
"getVolumeThresholdLevel": {
"summary": "Returns the current volume level.",
"params": {
"type": "object",
"properties": {
"audioPort": {
"$ref": "#/definitions/audioPort1"
}
}
},
"result": {
"type": "object",
"properties": {
"volumeLevel": {
"$ref": "#/definitions/volumeLevel"
},
"success": {
"$ref": "#/common/success"
}
},
"required": [
"volumeLevel",
"success"
]
}
},
"setVolumeThresholdLevel": {
"summary": "Adjusts the volume level on a specific port.",
"events": {
"volumeLevelChanged": "Triggered when the volume level changes."
},
"params": {
"type": "object",
"properties": {
"audioPort": {
"$ref": "#/definitions/audioPort1"
},
"volumeLevel": {
"$ref": "#/definitions/volumeLevel"
}
},
"required": [
"volumeLevel"
]
},
"result": {
"$ref": "#/common/result"
}
}
},
"events": {
"muteStatusChanged": {
"summary": "Triggered when the mute status changes.",
"params": {
"type": "object",
"properties": {
"muted": {
"summary": "Mute status value.",
"type": "boolean",
"example": true
}
},
"required": [
"muted"
]
}
},
"volumeLevelChanged": {
"summary": "Triggered when the volume level changes.",
"params": {
"type": "object",
"properties": {
"volumeLevel": {
"summary": "Volume level.",
"type": "integer",
"example": 10
}
},
"required": [
"volumeLevel"
]
}
}
}
}