RealtimeKit でコンポジット録画を実装する方法を説明します。
このガイドを始める前に、RealtimeKit を始める を読んで、RealtimeKit に慣れておくことをおすすめします。
RealtimeKit REST API に慣れるには、RealtimeKit REST API を参照してください。
RealtimeKit ミーティングの録画を開始する方法は 3 つあります。
- ミーティングの作成 時に
record_on_startフラグを使う - Start Recording API を使う
- SDK のクライアント側で録画を開始するメソッドを使う
RealtimeKit は録画を 7 日間保存します。その後は期限切れになり、アクセスできなくなります。リンクが切れる前に、録画のコピーをダウンロードするか、ストレージを設定 してください。
ミーティングの作成 時に record_on_start パラメーターを指定すると、誰かが参加した時点で録画を開始できます。
record_on_start パラメーターを指定します。このフラグが true の場合、RealtimeKit でミーティングが始まった時点、つまり最初の参加者が参加した時点で録画が開始されます。
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/<app_id>/meetings' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <api_token>' \
--data '{
"title": "Lorem Ipsum",
"record_on_start": true
}'{
"success": true,
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"record_on_start": true,
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z"
}
}Start Recording API でも録画を開始できます。
録画したいミーティングの meeting ID を指定します。
ミーティング ID を取得するには、アプリの List meetings API または Create a meeting API を使います。API は id というパラメーターを返します。これがミーティング ID です。
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/<app_id>/recordings' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <api_token>' \
--data '{
"meeting_id": "97440c6a-140b-40a9-9499-b23fd7a3868a"
}'{
"success": true,
"data": {
"id": "97440c6a-140b-40a9-9499-b23fd7a3868a",
"download_url": "http://example.com",
"download_url_expiry": "2025-08-24T14:15:22Z",
"download_audio_url": "http://example1.com",
"file_size": 0,
"session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82",
"output_file_name": "string",
"status": "INVOKED",
"invoked_time": "2025-08-24T14:15:22Z",
"started_time": "2025-08-24T14:15:22Z",
"stopped_time": "2025-08-24T14:15:22Z",
"storage_config": {
"type": "cloudflare",
"secret_key": "string",
"bucket": "string",
"path": "string"
}
}
}