Read-only snapshot of a single HLS segment, wrapping a persisted HlsSegment entity. A segment is a short chunk of encoded video/audio belonging to a program, identified by its position (sequence number) in the stream.
Properties
| Property | Returns | Description |
|---|---|---|
| cdnUrl | String | URL from which this segment can be fetched via the CDN, or null if it has not been assigned one. |
| durationSecs | Double | Playback duration of this segment, in seconds, as advertised in the HLS playlist. |
| id | long | Database identifier of the underlying HlsSegment row. |
| segmentHash | String | Content hash identifying this segment's encoded bytes, used to locate the segment file in storage. |
| sequenceNum | int | Position of this segment within its program's playlist, starting at zero and increasing in playback order. |
Methods
getId()
Returns: long
Database identifier of the underlying HlsSegment row.
getSegmentHash()
Returns: String
Content hash identifying this segment's encoded bytes, used to locate the segment file in storage.
getDurationSecs()
Returns: Double
Playback duration of this segment, in seconds, as advertised in the HLS playlist.
getSequenceNum()
Returns: int
Position of this segment within its program's playlist, starting at zero and increasing in playback order.
getCdnUrl()
Returns: String
URL from which this segment can be fetched via the CDN, or null if it has not been assigned one.