Track at the fragment level using load information

Quality of service (QoS) offers a detailed view into how the video engine is performing. TVSDK provides detailed statistics about playback, buffering, and devices.

TVSDK also provides information about the following downloaded resources:

  1. Playlist/manifest files

  2. File fragments

  3. Tracking information for files

    You can read quality of service (QoS) information about downloaded resources, such as fragments and tracks, from the LoadInfo class.

  4. Implement the onLoadInfo callback event listener.

  5. Register the event listener, which TVSDK calls every time a fragment has downloaded.

  6. Read the data of interest from the LoadInfo parameter that is passed to the callback.

    Property Type Description
    downloadDuration long

    The duration of the download in milliseconds.

    TVSDK 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, if a 10 MB segment takes 8 seconds to download, TVSDK provides that information, but does not tell you that it took 4 seconds until the first byte and another 4 seconds to download the entire fragment.

    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 String What TVSDK downloaded. One of the following:
    • MANIFEST - A playlist/manifest
    • FRAGMENT - A fragment
    • TRACK - A fragment associated with a specific track
    Sometimes it might not be possible to detect the type of the resource. If this occurs, FILE is returned.
    url String The URL that points to the downloaded resource.

On this page