Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AudioStream

Implements

Index

Constructors

constructor

Properties

Private audio

audio: HTMLAudioElement = new Audio()

Private audioEvents

audioEvents: Array<string> = ['ended','error','play','playing','pause','timeupdate','canplay','loadedmetadata','loadstart']

Private audioInput

audioInput: Array<string> = []

Private config

config: StreamConfig

Private currentTrack

currentTrack: number = 0

Private stateChange

stateChange: Subject<any> = new Subject()

Methods

Private addEvents

  • addEvents(obj: any, events: Array<string>, handler: any): void
  • method to add events listener for audio stream internal implementation, don't use it.

    Parameters

    • obj: any
    • events: Array<string>
    • handler: any

    Returns void

Private autoPlayNext

  • autoPlayNext(): void
  • autoplay the next track if set in config internal implementation, don't use it.

    Returns void

Private configureStream

  • configureStream(config: StreamConfig, input: Array<any>): void

events

  • events(): Observable<any>

Private extractTracks

  • extractTracks(tracks: Array<any>, key: string): Array<string>
  • extract tracks url from Array of tracks internal implementation, don't use it.

    Parameters

    • tracks: Array<any>
    • key: string

    Returns Array<string>

getState

  • getState(): Subject<any>

Private initAudio

  • initAudio(index: number): void
  • initialize the audio stream internal implementation, don't use it.

    Parameters

    • index: number

    Returns void

isFirstPlaying

  • isFirstPlaying(): boolean
  • Method to Check if First Track is Playing or not Alternatively you can this.state() Observable to get state. state has isFirstTrack:boolean to check if First Track is playing or not

    Returns boolean

isLastPlaying

  • isLastPlaying(): boolean
  • Method to Check if Last Track is Playing or not. Alternatively you can this.state() Observable to get state. state has isLastTrack:boolean to check if First Track is playing or not

    Returns boolean

next

  • next(): void
  • Select the Next Audio Item in Playlist. But it doens't play it automatically. Run play() to play the stream

    Returns void

pause

  • pause(): void

play

  • play(): void

playAt

  • playAt(index: number): void

previous

  • previous(): void
  • Select the Previous Audio Item in Playlist. But it doens't play it automatically. Run play() to play the stream

    Returns void

Private removeEvents

  • removeEvents(obj: any, events: Array<string>, handler: any): void
  • method to remove events listeners for audio stream internal implementation, don't use it.

    Parameters

    • obj: any
    • events: Array<string>
    • handler: any

    Returns void

seekTo

  • seekTo(time: number): void

stop

  • stop(): void

switchTo

  • switchTo(index: number): void
  • Switch the currrent Track to particular index It just switch the track, doesn't play the track. To do switch and play, use platAt() method.

    Parameters

    • index: number

    Returns void

Private updateStateEvents

  • updateStateEvents(event: Event): void
  • method to update state from audio events internal implementation, don't use it.

    Parameters

    • event: Event

    Returns void

Private updateStateProps

  • updateStateProps(obj: any, prop: string, value: any): void
  • method to update state from properties internal implementation, don't use it.

    Parameters

    • obj: any
    • prop: string
    • value: any

    Returns void

Object literals

Private state

state: object

isFirstTrack

isFirstTrack: false = false

isLastTrack

isLastTrack: false = false

playing

playing: false = false

trackInfo

trackInfo: object

currentTime

currentTime: undefined = undefined

currentTrack

currentTrack: undefined = undefined

duration

duration: undefined = undefined

readableCurrentTime

readableCurrentTime: string = ""

readableDuration

readableDuration: string = ""

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc