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 Web SDK running in the page. It is automatically generated.
stats.allContents (in Bytes) Stats that describe the whole session (Stats are aggregated over successive contents that have been plaed in case of a playlist.)
stats.allContents.cdnDownload (in Bytes)
For all content in a playlist, total Bytes downloaded from the CDN over the session
stats.allContents.dnaDownload (in Bytes)
For all content in a playlist, total Bytes downloaded from the mesh network over the session
stats.allContents.dnaUpload (in Bytes) For all content in a playlist, total Bytes uploaded from the mesh network over the session
stats.currentContent (in Bytes) Stats that describe the current content being played
stats.currentContent.cdnDownload (in Bytes) For the current content being played, total Bytes downloaded from the CDN over the session
stats.currentContent.dnaDownload (in Bytes) For the current content being played, total Bytes downloaded from the mesh network over the session
stats.currentContent.dnaUpload (in Bytes) For the current content being played, total Bytes uploaded from the mesh network over the session
realtime.dnaSources Returns the current number of peers connected to the client
transferStatus.effectiveDownloadAllowed Return the effective state of download (allowed or disallowed).
Depending on the Network type, it will be calculated as:
dnaDownloadAllowed AND dnaDownloadOnWifiEthernetAllowed (if you are on Wi-Fi for instance).
transferStatus.effectiveUploadAllowed Return the effective state of upload (allowed or disallowed).
Depending on your Network type**, it will be calculated as:
dnaUploadOnAllowed AND dnaUploadOnCellularAllowed (if you are on 4G for instance).