Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Playlist

Index

Constructors

constructor

  • new Playlist(params?: PlaylistParams): Playlist
  • Parameters

    • params: PlaylistParams = {}

    Returns Playlist

Properties

subscribe

subscribe: <FullEventMap, Event>(event: Event, callback: EventHandler<Event, FullEventMap[Event]>) => () => void = ...

Type declaration

    • <FullEventMap, Event>(event: Event, callback: EventHandler<Event, FullEventMap[Event]>): () => void
    • Subscribe on event

      Type parameters

      • FullEventMap: { videosUpdated: { videos: Video[] } } & { *: any }

      • Event: string

      Parameters

      • event: Event

        This string can contain: event name, namespace of event name, list of event names separated by a space or '*' to subscribe on all events

      • callback: EventHandler<Event, FullEventMap[Event]>

        Callback function

      Returns () => void

      • Function that cancels current subscription
        • (): void
        • Returns void

Optional totalCount

totalCount: number

unsubscribe

unsubscribe: <FullEventMap, Event>(event: Event, callback?: EventHandler<Event, FullEventMap[Event]>) => void = ...

Type declaration

    • <FullEventMap, Event>(event: Event, callback?: EventHandler<Event, FullEventMap[Event]>): void
    • Unsubscribe from event

      Type parameters

      • FullEventMap: { videosUpdated: { videos: Video[] } } & { *: any }

      • Event: string

      Parameters

      • event: Event

        This string can contain: event name, namespace of event name, list of event names separated by a space or '*' to unsubscribe from all events

      • Optional callback: EventHandler<Event, FullEventMap[Event]>

        Callback function

      Returns void

videos

videos: Video[] = []

Methods

addVideos

  • addVideos(videos: Video[], at?: number): void
  • Parameters

    • videos: Video[]
    • Optional at: number

    Returns void

getVideoAt

  • getVideoAt(index: number): undefined | Video
  • Parameters

    • index: number

    Returns undefined | Video

getVideoBy

  • getVideoBy(id: string): undefined | Video
  • Parameters

    • id: string

    Returns undefined | Video

loadMoreVideos

removeVideo

  • removeVideo(videoId: string): void
  • Parameters

    • videoId: string

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property

Generated using TypeDoc