本文へスキップ
すべてのツール

screen_record_start

画面、ウインドウ、UI · macOS

効果: 書き込み. 状態: 条件付き提供.

「条件付き提供」は、バージョン、プラットフォーム、権限、アカウント、設定に依存する可能性を示し、すべての環境で有効という意味ではありません。

macOS

目的

ディスプレイ、ウィンドウ、または領域の画面収録(ScreenCaptureKit)を開始します。v1 ではアクティブなセッションは 1 つだけで、2 回目の開始は already_recording を返します。record_marker と screen_record_stop で使う session_id を返します。画面収録の権限が必要で、権限がない場合は何もせず終わるのではなく、明示的な permission_required エラーを返します。最初の呼び出しはプレビューで、confirm: true で収録を開始します。

必須入力

入力名はツールが要求する正確な形式のままです。英語の正規技術定義は下の展開可能なスキーマにあります。

権限と確認

スキーマには明示的な確認パラメータがあります。プレビューを確認し、プラットフォーム契約に従って実操作を承認してください。

英語の正規技術スキーマ — macOS
{
  "properties": {
    "confirm": {
      "description": "Must be true to start recording. Without it the call returns a preview and captures nothing.",
      "type": "boolean"
    },
    "fps": {
      "description": "Frames per second (default 60).",
      "type": "integer"
    },
    "output_path": {
      "description": "Where to write the .mov (default: temp file, returned by stop). Missing parent folders are created.",
      "type": "string"
    },
    "show_cursor": {
      "description": "Default true.",
      "type": "boolean"
    },
    "target": {
      "description": "What to capture.",
      "properties": {
        "display_id": {
          "description": "Required if kind=display.",
          "type": "string"
        },
        "kind": {
          "enum": [
            "display",
            "window",
            "region"
          ],
          "type": "string"
        },
        "region": {
          "description": "Required if kind=region: {x,y,w,h} global points.",
          "type": "object"
        },
        "window_id": {
          "description": "Required if kind=window.",
          "type": "string"
        }
      },
      "required": [
        "kind"
      ],
      "type": "object"
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}

ドキュメント例

screen_record_start のドキュメント例です。この例は実行しないでください。表示される引数は架空のデータセットに属します。実際に呼び出す前に実在する識別子を確認し、承認を得てください。

{
  "confirm": false,
  "target": {
    "display_id": "1",
    "kind": "display"
  }
}