SegmentReference class

Annotations
  • @JS('SegmentReference')

Constructors

SegmentReference(num startTime, num endTime, JsFunction uris, num startByte, num? endByte, InitSegmentReference initSegmentReference, num timestampOffset, num appendWindowStart, num appendWindowEnd, [List<SegmentReference> partialReferences, String tilesLayout, num tileDuration, num syncTime, num status, HlsAes128Key hlsAes128Key])

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getEndByte() num
Returns the offset from the start of the resource to the end of the segment, inclusive. A value of null indicates that the segment extends to the end of the resource.
getEndTime() num
Returns the segment's end time in seconds.
getStartByte() num
Returns the offset from the start of the resource to the start of the segment.
getStartTime() num
Returns the segment's start time in seconds.
getStatus() num
Returns the segment's status. shaka.media.SegmentReference.Status
getThumbnailSprite() ThumbnailSprite
Returns the segment's thumbnail sprite.
getTileDuration() num
Returns the segment's explicit tile duration. Only defined in image segments.
getTilesLayout() String
Returns the segment's tiles layout. Only defined in image segments.
getUris() List<String>
Creates and returns the URIs of the resource containing the segment.
hasByterangeOptimization() bool
Returns true if the segment has a byterange optimization.
isIndependent() bool
Returns true if the segment is independent.
isPreload() bool
Returns true if the segment is preloaded.
markAsByterangeOptimization() → void
Mark the reference as byterange optimization. The "byterange optimization" means that it is playable using MP4 low latency streaming with chunked data.
markAsNonIndependent() → void
Mark the reference as non-independent.
markAsPreload() → void
Mark the reference as preload.
markAsUnavailable() → void
Mark the reference as unavailable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offset(num offset) → void
Offset the segment reference by a fixed amount.
setThumbnailSprite(ThumbnailSprite thumbnailSprite) → void
Set the segment's thumbnail sprite.
syncAgainst(dynamic lowestSyncTime) → void
Sync this segment against a particular sync time that will serve as "0" in the presentation timeline.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

Status num
Rather than using booleans to communicate what the state of the reference, we have this enum. Type: number Properties: Name Value Type Description AVAILABLE 0 number UNAVAILABLE 1 number MISSING 2 number
no setter