![]() |
libgpac
Documentation of the core library of GPAC
|
JavaScript API for DASH client adaptation algorithm. More...
Data Structures | |
| interface | JSDASHClient |
| JSDASHClient API. More... | |
| interface | JSDASHGroup |
| JSDASHGroup API. More... | |
| interface | JSDASHQuality |
| JSDASHQuality Object. More... | |
| interface | JSDASHStats |
| JSDASHStats API. More... | |
| interface | JSDASHDownloadStats |
| JSDASHDownloadStats API. More... | |
| interface | JSDASHSRD |
| JSDASHSRD. More... | |
Variables | |
| attribute JSDASHClient | dashin |
This section documents the JavaScript API available for implementing your own adaptation logic in GPAC DASH client.
The algorithm is chosen using the option algo of the dashin filter :
The loaded JavaScript context has all JS modules available in GPAC, except WebGL.
It is also possible to bind the custom agorithm from a JSFilterSession using JSFSFilter.bind
| interface JSDASHGroup |
The JSDASHGroup object provides a description of a group (AdaptationSet in DASH), and its available qualities.
Collaboration diagram for JSDASHGroup:| Data Fields | ||
|---|---|---|
| attribute readonly unsigned long | idx |
group index, as used in rate_adaptation callback |
| attribute readonly unsigned long long | duration |
group duration in milliseconds, 0 if unknown (live) |
| attribute readonly JSDASHSRD | SRD |
Spatial Relationship Description, or null if none |
| attribute readonly Array | qualities |
list of available qualites, array of JSDASHQuality objects |
| interface JSDASHQuality |
The JSDASHQuality object provides a description of a quality (Representation in DASH).
Collaboration diagram for JSDASHQuality:| Data Fields | ||
|---|---|---|
| attribute readonly DOMString | ID |
ID (Representation ID) |
| attribute readonly DOMString | mime |
MIME type |
| attribute readonly DOMString | codec |
codec parameter |
| attribute readonly unsigned long | bitrate |
average bitrate in bits per second |
| attribute readonly boolean | disabled |
if true, the quality is disabled (cannot be played) |
| attribute readonly unsigned long | width |
video width in pixels |
| attribute readonly unsigned long | height |
video height in pixels |
| attribute readonly Fraction | fps |
video frame rate |
| attribute readonly Fraction | sar |
video sample aspect ratio |
| attribute readonly unsigned long | samplerate |
audio samplerate |
| attribute readonly unsigned long | channels |
audio number of channels |
| attribute readonly double | ast_offset |
DASH AST offset for low-latency, 0 otherwise |
| attribute readonly Array | sizes |
size of all segments in this quality for onDemand profiles. If unknown, set to null |
| interface JSDASHStats |
The JSDASHStats object provides a description of current group state before adaptation logic
| interface JSDASHDownloadStats |
The JSDASHDownloadStats object provides a description of current segment download statistics for a group
| interface JSDASHSRD |
The JSDASHSRD object provides the SRD description of a group.
| attribute JSDASHClient dashin |
global context property representing the one and only JSDASHClient object attached to the loaded script