88
99import httpx
1010
11- from ..._types import Body , Omit , Query , Headers , NoneType , NotGiven , omit , not_given
11+ from ..._types import Body , Omit , Query , Headers , NotGiven , SequenceNotStr , omit , not_given
1212from ..._utils import path_template , maybe_transform , async_maybe_transform
1313from ..._compat import cached_property
1414from ..._resource import SyncAPIResource , AsyncAPIResource
2929from ...types .realtime_kit .recording_start_recordings_response import RecordingStartRecordingsResponse
3030from ...types .realtime_kit .recording_get_one_recording_response import RecordingGetOneRecordingResponse
3131from ...types .realtime_kit .recording_get_active_recordings_response import RecordingGetActiveRecordingsResponse
32+ from ...types .realtime_kit .recording_start_track_recording_response import RecordingStartTrackRecordingResponse
3233from ...types .realtime_kit .recording_pause_resume_stop_recording_response import (
3334 RecordingPauseResumeStopRecordingResponse ,
3435)
@@ -392,22 +393,22 @@ def start_track_recording(
392393 app_id : str ,
393394 * ,
394395 account_id : str ,
395- layers : Dict [str , recording_start_track_recording_params .Layers ],
396396 meeting_id : str ,
397- max_seconds : float | Omit = omit ,
397+ layers : Dict [str , recording_start_track_recording_params .Layers ] | Omit = omit ,
398+ user_ids : SequenceNotStr [str ] | Omit = omit ,
398399 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
399400 # The extra values given here take precedence over values defined on the client or passed to this method.
400401 extra_headers : Headers | None = None ,
401402 extra_query : Query | None = None ,
402403 extra_body : Body | None = None ,
403404 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
404- ) -> None :
405- """Starts a track recording in a meeting.
405+ ) -> RecordingStartTrackRecordingResponse :
406+ """Starts track recording for a meeting.
406407
407- Track recordings consist of "layers".
408- Layers are used to map audio/video tracks in a meeting to output destinations.
409- More information about track recordings is available in the
410- [Track Recordings Guide Page](https://docs. realtime.cloudflare.com/guides/capabilities/ recording/recording-overview ).
408+ Track recording currently records separate
409+ participant audio tracks as WebM files in the RealtimeKit bucket. Video track
410+ recording is in development. For more information, refer to
411+ [Track recording](/ realtime/realtimekit/ recording-guide/track-recording/ ).
411412
412413 Args:
413414 account_id: The account identifier tag.
@@ -416,7 +417,11 @@ def start_track_recording(
416417
417418 meeting_id: ID of the meeting to record.
418419
419- max_seconds: Maximum seconds this recording should be active for (beta)
420+ layers: Optional audio layer configuration. If omitted, RealtimeKit records all
421+ participant audio using the default file name prefix.
422+
423+ user_ids: Optional list of participant user IDs to record. Selective track recording
424+ (`user_ids`) is in early beta contact support to use this feature.
420425
421426 extra_headers: Send extra headers
422427
@@ -430,23 +435,22 @@ def start_track_recording(
430435 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
431436 if not app_id :
432437 raise ValueError (f"Expected a non-empty value for `app_id` but received { app_id !r} " )
433- extra_headers = {"Accept" : "*/*" , ** (extra_headers or {})}
434438 return self ._post (
435439 path_template (
436440 "/accounts/{account_id}/realtime/kit/{app_id}/recordings/track" , account_id = account_id , app_id = app_id
437441 ),
438442 body = maybe_transform (
439443 {
440- "layers" : layers ,
441444 "meeting_id" : meeting_id ,
442- "max_seconds" : max_seconds ,
445+ "layers" : layers ,
446+ "user_ids" : user_ids ,
443447 },
444448 recording_start_track_recording_params .RecordingStartTrackRecordingParams ,
445449 ),
446450 options = make_request_options (
447451 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
448452 ),
449- cast_to = NoneType ,
453+ cast_to = RecordingStartTrackRecordingResponse ,
450454 )
451455
452456
@@ -806,22 +810,22 @@ async def start_track_recording(
806810 app_id : str ,
807811 * ,
808812 account_id : str ,
809- layers : Dict [str , recording_start_track_recording_params .Layers ],
810813 meeting_id : str ,
811- max_seconds : float | Omit = omit ,
814+ layers : Dict [str , recording_start_track_recording_params .Layers ] | Omit = omit ,
815+ user_ids : SequenceNotStr [str ] | Omit = omit ,
812816 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
813817 # The extra values given here take precedence over values defined on the client or passed to this method.
814818 extra_headers : Headers | None = None ,
815819 extra_query : Query | None = None ,
816820 extra_body : Body | None = None ,
817821 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
818- ) -> None :
819- """Starts a track recording in a meeting.
822+ ) -> RecordingStartTrackRecordingResponse :
823+ """Starts track recording for a meeting.
820824
821- Track recordings consist of "layers".
822- Layers are used to map audio/video tracks in a meeting to output destinations.
823- More information about track recordings is available in the
824- [Track Recordings Guide Page](https://docs. realtime.cloudflare.com/guides/capabilities/ recording/recording-overview ).
825+ Track recording currently records separate
826+ participant audio tracks as WebM files in the RealtimeKit bucket. Video track
827+ recording is in development. For more information, refer to
828+ [Track recording](/ realtime/realtimekit/ recording-guide/track-recording/ ).
825829
826830 Args:
827831 account_id: The account identifier tag.
@@ -830,7 +834,11 @@ async def start_track_recording(
830834
831835 meeting_id: ID of the meeting to record.
832836
833- max_seconds: Maximum seconds this recording should be active for (beta)
837+ layers: Optional audio layer configuration. If omitted, RealtimeKit records all
838+ participant audio using the default file name prefix.
839+
840+ user_ids: Optional list of participant user IDs to record. Selective track recording
841+ (`user_ids`) is in early beta contact support to use this feature.
834842
835843 extra_headers: Send extra headers
836844
@@ -844,23 +852,22 @@ async def start_track_recording(
844852 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
845853 if not app_id :
846854 raise ValueError (f"Expected a non-empty value for `app_id` but received { app_id !r} " )
847- extra_headers = {"Accept" : "*/*" , ** (extra_headers or {})}
848855 return await self ._post (
849856 path_template (
850857 "/accounts/{account_id}/realtime/kit/{app_id}/recordings/track" , account_id = account_id , app_id = app_id
851858 ),
852859 body = await async_maybe_transform (
853860 {
854- "layers" : layers ,
855861 "meeting_id" : meeting_id ,
856- "max_seconds" : max_seconds ,
862+ "layers" : layers ,
863+ "user_ids" : user_ids ,
857864 },
858865 recording_start_track_recording_params .RecordingStartTrackRecordingParams ,
859866 ),
860867 options = make_request_options (
861868 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
862869 ),
863- cast_to = NoneType ,
870+ cast_to = RecordingStartTrackRecordingResponse ,
864871 )
865872
866873
0 commit comments