putPlaybackConfiguration method

Future<PutPlaybackConfigurationResponse> putPlaybackConfiguration({
  1. String? adDecisionServerUrl,
  2. AvailSuppression? availSuppression,
  3. Bumper? bumper,
  4. CdnConfiguration? cdnConfiguration,
  5. DashConfigurationForPut? dashConfiguration,
  6. LivePreRollConfiguration? livePreRollConfiguration,
  7. ManifestProcessingRules? manifestProcessingRules,
  8. String? name,
  9. int? personalizationThresholdSeconds,
  10. String? slateAdUrl,
  11. Map<String, String>? tags,
  12. String? transcodeProfileName,
  13. String? videoContentSourceUrl,
})

Adds a new playback configuration to AWS Elemental MediaTailor.

Parameter adDecisionServerUrl : The URL for the ad decision server (ADS). This includes the specification of static parameters and placeholders for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and session-specific parameters as needed when calling the ADS. Alternately, for testing you can provide a static VAST URL. The maximum length is 25,000 characters.

Parameter availSuppression : The configuration for Avail Suppression. Ad suppression can be used to turn off ad personalization in a long manifest, or if a viewer joins mid-break.

Parameter bumper : The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of an ad break.

Parameter cdnConfiguration : The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment management.

Parameter dashConfiguration : The configuration for DASH content.

Parameter livePreRollConfiguration : The configuration for pre-roll ad insertion.

Parameter manifestProcessingRules : The configuration for manifest processing rules. Manifest processing rules enable customization of the personalized manifests created by MediaTailor.

Parameter name : The identifier for the playback configuration.

Parameter personalizationThresholdSeconds : The maximum duration of underfilled ad time (in seconds) allowed in an ad break.

Parameter slateAdUrl : The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. AWS Elemental MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional for non-VPAID configurations. For VPAID, the slate is required because MediaTailor provides it in the slots that are designated for dynamic ad content. The slate must be a high-quality asset that contains both audio and video.

Parameter tags : The tags to assign to the playback configuration.

Parameter transcodeProfileName : The name that is used to associate this playback configuration with a custom transcode profile. This overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up custom profiles with the help of AWS Support.

Parameter videoContentSourceUrl : The URL prefix for the master playlist for the stream, minus the asset ID. The maximum length is 512 characters.

Implementation

Future<PutPlaybackConfigurationResponse> putPlaybackConfiguration({
  String? adDecisionServerUrl,
  AvailSuppression? availSuppression,
  Bumper? bumper,
  CdnConfiguration? cdnConfiguration,
  DashConfigurationForPut? dashConfiguration,
  LivePreRollConfiguration? livePreRollConfiguration,
  ManifestProcessingRules? manifestProcessingRules,
  String? name,
  int? personalizationThresholdSeconds,
  String? slateAdUrl,
  Map<String, String>? tags,
  String? transcodeProfileName,
  String? videoContentSourceUrl,
}) async {
  _s.validateNumRange(
    'personalizationThresholdSeconds',
    personalizationThresholdSeconds,
    1,
    1152921504606846976,
  );
  final $payload = <String, dynamic>{
    if (adDecisionServerUrl != null)
      'AdDecisionServerUrl': adDecisionServerUrl,
    if (availSuppression != null) 'AvailSuppression': availSuppression,
    if (bumper != null) 'Bumper': bumper,
    if (cdnConfiguration != null) 'CdnConfiguration': cdnConfiguration,
    if (dashConfiguration != null) 'DashConfiguration': dashConfiguration,
    if (livePreRollConfiguration != null)
      'LivePreRollConfiguration': livePreRollConfiguration,
    if (manifestProcessingRules != null)
      'ManifestProcessingRules': manifestProcessingRules,
    if (name != null) 'Name': name,
    if (personalizationThresholdSeconds != null)
      'PersonalizationThresholdSeconds': personalizationThresholdSeconds,
    if (slateAdUrl != null) 'SlateAdUrl': slateAdUrl,
    if (tags != null) 'tags': tags,
    if (transcodeProfileName != null)
      'TranscodeProfileName': transcodeProfileName,
    if (videoContentSourceUrl != null)
      'VideoContentSourceUrl': videoContentSourceUrl,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/playbackConfiguration',
    exceptionFnMap: _exceptionFns,
  );
  return PutPlaybackConfigurationResponse.fromJson(response);
}