Lumen help

Statistics API for Web

Introduction

Example

                window.Streamroot.instances[0]
            
                {
    dnaDownloadAllowed: true,
    dnaDownloadOnCellularAllowed: null,
    dnaDownloadOnWifiEthernetAllowed: null,
    dnaUploadAllowed: true,
    dnaUploadOnCellularAllowed: null,
    dnaUploadOnWifiEthernetAllowed: null,
    id: "123e4567-e89b-12d3-a456-426655440000",
    stats: {
      allContents: {
        cdnDownload: 23641258,
        dnaDownload: 45619783,
        dnaUpload: 36449517
      },
      currentContent: {
        cdnDownload: 23641258,
        dnaDownload: 45619783,
        dnaUpload: 36449517
      },
      realtime: {
        dnaSources: 8,
      },
    },
    transferStatus: {
      effectiveDownloadAllowed: true,
      effectiveUploadAllowed: true,
    },
    versions: {
      peerAgent:"5.4.2",
      streamrooter:"0.14.1",
      wrapper:"1.0.30"
    }
}
            

API Table

Name

Description

dnaDownloadAllowed

Getter/Setter to switch peer download ON or OFF, regardless of the network type

dnaDownloadOnCellularAllowed Getter/Setter to allow disallow peer download. This will be applied if the network type is Cellular (i.e., 5G, 4G ... )
dnaDownloadOnWifiEthernetAllowed Getter/Setter to allow disallow peer download. This will be applied if the network type is Wi-Fi or ethernet.
dnaUploadAllowed Getter/Setter to switch peer upload ON or OFF, regardless of the network type
dnaUploadOnCellularAllowed Getter/Setter to allow disallow peer upload. This will be applied if the network type is Cellular (i.e., 5G, 4G ... )
dnaUploadOnWifiEthernetAllowed Getter/Setter to allow disallow peer upload. This will be applied if the network type is Wi-Fi or ethernet.
id Returns the ID of the streamrooter running in the page. It is automatically generated.
AllContents (in Bytes) Stats that describe the whole session (Stats are aggregated over successive contents that have been plaed in case of a playlist.)
currentContent (in Bytes) Stats that describe the current content being played.
realtime.dnaSources Returns the current number of peers connected to the client
effectiveDownloadAllowed Return the effective state of download (Allowed or not). Depending on the network type, it will be calculated like so: `dnaDownloadAllowed` AND `dnaDownloadOnWifiEthernetAllowed` (if you are on Wi-Fi for instance).
effectiveUploadAllowed Return the effective state of upload (Allowed or not). Depending on the network type, it will be calculated like so: `dnaUpAllowed` AND `dnaUploadOnCellularAllowed` (if you are on Wi-Fi for instance).