Interface CmafEncryptionSettings.Builder

  • Method Details

    • clearLead

      CmafEncryptionSettings.Builder clearLead(String clearLead)
      Enable Clear Lead DRM to reduce video startup latency by leaving the first segment unencrypted while DRM license retrieval occurs in parallel. This optimization allows immediate playback startup while maintaining content protection for the remainder of the stream. When enabled, the first output segment remains fully unencrypted, and encryption begins at the start of the second segment. The HLS manifest will omit #EXT-X-KEY tags during the clear segment and insert the first #EXT-X-KEY immediately before the first encrypted fragment. This feature is supported exclusively for CMAF HLS (fMP4) outputs and is compatible with all existing key provider integrations (SPEKE v1, SPEKE v2, and Static Key encryption). Supported codecs: H.264 and H.265 video codecs, and AAC audio codec. Choose Enabled to activate Clear Lead DRM optimization. Choose Disabled to use standard encryption where all segments are encrypted from the beginning.
      Parameters:
      clearLead - Enable Clear Lead DRM to reduce video startup latency by leaving the first segment unencrypted while DRM license retrieval occurs in parallel. This optimization allows immediate playback startup while maintaining content protection for the remainder of the stream. When enabled, the first output segment remains fully unencrypted, and encryption begins at the start of the second segment. The HLS manifest will omit #EXT-X-KEY tags during the clear segment and insert the first #EXT-X-KEY immediately before the first encrypted fragment. This feature is supported exclusively for CMAF HLS (fMP4) outputs and is compatible with all existing key provider integrations (SPEKE v1, SPEKE v2, and Static Key encryption). Supported codecs: H.264 and H.265 video codecs, and AAC audio codec. Choose Enabled to activate Clear Lead DRM optimization. Choose Disabled to use standard encryption where all segments are encrypted from the beginning.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • clearLead

      Enable Clear Lead DRM to reduce video startup latency by leaving the first segment unencrypted while DRM license retrieval occurs in parallel. This optimization allows immediate playback startup while maintaining content protection for the remainder of the stream. When enabled, the first output segment remains fully unencrypted, and encryption begins at the start of the second segment. The HLS manifest will omit #EXT-X-KEY tags during the clear segment and insert the first #EXT-X-KEY immediately before the first encrypted fragment. This feature is supported exclusively for CMAF HLS (fMP4) outputs and is compatible with all existing key provider integrations (SPEKE v1, SPEKE v2, and Static Key encryption). Supported codecs: H.264 and H.265 video codecs, and AAC audio codec. Choose Enabled to activate Clear Lead DRM optimization. Choose Disabled to use standard encryption where all segments are encrypted from the beginning.
      Parameters:
      clearLead - Enable Clear Lead DRM to reduce video startup latency by leaving the first segment unencrypted while DRM license retrieval occurs in parallel. This optimization allows immediate playback startup while maintaining content protection for the remainder of the stream. When enabled, the first output segment remains fully unencrypted, and encryption begins at the start of the second segment. The HLS manifest will omit #EXT-X-KEY tags during the clear segment and insert the first #EXT-X-KEY immediately before the first encrypted fragment. This feature is supported exclusively for CMAF HLS (fMP4) outputs and is compatible with all existing key provider integrations (SPEKE v1, SPEKE v2, and Static Key encryption). Supported codecs: H.264 and H.265 video codecs, and AAC audio codec. Choose Enabled to activate Clear Lead DRM optimization. Choose Disabled to use standard encryption where all segments are encrypted from the beginning.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • constantInitializationVector

      CmafEncryptionSettings.Builder constantInitializationVector(String constantInitializationVector)
      This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
      Parameters:
      constantInitializationVector - This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • encryptionMethod

      CmafEncryptionSettings.Builder encryptionMethod(String encryptionMethod)
      Specify the encryption scheme that you want the service to use when encrypting your CMAF segments. Choose AES-CBC subsample or AES_CTR.
      Parameters:
      encryptionMethod - Specify the encryption scheme that you want the service to use when encrypting your CMAF segments. Choose AES-CBC subsample or AES_CTR.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • encryptionMethod

      CmafEncryptionSettings.Builder encryptionMethod(CmafEncryptionType encryptionMethod)
      Specify the encryption scheme that you want the service to use when encrypting your CMAF segments. Choose AES-CBC subsample or AES_CTR.
      Parameters:
      encryptionMethod - Specify the encryption scheme that you want the service to use when encrypting your CMAF segments. Choose AES-CBC subsample or AES_CTR.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • initializationVectorInManifest

      CmafEncryptionSettings.Builder initializationVectorInManifest(String initializationVectorInManifest)
      When you use DRM with CMAF outputs, choose whether the service writes the 128-bit encryption initialization vector in the HLS and DASH manifests.
      Parameters:
      initializationVectorInManifest - When you use DRM with CMAF outputs, choose whether the service writes the 128-bit encryption initialization vector in the HLS and DASH manifests.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • initializationVectorInManifest

      CmafEncryptionSettings.Builder initializationVectorInManifest(CmafInitializationVectorInManifest initializationVectorInManifest)
      When you use DRM with CMAF outputs, choose whether the service writes the 128-bit encryption initialization vector in the HLS and DASH manifests.
      Parameters:
      initializationVectorInManifest - When you use DRM with CMAF outputs, choose whether the service writes the 128-bit encryption initialization vector in the HLS and DASH manifests.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • spekeKeyProvider

      CmafEncryptionSettings.Builder spekeKeyProvider(SpekeKeyProviderCmaf spekeKeyProvider)
      If your output group type is CMAF, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider settings instead.
      Parameters:
      spekeKeyProvider - If your output group type is CMAF, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider settings instead.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • spekeKeyProvider

      default CmafEncryptionSettings.Builder spekeKeyProvider(Consumer<SpekeKeyProviderCmaf.Builder> spekeKeyProvider)
      If your output group type is CMAF, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider settings instead. This is a convenience method that creates an instance of the SpekeKeyProviderCmaf.Builder avoiding the need to create one manually via SpekeKeyProviderCmaf.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to spekeKeyProvider(SpekeKeyProviderCmaf).

      Parameters:
      spekeKeyProvider - a consumer that will call methods on SpekeKeyProviderCmaf.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • staticKeyProvider

      CmafEncryptionSettings.Builder staticKeyProvider(StaticKeyProvider staticKeyProvider)
      Use these settings to set up encryption with a static key provider.
      Parameters:
      staticKeyProvider - Use these settings to set up encryption with a static key provider.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • staticKeyProvider

      default CmafEncryptionSettings.Builder staticKeyProvider(Consumer<StaticKeyProvider.Builder> staticKeyProvider)
      Use these settings to set up encryption with a static key provider. This is a convenience method that creates an instance of the StaticKeyProvider.Builder avoiding the need to create one manually via StaticKeyProvider.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to staticKeyProvider(StaticKeyProvider).

      Parameters:
      staticKeyProvider - a consumer that will call methods on StaticKeyProvider.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
      Parameters:
      type - Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
      Parameters:
      type - Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: