Home > hls.js > Fragment

Fragment class

Object representing parsed data from an HLS Segment. Found in LevelDetails.fragments.

Signature:

export declare class Fragment extends BaseSegment 

Extends: BaseSegment

Constructors

Constructor

Modifiers

Description

(constructor)(type, base)

Constructs a new instance of the Fragment class

Properties

Property

Modifiers

Type

Description

bitrate

number | null

bitrateTest

boolean

byteLength

readonly

number | null

cc

number

data?

Uint8Array

(Optional)

decryptdata

readonly

LevelKey | null

deltaPTS?

number

(Optional)

duration

number

encrypted

readonly

boolean

end

readonly

number

endDTS?

number

(Optional)

endList?

boolean

(Optional)

endProgramDateTime

readonly

number | null

endPTS?

number

(Optional)

gap?

boolean

(Optional)

initSegment

Fragment | null

keyLoader

Loader<KeyLoaderContext> | null

level

number

levelkeys?

{ [key: string]: LevelKey; }

(Optional)

loader

Loader<FragmentLoaderContext> | null

maxStartPTS?

number

(Optional)

minEndPTS?

number

(Optional)

playlistOffset

number

programDateTime

number | null

rawProgramDateTime

string | null

ref

readonly

MediaFragmentRef | null

sn

number | 'initSegment'

start

number

startDTS?

number

(Optional)

startPTS?

number

(Optional)

tagList

Array<string[]>

title

string | null

type

readonly

PlaylistLevelType

urlId

number

Methods

Method

Modifiers

Description

abortRequests()

addStart(value)

setDuration(value)

setElementaryStreamInfo(type, startPTS, endPTS, startDTS, endDTS, partial)

setKeyFormat(keyFormat)

setStart(value)