# Phantom Plugin

## WebSocket UI messages

Message structure and example data.

### Audio Control (in)
```json
{
  "audio_control": {
    "enable": true,
  }
}
```

### Video Boxes (for WebView) (in)
```json
{
  "video_boxes": [
    {
      "id": "video_1",
      "left": 0,
      "top": 0,
      "width": 0,
      "height": 0,
      "fill_mode": "best",
      "horizontal_alignment": "center",
      "vertical_alignment": "center",
      "z": 0,
      "hidden": false
    }
  ]
}
```

### Video Sizes (out)
```json
{
    "videos": [
        {
            "id": "video_1",
            "width": 1280,
            "height": 720
        },
        {
            "id": "video_2",
            "width": 1280,
            "height": 720
        },
        {
            "id": "video_3",
            "width": 1280,
            "height": 720
        }
    ]
}
```

### Video Placements (for Virtual Webcam) (out)
```json
{
    "virtual_webcam_placements": [
        {
            "id": "video_1",
            "width": 1280,
            "height": 720,
            "left": 0,
            "top": 0,
            "rotation_deg": 0,
            "webcam_name": "Oden Virtual Webcam 1"
        },
        {
            "id": "video_2",
            "width": 1280,
            "height": 720,
            "left": 1280,
            "top": 0,
            "rotation_deg": 0,
            "webcam_name": "Oden Virtual Webcam 1"
        },
        {
            "id": "video_3",
            "width": 1280,
            "height": 720,
            "left": 2560,
            "top": 0,
            "rotation_deg": 0,
            "webcam_name": "Oden Virtual Webcam 1"
        }
    ]
}
```