Playlist Object
The playlist
object is no longer available in the SDK version 2.
You can use the getCurrentPlaylist
method to get the playlist information.
Besides that, we also have the getAllPlaylists()
and getPlaylist(playlistId)
methods to help you get more playlist information. Please check the README.md for more details.
playlist Object
Function or Property | Description | Returns |
---|---|---|
playlist | The playlist object | The playlist object |
goToPageId(pageId) | Goes to the page as specified by the ID. You'll need to determine the ID of the page first by retrieving a list of the pages. | null |
goToPageName(pageName) | Go to the page as specified by the Name of the page. | null |
nextPage() | Go to the next page in the playlist. | null |
previousPage() | Go to the previous page in the playlist. | null |
pause() | Pause playlist playback. | null |
play() | Resuming playing playlist playback. | null |
Playlist Object Properties
Property | Description | Type |
---|---|---|
id | The ID of the playlist | string |
pages | An array of pages objects representing the pages in the playlist | array |
name | The name of the playlist | string |
state | Whether the playlist is 'playing' or 'paused' | string |
Code Samples
import { getCurrentPlaylist } from '@telemetrytv/sdk'
getCurrentPlaylist().then((playlist) => {
console.log('The current playlist name is:', playlist.name)
})
Updated 5 months ago
What’s Next