mirror of https://github.com/nymea/nymea.git
Merge PR #356: Simplify and extend media interfaces
commit
16c7ff42c0
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"description": "A more advanced media controller interface, supporting fast forward and rewind",
|
||||
"extends": "mediacontroller",
|
||||
"actions": [
|
||||
{
|
||||
"name": "fastRewind"
|
||||
},
|
||||
{
|
||||
"name": "fastForward"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"extends": "media",
|
||||
"states": [
|
||||
{
|
||||
"name": "mute",
|
||||
"type": "bool",
|
||||
"writable": true
|
||||
},
|
||||
{
|
||||
"name": "volume",
|
||||
"type": "int",
|
||||
"minValue": 0,
|
||||
"maxValue": 100,
|
||||
"writable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -18,13 +18,10 @@
|
|||
<file>notifications.json</file>
|
||||
<file>weather.json</file>
|
||||
<file>volumecontroller.json</file>
|
||||
<file>extendedvolumecontroller.json</file>
|
||||
<file>media.json</file>
|
||||
<file>mediacontroller.json</file>
|
||||
<file>extendedmediacontroller.json</file>
|
||||
<file>mediametadataprovider.json</file>
|
||||
<file>mediaplayer.json</file>
|
||||
<file>shufflerepeat.json</file>
|
||||
<file>battery.json</file>
|
||||
<file>batterylevel.json</file>
|
||||
<file>button.json</file>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,40 @@
|
|||
{
|
||||
"description": "The mediacontroller interface contains basic actions to control media streams. If a device supports fast forward and rewind, use extendedmediacontroller instead.",
|
||||
"description": "The mediacontroller interface contains actions to control media streams.",
|
||||
"extends": "media",
|
||||
"states": [
|
||||
{
|
||||
"name": "shuffle",
|
||||
"type": "bool",
|
||||
"writable": true,
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "repeat",
|
||||
"type": "QString",
|
||||
"allowedValues": ["None", "One", "All"],
|
||||
"writable": true,
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "like",
|
||||
"type": "bool",
|
||||
"writable": true,
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "equalizerPreset",
|
||||
"type": "QString",
|
||||
"allowedValues": "any",
|
||||
"writable": true,
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "nightMode",
|
||||
"type": "bool",
|
||||
"writable": true,
|
||||
"optional": true
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"name": "skipBack"
|
||||
|
|
@ -16,6 +50,14 @@
|
|||
},
|
||||
{
|
||||
"name": "skipNext"
|
||||
},
|
||||
{
|
||||
"name": "fastForward",
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "fastRewind",
|
||||
"optional": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"description": "Media player interface. Used by devices/services which can play back media.",
|
||||
"description": "Media player interface. Used by devices/services which can play back media. Even if a device only supports e.g. audio, the playerType state must still be added to the metadata. It may default to a single value and never change in this case. Players supporting duration and play time should provide those values in seconds.",
|
||||
"extends": "media",
|
||||
"states": [
|
||||
{
|
||||
|
|
@ -11,6 +11,25 @@
|
|||
"name": "playerType",
|
||||
"type": "QString",
|
||||
"allowedValues": ["audio", "video"]
|
||||
},
|
||||
{
|
||||
"name": "inputSource",
|
||||
"type": "QString",
|
||||
"allowedValues": "any",
|
||||
"writable": true,
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "playDuration",
|
||||
"type": "uint",
|
||||
"unit": "Seconds",
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "playTime",
|
||||
"type": "uint",
|
||||
"unit": "Seconds",
|
||||
"optional": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"description": "Devices/services supporting this interface can control reproduction flow. E.g. a media controller, but could also be used by light scenes or other workflows",
|
||||
"states": [
|
||||
{
|
||||
"name": "shuffle",
|
||||
"type": "bool",
|
||||
"writable": true
|
||||
},
|
||||
{
|
||||
"name": "repeat",
|
||||
"type": "QString",
|
||||
"allowedValues": ["None", "One", "All"],
|
||||
"writable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,33 +1,28 @@
|
|||
{
|
||||
"desciption": "A volume controller allows to control volume and mute. At the very least, increaseVolume and decreaseVolume are to be implemented for devices that don't have a way to fetch the current volume. For devices allowing to set an absolute volume value, the volume and mute states should be implemented as well.",
|
||||
"extends": "media",
|
||||
"states": [
|
||||
{
|
||||
"name": "mute",
|
||||
"type": "bool",
|
||||
"writable": true,
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "volume",
|
||||
"type": "int",
|
||||
"minValue": "any",
|
||||
"maxValue": "any",
|
||||
"writable": true,
|
||||
"optional": true
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"name": "increaseVolume",
|
||||
"params": [
|
||||
{
|
||||
"name": "step",
|
||||
"type": "int"
|
||||
}
|
||||
]
|
||||
"name": "increaseVolume"
|
||||
},
|
||||
{
|
||||
"name": "decreaseVolume",
|
||||
"params": [
|
||||
{
|
||||
"name": "step",
|
||||
"type": "int"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "setMute",
|
||||
"params": [
|
||||
{
|
||||
"name": "mute",
|
||||
"type": "bool"
|
||||
}
|
||||
|
||||
]
|
||||
"name": "decreaseVolume"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue