view src/app/notebook-feed/notebook-feed.component.ts @ 193:ac57ddba8ba9

Provide an observable in the audio service for when new audio has been loaded. The handling of errors is currently undesirable, using optional fields on the returned object. I couldn't figure out the proper Observable error flow without closing the stream.
author Lucas Thompson <dev@lucas.im>
date Thu, 23 Mar 2017 15:44:32 +0000
parents a50feba0d7f0
children d179cf7df697
line wrap: on
line source
/**
 * Created by lucast on 21/03/2017.
 */
import {Component, Input} from "@angular/core";
import Waves from 'waves-ui';

@Component({
  selector: 'ugly-notebook-feed',
  templateUrl: './notebook-feed.component.html',
  styleUrls: ['./notebook-feed.component.css']
})
export class NotebookFeedComponent {
  private _audioBuffer: AudioBuffer;
  sharedTimeline: Timeline;


  @Input()
  set audioBuffer(buffer: AudioBuffer) {
    this._audioBuffer = buffer || undefined;
    if (this.audioBuffer) {

    }
  }

  get audioBuffer(): AudioBuffer {
    return this._audioBuffer;
  }

  constructor() {
    this.sharedTimeline = new Waves.core.Timeline();
  }
}