Skip to content

stagas/audio-transport

Repository files navigation

audio-transport

Audio Transport control.

npm i audio-transport pnpm add audio-transport yarn add audio-transport

API

# AudioTransportElement

    # constructor()
    # $

      Context<AudioTransportElement & JsxContext<AudioTransportElement> & Omit<{

      # ctor

        Class<T>

      <T>(ctor)  =>

        CleanClass<T>

      # ctx

        T | Class<T>

      <T>(ctx)  =>

        Wrapper<T>

      } & __module & {

      # Boolean

        undefined | boolean

      # Number

        undefined | number

      # String

        undefined | string

      }, "transition">>

    # Bpm

      # ()

        ()  =>

          VKid

    # Logo

      # ()

        ()  =>

          VKid

    # NumberInput  =  ...

      Component<NumberInputElement, HTMLElement>

    # PlayPauseStop

      # ()

        ()  =>

          VKid

    # Time

      # ()

        ()  =>

          VKid

    # analyserBuffer  =  ...

      Float32Array

    # analyserNode  =  ...

      AnalyserNode

    # audioContext  =  ...

      AudioContext

    # bar

      HTMLSpanElement

    # beat

      HTMLSpanElement

    # bpm  =  120

      number

    # clipLag  =  3000

      number

    # clipThreshold  =  ...

      number

    # clipping  =  true

      boolean

    # context

      ContextClass<AudioTransportElement & JsxContext<AudioTransportElement> & Omit<{

      # ctor

        Class<T>

      <T>(ctor)  =>

        CleanClass<T>

      # ctx

        T | Class<T>

      <T>(ctx)  =>

        Wrapper<T>

      } & __module & {

      # Boolean

        undefined | boolean

      # Number

        undefined | number

      # String

        undefined | string

      }, "transition">>

    # dispatch

      Dispatch<

      # (name, detail, init)

        # name

          Event | Narrow<K, string>

        # detail
        # init

          CustomEventInit<any>

        <K, E>(name, detail, init)  =>

          any

      >

    # gradient  =  ...

      CanvasGradient

    # gradientCanvas  =  ...

      HTMLCanvasElement & {

      # height  =  1

        number

      # width  =  100

        number

      }

    # gradientCanvasCtx  =  ...

      CanvasRenderingContext2D

    # host
    # lastClip  =  0

      number

    # lastPeak  =  0

      number

    # mainGain  =  ...

      GainNode

    # onmounted
    # onunmounted
    # pause  =  ...

      Fn<[ ], void>

    # pausedTime  =  0

      number

    # peak  =  1

      number

    # peakLag  =  1000

      number

    # peakVolume  =  1

      number

    # play  =  ...

      Fn<[ ], void>

    # playOrPause  =  ...

      Fn<[ ], void>

    # schedulerNode  =  ...

      SchedulerNode

    # sixt

      HTMLSpanElement

    # start  =  ...

      Fn<[ ], Promise<void>>

    # startTime  =  0

      number

    # state  =  ...

      State<AudioTransportElement, {

      # Idle  =  'idle'

        "idle"

      # Paused  =  'paused'

        "paused"

      # Playing  =  'playing'

        "playing"

      # Stopped  =  'stopped'

        "stopped"

      }, "idle" | "playing" | "paused" | "stopped"> & EventMethods<AudioTransportElement, {

      # idlecancel

        CustomEvent<any>

      # idleend

        CustomEvent<any>

      # idlepause

        CustomEvent<any>

      # idleresume

        CustomEvent<any>

      # idlestart

        CustomEvent<any>

      # pausedcancel

        CustomEvent<any>

      # pausedend

        CustomEvent<any>

      # pausedpause

        CustomEvent<any>

      # pausedresume

        CustomEvent<any>

      # pausedstart

        CustomEvent<any>

      # playingcancel

        CustomEvent<any>

      # playingend

        CustomEvent<any>

      # playingpause

        CustomEvent<any>

      # playingresume

        CustomEvent<any>

      # playingstart

        CustomEvent<any>

      # stoppedcancel

        CustomEvent<any>

      # stoppedend

        CustomEvent<any>

      # stoppedpause

        CustomEvent<any>

      # stoppedresume

        CustomEvent<any>

      # stoppedstart

        CustomEvent<any>

      }> & InlineEventMap<AudioTransportElement, {

      # idlecancel

        CustomEvent<any>

      # idleend

        CustomEvent<any>

      # idlepause

        CustomEvent<any>

      # idleresume

        CustomEvent<any>

      # idlestart

        CustomEvent<any>

      # pausedcancel

        CustomEvent<any>

      # pausedend

        CustomEvent<any>

      # pausedpause

        CustomEvent<any>

      # pausedresume

        CustomEvent<any>

      # pausedstart

        CustomEvent<any>

      # playingcancel

        CustomEvent<any>

      # playingend

        CustomEvent<any>

      # playingpause

        CustomEvent<any>

      # playingresume

        CustomEvent<any>

      # playingstart

        CustomEvent<any>

      # stoppedcancel

        CustomEvent<any>

      # stoppedend

        CustomEvent<any>

      # stoppedpause

        CustomEvent<any>

      # stoppedresume

        CustomEvent<any>

      # stoppedstart

        CustomEvent<any>

      }>

    # stop  =  ...

      Fn<[ ], void>

    # volume  =  1

      number

    # vu

      HTMLElement

    # created(ctx)

      # ctx

        Context<AudioTransportElement & JsxContext<AudioTransportElement> & Omit<{

        # ctor

          Class<T>

        <T>(ctor)  =>

          CleanClass<T>

        # ctx

          T | Class<T>

        <T>(ctx)  =>

          Wrapper<T>

        } & __module & {

        # Boolean

          undefined | boolean

        # Number

          undefined | number

        # String

          undefined | string

        }, "transition">>

      created(ctx)  =>

        void

    # mounted($)

      # $

        Context<AudioTransportElement & JsxContext<AudioTransportElement> & Omit<{

        # ctor

          Class<T>

        <T>(ctor)  =>

          CleanClass<T>

        # ctx

          T | Class<T>

        <T>(ctx)  =>

          Wrapper<T>

        } & __module & {

        # Boolean

          undefined | boolean

        # Number

          undefined | number

        # String

          undefined | string

        }, "transition">>

      mounted($)  =>

        void

    # on(name)
    # setParam(param, targetValue, slope)

      # param

        AudioParam

      # targetValue

        number

      # slope  =  0.015

        number

      setParam(param, targetValue, slope)  =>

        void

    # toJSON()

# TransportableNode

    {

    # start

      # (time)

        # time

          number

        (time)  =>

          void

    # stop

      # (time)

        # time

          number

        (time)  =>

          void

    }

# AudioTransportState  =  ...

    {

    # Idle  =  'idle'

      "idle"

    # Paused  =  'paused'

      "paused"

    # Playing  =  'playing'

      "playing"

    # Stopped  =  'stopped'

      "stopped"

    }

Credits

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas