putPlaybackConfiguration method
- required String name,
- AdConditioningConfiguration? adConditioningConfiguration,
- AdDecisionServerConfiguration? adDecisionServerConfiguration,
- String? adDecisionServerUrl,
- AvailSuppression? availSuppression,
- Bumper? bumper,
- CdnConfiguration? cdnConfiguration,
- Map<
String, Map< ? configurationAliases,String, String> > - DashConfigurationForPut? dashConfiguration,
- Map<
EventName, String> ? functionMapping, - InsertionMode? insertionMode,
- LivePreRollConfiguration? livePreRollConfiguration,
- ManifestProcessingRules? manifestProcessingRules,
- int? personalizationThresholdSeconds,
- String? slateAdUrl,
- Map<
String, String> ? tags, - String? transcodeProfileName,
- String? videoContentSourceUrl,
Creates a playback configuration. For information about MediaTailor configurations, see Working with configurations in AWS Elemental MediaTailor.
Parameter name :
The identifier for the playback configuration.
Parameter adConditioningConfiguration :
The setting that indicates what conditioning MediaTailor will perform on
ads that the ad decision server (ADS) returns, and what priority
MediaTailor uses when inserting ads.
Parameter adDecisionServerConfiguration :
The configuration for customizing HTTP requests to the ad decision server
(ADS). This includes settings for request method, headers, body content,
and compression options.
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, also known as ad suppression. For
more information about ad suppression, see Ad
Suppression.
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. To learn more about
bumpers, see Bumpers.
Parameter cdnConfiguration :
The configuration for using a content delivery network (CDN), like Amazon
CloudFront, for content and ad segment management.
Parameter configurationAliases :
The player parameters and aliases used as dynamic variables during session
initialization. For more information, see Domain
Variables.
Parameter dashConfiguration :
The configuration for DASH content.
Parameter functionMapping :
A map of lifecycle hook event names to function identifiers. The function
mapping specifies which function MediaTailor executes at each lifecycle
hook during ad insertion. Valid keys are
PRE_SESSION_INITIALIZATION and PRE_ADS_REQUEST.
For more information, see Functions
lifecycle hooks in the MediaTailor User Guide.
Parameter insertionMode :
The setting that controls whether players can use stitched or guided ad
insertion. The default, STITCHED_ONLY, forces all player
sessions to use stitched (server-side) ad insertion. Choosing
PLAYER_SELECT allows players to select either stitched or
guided ad insertion at session-initialization time. The default for
players that do not specify an insertion mode is stitched.
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 personalizationThresholdSeconds :
Defines the maximum duration of underfilled ad time (in seconds) allowed
in an ad break. If the duration of underfilled ad time exceeds the
personalization threshold, then the personalization of the ad break is
abandoned and the underlying content is shown. This feature applies to
ad replacement in live and VOD streams, rather than ad insertion,
because it relies on an underlying content stream. For more information
about ad break behavior, including ad replacement and insertion, see Ad
Behavior in AWS Elemental MediaTailor.
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. Tags are key-value pairs
that you can associate with Amazon resources to help with organization,
access control, and cost tracking. For more information, see Tagging
AWS Elemental MediaTailor Resources.
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 parent manifest for the stream, minus the asset ID.
The maximum length is 512 characters.
Implementation
Future<PutPlaybackConfigurationResponse> putPlaybackConfiguration({
required String name,
AdConditioningConfiguration? adConditioningConfiguration,
AdDecisionServerConfiguration? adDecisionServerConfiguration,
String? adDecisionServerUrl,
AvailSuppression? availSuppression,
Bumper? bumper,
CdnConfiguration? cdnConfiguration,
Map<String, Map<String, String>>? configurationAliases,
DashConfigurationForPut? dashConfiguration,
Map<EventName, String>? functionMapping,
InsertionMode? insertionMode,
LivePreRollConfiguration? livePreRollConfiguration,
ManifestProcessingRules? manifestProcessingRules,
int? personalizationThresholdSeconds,
String? slateAdUrl,
Map<String, String>? tags,
String? transcodeProfileName,
String? videoContentSourceUrl,
}) async {
_s.validateNumRange(
'personalizationThresholdSeconds',
personalizationThresholdSeconds,
1,
1152921504606846976,
);
final $payload = <String, dynamic>{
'Name': name,
if (adConditioningConfiguration != null)
'AdConditioningConfiguration': adConditioningConfiguration,
if (adDecisionServerConfiguration != null)
'AdDecisionServerConfiguration': adDecisionServerConfiguration,
if (adDecisionServerUrl != null)
'AdDecisionServerUrl': adDecisionServerUrl,
if (availSuppression != null) 'AvailSuppression': availSuppression,
if (bumper != null) 'Bumper': bumper,
if (cdnConfiguration != null) 'CdnConfiguration': cdnConfiguration,
if (configurationAliases != null)
'ConfigurationAliases': configurationAliases,
if (dashConfiguration != null) 'DashConfiguration': dashConfiguration,
if (functionMapping != null)
'FunctionMapping': functionMapping.map((k, e) => MapEntry(k.value, e)),
if (insertionMode != null) 'InsertionMode': insertionMode.value,
if (livePreRollConfiguration != null)
'LivePreRollConfiguration': livePreRollConfiguration,
if (manifestProcessingRules != null)
'ManifestProcessingRules': manifestProcessingRules,
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);
}