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
Property | Description | Type |
---|---|---|
apiStatus | The status of the TelemetryTV API Websocket Connection | string |
isPreviewing | Whether the Player is in preview mode or not. Typically when you're viewing within the administration app. | bool |
stage | What the stage of the environment is (test, production, staging, etc). | string |
isElectron | Whether the environment is running within the TelemetryTV Electron App (Mac, Windows or Linux) on Desktop or the Player | bool |
isAndroid | Whether the environment is running within the TelemetryTV Android app. | bool |
isWindows | Whether the environment is running within the TelemetryTV Windows app. | bool |
isMacOS | Whether the environment is running within the TelemetryTV MacOS app. | bool |
isIos | Whether the environment is running within the TelemetryTV Android app. | bool |
isChromeOS | whether Whether the environment is running within the TelemetryTV ChromeOS app. | bool |
isBrowser | Whether the environment is running within a browser (no containing app). | bool |
isDesktop | Whether 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()
Updated 3 months ago
What’s Next