diff --git a/libnymea/interfaces/extendedmediacontroller.json b/libnymea/interfaces/extendedmediacontroller.json new file mode 100644 index 00000000..1473da78 --- /dev/null +++ b/libnymea/interfaces/extendedmediacontroller.json @@ -0,0 +1,12 @@ +{ + "description": "A more advanced media controller interface, supporting fast forward and rewind", + "extends": "mediacontroller", + "actions": [ + { + "name": "fastRewind" + }, + { + "name": "fastForward" + } + ] +} diff --git a/libnymea/interfaces/interfaces.qrc b/libnymea/interfaces/interfaces.qrc index 5234b210..0ad2c938 100644 --- a/libnymea/interfaces/interfaces.qrc +++ b/libnymea/interfaces/interfaces.qrc @@ -1,7 +1,5 @@ - media.json - mediacontroller.json light.json dimmablelight.json colortemperaturelight.json @@ -12,8 +10,12 @@ weather.json volumecontroller.json extendedvolumecontroller.json + media.json + mediacontroller.json + extendedmediacontroller.json mediametadataprovider.json mediaplayer.json + shufflerepeat.json battery.json batterylevel.json button.json diff --git a/libnymea/interfaces/media.json b/libnymea/interfaces/media.json index 0db3279e..1c432273 100644 --- a/libnymea/interfaces/media.json +++ b/libnymea/interfaces/media.json @@ -1,3 +1,3 @@ { - + "description": "The base for all media interfaces. Client applications might use this to group/filter things supporting media playback/control. When implementing a plugin use mediaplayer or mediacontroller for actual devices." } diff --git a/libnymea/interfaces/mediacontroller.json b/libnymea/interfaces/mediacontroller.json index b10fc903..bf6de865 100644 --- a/libnymea/interfaces/mediacontroller.json +++ b/libnymea/interfaces/mediacontroller.json @@ -1,34 +1,10 @@ { + "description": "The mediacontroller interface contains basic actions to control media streams. If a device supports fast forward and rewind, use extendedmediacontroller instead.", "extends": "media", - "states": [ - { - "name": "mute", - "type": "bool", - "writable": true - }, - { - "name": "volume", - "type": "int", - "minValue": 0, - "maxValue": 100, - "writable": true - }, - { - "name": "playbackStatus", - "type": "QString", - "allowedValues": ["Playing", "Paused", "Stopped"], - "writable": true - } - - ], "actions": [ { "name": "skipBack" }, - { - "name": "rewind" - }, - { "name": "stop" }, { @@ -37,9 +13,6 @@ { "name": "pause" }, - { - "name": "fastForward" - }, { "name": "skipNext" } diff --git a/libnymea/interfaces/mediametadataprovider.json b/libnymea/interfaces/mediametadataprovider.json index 465359bf..f6d9f122 100644 --- a/libnymea/interfaces/mediametadataprovider.json +++ b/libnymea/interfaces/mediametadataprovider.json @@ -1,16 +1,17 @@ { + "description": "Provide media information, meant to be used in combination with mediaplayer. For music players, use collection to provide the album/compilation, for video players fill in the series name or a movie collection name there. Artwork can be a URL to a artwork image.", "extends": "media", "states": [ + { + "name": "title", + "type": "string" + }, { "name": "artist", "type": "string" }, { - "name": "album", - "type": "string" - }, - { - "name": "title", + "name": "collection", "type": "string" }, { diff --git a/libnymea/interfaces/mediaplayer.json b/libnymea/interfaces/mediaplayer.json index 1764c214..a8afe7a1 100644 --- a/libnymea/interfaces/mediaplayer.json +++ b/libnymea/interfaces/mediaplayer.json @@ -1,11 +1,11 @@ { + "description": "Media player interface. Used by devices/services which can play back media.", "extends": "media", "states": [ { "name": "playbackStatus", "type": "string", - "allowedValues": ["Playing", "Paused", "Stopped"], - "writable": true + "allowedValues": ["Playing", "Paused", "Stopped"] }, { "name": "playerType", diff --git a/libnymea/interfaces/shufflerepeat.json b/libnymea/interfaces/shufflerepeat.json new file mode 100644 index 00000000..2f6207e0 --- /dev/null +++ b/libnymea/interfaces/shufflerepeat.json @@ -0,0 +1,14 @@ +{ + "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" + }, + { + "name": "repeat", + "type": "string", + "allowedValues": ["None", "One", "All"] + } + ] +}