Track at the fragment level using load information

The PSDK provides QoS information about downloaded fragments and tracks. All the QoS information related to resources that are downloaded is exposed through the LoadInfo class.

The PSDK provides download information about downloads of
  • Playlist/manifest files
  • Fragments files
  • Tracks files
  1. Implement the onLoadInfo callback event listener.
  2. Register the event listener, which the PSDK calls every time a fragment has downloaded.
  3. Read the data of interest from the LoadInfo parameter passed to the callback.
    Property Type Description
    downloadDuration long The duration of the download in milliseconds.
    mediaDuration long The media duration of the downloaded fragments in milliseconds.
    periodIndex int The timeline period index associated with the downloaded resource.
    size long The size of the downloaded resource in bytes.
    trackIndex int The index of the corresponding track, if known; otherwise, 0.
    trackName String The name of the corresponding track, if known; otherwise, null.
    trackType String The type of the corresponding track, if known; otherwise, null.
    type The type of the download :
    • MANIFEST - indicates that the PSDK downloaded a playlist/manifest
    • FRAGMENT - indicates that the PSDK downloaded a fragment
    • TRACK - indicates that the PSDK downloaded a fragment associated with a specific track
    url String The URL pointing to the downloaded resource.
    Note:

    The PSDK does not differentiate between the time it took the client to connect to the server and the time it took to download the full fragment. For example, the PSDK provides information that a 10 MB segment took 8 seconds to download, but does not identify that it took 4 seconds until the first byte and another 4 seconds to download the entire fragment.