{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-kinesis-video-streams/json-schema/amazon-kinesis-video-streams-get-hlsstreaming-session-urlinput-schema.json",
  "title": "GetHLSStreamingSessionURLInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-kinesis-video-streams-operations-api-openapi.yml#/components/schemas/GetHLSStreamingSessionURLInput",
  "type": "object",
  "properties": {
    "StreamName": {
      "type": "string",
      "description": "The name of the stream for which to retrieve the HLS master playlist URL. You must specify either the StreamName or the StreamARN."
    },
    "StreamARN": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the stream for which to retrieve the HLS master playlist URL. You must specify either the StreamName or the StreamARN."
    },
    "PlaybackMode": {
      "type": "string",
      "enum": [
        "LIVE",
        "LIVE_REPLAY",
        "ON_DEMAND"
      ],
      "description": "Whether to retrieve live, live replay, or archived, on-demand data. Features of the three types of sessions include the following: LIVE : For sessions of this type, the HLS media playlist is continually updated with the latest fragments as they become available. We recommend that the media player retrieve a new playlist on a one-second interval. When this type of session is played in a media player, the user interface typically displays a \"live\" notification, with no scrubber control for choosing the position in the playback window to display. In LIVE mode, the newest available fragments are i"
    },
    "HLSFragmentSelector": {
      "$ref": "#/$defs/HLSFragmentSelector"
    },
    "ContainerFormat": {
      "type": "string",
      "enum": [
        "FRAGMENTED_MP4",
        "MPEG_TS"
      ],
      "description": "Specifies which format should be used for packaging the media. Specifying the FRAGMENTED_MP4 container format packages the media into MP4 fragments (fMP4 or CMAF). This is the recommended packaging because there is minimal packaging overhead. The other container format option is MPEG_TS. HLS has supported MPEG TS chunks since it was released and is sometimes the only supported packaging on older HLS players. MPEG TS typically has a 5-25 percent packaging overhead. This means MPEG TS typically requires 5-25 percent more bandwidth and cost than fMP4. The default is FRAGMENTED_MP4."
    },
    "DiscontinuityMode": {
      "type": "string",
      "enum": [
        "ALWAYS",
        "NEVER",
        "ON_DISCONTINUITY"
      ],
      "description": "Specifies when flags marking discontinuities between fragments are added to the media playlists. Media players typically build a timeline of media content to play, based on the timestamps of each fragment. This means that if there is any overlap or gap between fragments (as is typical if HLSFragmentSelector is set to SERVER_TIMESTAMP), the media player timeline will also have small gaps between fragments in some places, and will overwrite frames in other places. Gaps in the media player timeline can cause playback to stall and overlaps can cause playback to be jittery. When there are discontin"
    },
    "DisplayFragmentTimestamp": {
      "type": "string",
      "enum": [
        "ALWAYS",
        "NEVER"
      ],
      "description": "Specifies when the fragment start timestamps should be included in the HLS media playlist. Typically, media players report the playhead position as a time relative to the start of the first fragment in the playback session. However, when the start timestamps are included in the HLS media playlist, some media players might report the current playhead as an absolute time based on the fragment timestamps. This can be useful for creating a playback experience that shows viewers the wall-clock time of the media. The default is NEVER. When HLSFragmentSelector is SERVER_TIMESTAMP, the timestamps will"
    },
    "Expires": {
      "type": "integer",
      "description": "The time in seconds until the requested session expires. This value can be between 300 (5 minutes) and 43200 (12 hours). When a session expires, no new calls to GetHLSMasterPlaylist, GetHLSMediaPlaylist, GetMP4InitFragment, GetMP4MediaFragment, or GetTSFragment can be made for that session. The default is 300 (5 minutes)."
    },
    "MaxMediaPlaylistFragmentResults": {
      "type": "integer",
      "description": "The maximum number of fragments that are returned in the HLS media playlists. When the PlaybackMode is LIVE, the most recent fragments are returned up to this value. When the PlaybackMode is ON_DEMAND, the oldest fragments are returned, up to this maximum number. When there are a higher number of fragments available in a live HLS media playlist, video players often buffer content before starting playback. Increasing the buffer size increases the playback latency, but it decreases the likelihood that rebuffering will occur during playback. We recommend that a live HLS media playlist have a mini"
    }
  },
  "$defs": {
    "HLSFragmentSelector": {
      "type": "object",
      "properties": {
        "FragmentSelectorType": {
          "type": "string",
          "enum": [
            "PRODUCER_TIMESTAMP",
            "SERVER_TIMESTAMP"
          ],
          "description": "The source of the timestamps for the requested media. When FragmentSelectorType is set to PRODUCER_TIMESTAMP and GetHLSStreamingSessionURLInput$PlaybackMode is ON_DEMAND or LIVE_REPLAY, the first fragment ingested with a producer timestamp within the specified FragmentSelector$TimestampRange is included in the media playlist. In addition, the fragments with producer timestamps within the TimestampRange ingested immediately following the first fragment (up to the GetHLSStreamingSessionURLInput$MaxMediaPlaylistFragmentResults value) are included. Fragments that have duplicate producer timestamps"
        },
        "TimestampRange": {
          "$ref": "#/$defs/HLSTimestampRange"
        }
      }
    },
    "HLSTimestampRange": {
      "type": "object",
      "properties": {
        "StartTimestamp": {
          "type": "string",
          "format": "date-time",
          "description": "The start of the timestamp range for the requested media. If the HLSTimestampRange value is specified, the StartTimestamp value is required. Only fragments that start exactly at or after StartTimestamp are included in the session. Fragments that start before StartTimestamp and continue past it aren't included in the session. If FragmentSelectorType is SERVER_TIMESTAMP, the StartTimestamp must be later than the stream head."
        },
        "EndTimestamp": {
          "type": "string",
          "format": "date-time",
          "description": "The end of the timestamp range for the requested media. This value must be within 24 hours of the specified StartTimestamp, and it must be later than the StartTimestamp value. If FragmentSelectorType for the request is SERVER_TIMESTAMP, this value must be in the past. The EndTimestamp value is required for ON_DEMAND mode, but optional for LIVE_REPLAY mode. If the EndTimestamp is not set for LIVE_REPLAY mode then the session will continue to include newly ingested fragments until the session expires. This value is inclusive. The EndTimestamp is compared to the (starting) timestamp of the fragme"
        }
      }
    }
  }
}