createRecording method

Future<String> createRecording(
  1. RecordingConfiguration recordingConfiguration
)

CreateRecording shall create a new recording. The new recording shall be created with a track for each supported TrackType see Recording Control Spec.

This method is optional. It shall be available if the Recording/DynamicRecordings capability is TRUE.

When successfully completed, CreateRecording shall have created three tracks with the following configurations:

  • TrackToken TrackType
  • VIDEO001 Video
  • AUDIO001 Audio
  • META001 Metadata All TrackConfigurations shall have the MaximumRetentionTime set to 0 (unlimited), and the Description set to the empty string.

ACCESS CLASS: ACTUATE

Implementation

Future<String> createRecording(
    RecordingConfiguration recordingConfiguration) async {
  loggy.debug('createRecording');

  final responseEnvelope = await transport.securedRequest(
      uri,
      soap.Body(
        request: RecordingsRequest.createRecording(recordingConfiguration),
      ));

  if (responseEnvelope.body.hasFault) {
    throw Exception(responseEnvelope.body.fault.toString());
  }

  return CreateRecordingResponse.fromJson(responseEnvelope.body.response!)
      .token;
}