Constructor
new PlaylistItem(data)
Creates a PlaylistItem object
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object |
- Source:
Members
_id :string
ID of the item; matches a CultureEvent's ID
Type:
- string
- Source:
dateRecorded :string
ISO date string (e.g., '2022-06-20T15:50:40.055Z'), copied from CultureEvent.date
Type:
- string
- Source:
listenedToPrev :Array.<string>
ISO dates of when listened to previously (e.g., '2022-06-20T15:50:40.055Z')
Type:
- Array.<string>
- Source:
order :number
0-based order of this item in the playlist (the order in which items are displayed and played in the playlist)
Type:
- number
- Source:
recordingsAudio :Array.<string>
Audio recording file names (no path, but does include extension). These are the filenames of all GeneralRecordings
for this CultureEvent that have isVideo===false
Type:
- Array.<string>
- Source:
recordingsOrder :Array.<string>
each item in recordingsAudio and recordingsVideo is listed here, in the order they should be played.
Type:
- Array.<string>
- Source:
recordingsVideo :Array.<string>
Video recording file names (no path, but does include extension). These are the filenames of all GeneralRecordings
for this CultureEvent that have isVideo===true
Type:
- Array.<string>
- Source:
title :string
Title of the item; matches a CultureEvent's title. We duplicate it from the CultureEvent for convenience.
Type:
- string
- Source:
Methods
getPrev() → {Array.<string>}
Returns ISO strings of times listened to before today
- Source:
Returns:
- Type
- Array.<string>
getToday() → {Array.<string>}
Returns ISO strings of times listened to today
- Source:
Returns:
- Type
- Array.<string>
prev() → {boolean}
Returns if listened to before today
- Source:
Returns:
- Type
- boolean
set(data) → {PlaylistItem}
Creates an updated PlaylistItem object
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object |
- Source:
Returns:
- Type
- PlaylistItem
today() → {boolean}
Returns if listened to today
- Source:
Returns:
- Type
- boolean