Player Object

The player object is no longer available in the SDK version 2.

You can use the getPlayerProperties method to get the player information.

Player Object Properties

PropertyDescriptionType
apiStatusThe status of the TelemetryTV API Websocket Connectionstring
isPreviewingWhether the Player is in preview mode or not. Typically when you're viewing within the administration app.bool
stageWhat the stage of the environment is (test, production, staging, etc).string
isElectronWhether the environment is running within the TelemetryTV Electron App (Mac, Windows or Linux) on Desktop or the Playerbool
isAndroidWhether the environment is running within the TelemetryTV Android app.bool
isWindowsWhether the environment is running within the TelemetryTV Windows app.bool
isMacOSWhether the environment is running within the TelemetryTV MacOS app.bool
isIosWhether the environment is running within the TelemetryTV Android app.bool
isChromeOSwhether Whether the environment is running within the TelemetryTV ChromeOS app.bool
isBrowserWhether the environment is running within a browser (no containing app).bool
isDesktopWhether the environment is running within the TelemetryTV desktop app.bool
import { getPlayerProperties } from '@telemetrytv/sdk'

getPlayerProperties().then((player) => {
  console.log('The player stage is:', player.stage)
})
import { restart } from '@telemetrytv/sdk'

restart()

What’s Next