Playlist
A playlist is a collection of video references. Playlists have 3 visibility options:
publicthe playlist is publicly visible in the channel pageunlistedthe playlist is hidden from the channel, but still openly accessible by anyone (default option for custom playlists)privatethe basic playlists information are public, such asname,owner,created_atetc., but the description and list of videos is encrypted and stored in a separated file. A private playlist don't have thevideosproperty, but has an additional propertyencryptedReferencewith the reference to the encrypted data. To unlock a private playlist the user will have to insert the encryption password when accessing it.
Schema versions
Schema
type SwarmPlaylist = {
/** Playlist id (used for feed update) */
id: string
/** Playlist name (undefined for __channel & __saved) */
name: string | undefined
/** Playlist owner */
owner: string
/** Playlist creation timestamp */
createdAt: number
/** Playlist update timestamp */
updatedAt: number
} & ({
/** Playlist visibility: public (show in channel), unlisted (not in channel), private (encrypted) */
type: "private"
/**
* Encrypted data of the playlist (only for private playlists)
* see `EncryptedSwarmPlaylistData` for a reference to the un-encrypted content
*/
encryptedData: string,
} | {
/** Playlist visibility: public (show in channel), unlisted (not in channel), private (encrypted) */
type: "public" | "unlisted"
/** List of the playlist videos */
videos: SwarmPlaylistVideoRaw[]
/** Playlist description */
description?: string | null
})
type EncryptedSwarmPlaylistData = {
/** List of the playlist videos */
videos: SwarmPlaylistVideoRaw[]
/** Playlist description */
description?: string | null
}
type SwarmPlaylistVideo = {
/** Video reference */
r: string
/** Video Title */
t: string
/** Timestamp of when the videos has been added to playlist */
a: number
/** Timestamp of when the video should be visible */
p?: number
}Feed
A playlist don’t always have a feed. The default playlist __channel, for instance, don’t have a feed since is loaded directly from the user’s playlists feed (see User's playlists).
A private and unlisted playlist also shouldn’t have feeds because are intended to be personal and also loaded from the user’s playlists feed.
On the other hand, custom playlists that are public generates a feed root manifest as reference. In this way if a second user wants to subscribe to a particular playlist can do it without losing future updates to that playlist.
Feed info:
Owner: address of the user
Topic (unencoded):
`EthernaPlaylist:${indexOrigin}:${id}`-indexOriginis the origin of the current index. If the index url ishttps://index.etherna.io/apithe origin is going to be:index.etherna.io.idis the uuidv4 generated for the playlistType:
sequence
Last updated