Skip to content

Latest commit

 

History

History
925 lines (747 loc) · 15.5 KB

APIdocumentation.md

File metadata and controls

925 lines (747 loc) · 15.5 KB

Server endpoint documentation

Get requests


Getting all microphones data

  • Description
    Le client demande la liste de tous les micros ainsi que des données disponibles à leurs sujet.

  • Request

{
  "command": "/microphones/get"
}
  • Response
{
    "statusCode": "integer",
    "message": "string",
    "data": {
        "length": "integer",
        "mics": [
            {
                "isActive": "boolean",
                "level": "integer",
                "micKind": "string",
                "micName": "string",
                "unversionedmicKind": "string",
                "uuid": "string",
            },
            ...
        ]
    }
}


Getting all scenes basic data

  • Description
    Le client demande la liste de toutes les scenes ainsi que des données disponibles à leurs sujet.

  • Request

{
  "command": "/scenes/get"
}
  • Response
{
    "statusCode": "integer",
    "message": "string",
    "data": {
        "length": "integer",
        "scenes": [
            {
                "name": "string",
                "uuid": "string",
            },
            ...
        ]
    }
}


Getting all text fields basic data

  • Description
    Le client demande la liste de tous les champs texte ainsi que certaines données à leurs sujet.
    Les données renvoyées à leur sujet sont les suivantes:

    • Le nom du champ texte (name) - Le nom de la scène à laquelle le champ texte appartient (parent_scene) - L'identifiant unique du champ texte (uuid)
  • Request

{
  "command": "/text-fields/get"
}
  • Response
{
    "statusCode": "integer",
    "message": "string",
    "data": {
        "length": "integer",
        "text_fields": [
            {
                "name": "string",
                "parent_scene": "string",
                "uuid": "string",
            },
            ...
        ]
    }
}


Getting all display sources basic data

  • Description
    Le client demande la liste de toutes les sources affichant un flux d'image ainsi que certaines données à leurs sujet.
    Les données renvoyées à leur sujet sont les suivantes:

    • Le nom de la source d'affichage de flux vidéo (name)
    • Le nom de la scène à laquelle l'élément (parent_scene)
    • L'identifiant unique de l'élément (uuid)
  • Request

{
  "command": "/display-sources/get"
}
  • Response
{
    "statusCode": "integer",
    "message": "string",
    "data": {
        "length": "integer",
        "display_sources": [
            {
                "name": "string",
                "parent_scene": "string",
                "uuid": "string",
            },
            ...
        ]
    }
}


Getting all links between mics and display sources

  • Description
    Le client demande la liste de tous les liens entre microphones et sources visuelles.
    Les données renvoyées à leur sujet sont les suivantes:

    • L'identifiant unique (UUID) du microphone concerné (mic_id)
    • La liste contenant les identifiants uniques des sources visuelles reliées au microphone correspondant au champ mic_id (display_sources_ids)
  • Request

{
  "command": "/mtdsis/get"
}
  • Response
{
    "statusCode": "integer",
    "message": "string",
    "data": {
        "length": "integer",
        "links": [
            {
                "mic_id": "uuid",
                "display_sources_ids": ["uuid", ...],
            },
            ...
        ]
    }
}


Getting action / reaction couples

  • Description
    Récupération des données de toutes les couples actions / réaction enregistrés au niveau du serveur (plugin).

  • Request

{
  "command": "/areas/get"
}
  • Response
{
    "statusCode": "integer",
    "message": "string",
    "data": {
        "length": "integer",
        "actReacts": [
            {
                "actReactId": "integer",
                "isActive": "boolean",
                "action": {
                    "actionId": "integer",
                    "type": "action_type",
                    "params": {
                        ... // Depends on action type
                    }
                },
                "reaction": {
                    "name": "string",
                    "reactionId": "integer",
                    "type": "reaction_type",
                    "params": {
                        ... // Depends on reaction type
                    }
                }
            },
            ... // Next element
        ]
    }
}

Getting subtitles settings

  • Description
    Récupération des paramètres de sous-titrage enregistrés au niveau du serveur (plugin).

  • Request

{
  "command": "/subtitles/get"
}
  • Response
{
    "statusCode": "integer",
    "message": "string",
    "data": {
      "length": "integer",
      "text_fields": [
        {
          "uuid": "string",
          "name": "string",
          "linked_mics": ["MicA", "MicB"]
        },
        ... // Next element
      ]
    }
}

Getting Easystream settings

  • Description
    Récupération des paramètres effectifs du plugin.

  • Request

{
  "command": "/profile/get"
}
  • Response
{
    "statusCode": "integer",
    "message": "string",
    "data": {
        "easystream": {
            "areas": {
                "length": "integer",
                "actReacts": [
                    {
                        "actReactId": "integer",
                        "isActive": "boolean",
                        "action": {
                            "actionId": "integer",
                            "type": "action_type",
                            "params": {
                                ... // Depends on action type
                            }
                        },
                        "reaction": {
                            "name": "string",
                            "reactionId": "integer",
                            "type": "reaction_type",
                            "params": {
                                ... // Depends on reaction type
                            }
                        }
                    },
                    ... // Next element
                ]
            },
            "subtitles": {
                "length": "integer",
                "text_fields": [
                    {
                        "uuid": "string",
                        "name": "string",
                    },
                    ... // Next element
                ]
            },
            "compressors": {
                "length": "integer",
                "mics": [
                    {
                        "micName": "string",
                        "level": "integer",
                        "isActive": "boolean",
                    },
                    ... // Next element
                ]
            }
        },
        "obs": {
            // Coming soon
        }
    }
}

Set requests


Setting compressor strength

  • Description
    Mise à jour de la force d'un compresseur (lié à une entrée audio spécifique).

  • Request

{
    "command": "/microphones/auto-leveler/set",
    "params": {
        "micName": "string",
        "level": "integer",
        "isActive": "boolean",
    }
},
  • Response
{
  "statusCode": "integer",
  "message": "string"
}


Enabling / Disabling subtitles

  • Description
    Activer / Désactiver les sous-titres transcrit de l'entrée d'un microphone spécifique.

  • Request

{
  "command": "/subtitles/set",
  "params": {
    "uuid": "uuid", // Correspondant au textfield d'affichage.
    "linked_mics": ["MicA", "MicB"], // Nom des microphones à partir desquels créer les sous-titres.
    "language": "string" (optional), // IETF language tag, translates transciption to the specified language.
  }
}
  • Response
{
  "statusCode": "integer",
  "message": "string"
}


Link a microphone to several display sources

  • Description
    Créer un lien MTDSIS entre un microphone et une liste de sources visuelles.

  • Request

{
  "command": "/mtdsis/create",
  "params": {
    "mic_id": "uuid",
    "display_sources_ids": ["uuid", ...],
  }
}
  • Response
{
  "statusCode": "integer",
  "message": "string"
}


Setting an action / reaction couple

  • Description
    Mise en place d'un couple action/reaction au niveau du plugin.
    Lorsque l'action est détectée, la réaction est déclenchée automatiquement.

  • Request

{
    "command": "/areas/create",
    "params": {
        "action": {
            "type": "action_type",
            "params": {
                ... // Depends on action type
            }
        },
        "reaction": {
            "name": "string",
            "type": "reaction_type",
            "params": {
                ... // Depends on reaction type
            }
        }
    }
}
  • Response
{
  "statusCode": "integer",
  "message": "string",
  "data": {
    "actionId": "integer",
    "reactionId": "integer",
    "actReactId": "integer"
  }
}

Remove and Update requests

Remove link between a microphone and several display sources

  • Description
    Suppression d'un lien MTDSIS entre un microphone et une liste de sources visuelles.

  • Request

{
  "command": "/mtdsis/remove",
  "params": {
    "mic_id": "uuid"
  }
}

Remove an action / reaction couple

  • Description
    Suppression d'un couple action/reaction au niveau du plugin.

  • Request

{
  "command": "/areas/remove",
  "params": {
    "actReactId": "integer"
  }
}
  • Response
{
  "statusCode": "integer",
  "message": "string",
  "data": {
    "actReactId": "integer"
  }
}


Updating an action

  • Description
    Mise à jour d'une action côté plugin.
    L'action peut changer de type et / ou de paramètres.
    Une fois mise à jour, l'action reste reliée à sa/ses réaction(s).
    Si la requête est invalide, l'action reste inchangée.

  • Request

{
    "command": "/areas/action-update",
    "params": {
        "actionId": "integer",
        "type": "action_type",
        "params": {
            ... // Depends on action type
        }
    }
}
  • Response
{
  "statusCode": "integer",
  "message": "string",
  "data": {
    "actionId": "integer"
  }
}


Update reaction

  • Description
    Mise à jour d'une réaction côté plugin.
    La réaction peut changer de type et / ou de paramètres.
    Une fois mise à jour, la réaction reste reliée à son/ses action(s).
    Si la requête est invalide, l'action reste inchangée.

  • Request

{
    "command": "/areas/reaction-update",
    "params": {
        "name": "string",
        "reactionId": "integer",
        "type": "reaction_type",
        "params": {
            ... // Depends on reaction type
        }
    }
}
  • Response
{
  "statusCode": "integer",
  "message": "string",
  "data": {
    "reactionId": "integer"
  }
}


Broadcast

Subscribe to broadcast

  • Request
{
  "command": "/broadcast/subscribe",
  "params": {
    "enable": "bool"
  }
}
  • Response
{
  "statusCode": "integer",
  "message": "string"
}

Remote changes

Areas Update

{
    "statusCode": 201,
    "message": "BROADCAST",
    "data": {
        "type": "areasChanged",
        "length": "integer",
        "actReacts": [
            {
                "actReactId": "integer",
                "isActive": "boolean",
                "action": {
                    "actionId": "integer",
                    "type": "action_type",
                    "params": {
                        ... // Depends on action type
                    }
                },
                "reaction": {
                    "name": "string",
                    "reactionId": "integer",
                    "type": "reaction_type",
                    "params": {
                        ... // Depends on reaction type
                    }
                }
            },
            ... // Next element
        ]
    },
}

Compressors Update

{
    "statusCode": 201,
    "message": "BROADCAST",
    "data": {
        "type": "compressorSettingsChanged",
        "length": "integer",
        "mics": [
            {
                "micName": "string",
                "level": "integer",
                "isActive": "boolean",
            },
            ... // Next element
        ]
    },
}

Subtitles Update

{
  "statusCode": 201,
  "message": "BROADCAST",
  "data": {
    "type": "subtitlesSettingsChanged",
    "enable": "boolean",
    "language": "string" // IETF language tag
  }
}

OBS: Scene updates

Scene Created

{
  "statusCode": 201,
  "message": "BROADCAST",
  "data": {
    "type": "sceneCreated",
    "name": "string",
    "uuid": "string"
  }
}

Scene Removed

{
  "statusCode": 201,
  "message": "BROADCAST",
  "data": {
    "type": "sceneRemoved",
    "name": "string",
    "uuid": "string"
  }
}

Scene Name Changed

{
  "statusCode": 201,
  "message": "BROADCAST",
  "data": {
    "type": "sceneNameChanged",
    "name": "string",
    "oldName": "string",
    "uuid": "string"
  }
}

OBS: Audio source updates

Audio Source Created

{
  "statusCode": 201,
  "message": "BROADCAST",
  "data": {
    "type": "audioSourceCreated",
    "name": "string",
    "uuid": "string",
    "kind": "string",
    "unversioned_kind": "string"
  }
}

Audio Source Removed

{
  "statusCode": 201,
  "message": "BROADCAST",
  "data": {
    "type": "audioSourceRemoved",
    "name": "string",
    "uuid": "string",
    "kind": "string",
    "unversioned_kind": "string"
  }
}

Audio Source Name Changed

{
  "statusCode": 201,
  "message": "BROADCAST",
  "data": {
    "type": "audioSourceNameChanged",
    "name": "string",
    "oldName": "string",
    "uuid": "string"
  }
}


Actions / Reactions

Actions

Word detection

{
  "type": "WORD_DETECT",
  "params": {
    "words": ["word1", "word2", "..."]
  }
}

Application launch

{
  "type": "APP_LAUNCH",
  "params": {
    "app_name": "app_identifier"
  }
}

Key pressed

{
  "type": "KEY_PRESSED",
  "params": {
    "key": "key_identifier"
  }
}

Reactions

Scene switch

{
  "type": "SCENE_SWITCH",
  "params": {
    "name": "scene_name", // Not necessary for SET or UPDATE requests
    "uuid": "scene_unique_identifier"
  }
}

Toggle audio compressor

{
  "type": "TOGGLE_AUDIO_COMPRESSOR",
  "params": {
    "audio-source": "audio_source_identifier",
    "toggle": "bool"
  }
}

Start/Stop recording

{
  "type": ["START_REC", "STOP_REC"], // One of ...
  "params": {
    "delay": "int" // In seconds
  }
}

Start/Stop streaming

{
  "type": ["START_STREAM", "STOP_STREAM"], // One of ...
  "params": {
    "delay": "int" // In seconds
  }
}



Lexique

MTDSIS

Acronyme de "Mic To Display Sources Intelligent Switch".
Méchanisme de changement d'affichage des sources visuelles en fonction du microphone le plus actif.