Commit 9675ca3a authored by Stephanus Volke's avatar Stephanus Volke

remove destination.js

parent b2ca613d
Pipeline #754 passed with stages
in 11 seconds
import {AudioNodeInterface} from './audio-node-interface.js';
export class HTMLAudioDestination extends AudioNodeInterface {
/**
* The HTMLAudioSource class is a custom element projecting the
* AudioSource interface of the WebAudio API into an html tag
* `<html-audio-source>`. It handles the playback of a specific audio
* buffer. There is no hard dependenciy to any other element but
* assumes that there also exist an `<html-audio-buffer>` element in
* the same document.
*
* ## Usage
*
* ``` html
* <html-audio-source id="source"
* buffer-id="buffer"
* state="playing"></html-audio-buffer>
* ```
*
* >! Note: It is required to specify an `id` and a `buffer-id` attribute for this element.
*
* ## API Reference
*
* ### Properties
*
* - **id**{string}: unique identifyer for this element. Access:
* (attr|api) *Required*
*
* - **buffer-id**{string}: identifyer of a `html-audio-buffer`
* element. Access: (attr|api) *Required*
*
*
* - **state**{string}: current state of audio source. Can be
* {waiting, ready, playing, paused, stopped}. This attribute
* controls audio playback. Access: (attr|api)
*
* - **start-pos**{float}: playback start position in seconds. Access: (attr|api)
*
* - **cur-pos**{float}: while playback this attribute shows the
* current playback position. Access: (attr|api) *read only*
*
* - **exclusive**{bool}: If this bool attribute is set, all other
* sources were stopped before playback starts. Access: (attr|api)
*
* ### Methods
*
* - **play()**: Starts playback at `start-pos`.
*
* - **pause()**: Playback pauses at `cur-pos`.
*
* - **stop()**: Playback stopps and `cur-pos` will be set to 0.
*/
constructor() {
super();
this.isSourceNode = false;
}
static get observedAttributes() {
}
connectedCallback() {
super.connectedCallback();
this.node = this._context.destination;
}
attributeChangedCallback(attrName, oldVal, newVal) {
}
}
window.customElements.define('html-audio-destination', HTMLAudioDestination);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment