Page Object

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

Use the getCurrentPage method to get the page information.

We also have the getAllPages() and getPlaylistPages(playlistId) methods to help you get more page information. Please check the README.md for more details.

page Object

Function or PropertyDescriptionReturns
page.nameReturns the page objectReturns the page object

Page Object Properties

PropertyDescriptionType
durationDuration of the page in secondsnumber
nameName of the pagestring
idTelemetryTV ID of the pagestring

Code Samples

import { getCurrentPage } from '@telemetrytv/sdk'

getCurrentPage().then((page) => {
  console.log('The current page name is:', page.name)
})

What’s Next