view src/app/analysis-item/analysis-item.component.ts @ 192:e4f38975c2bc

Introduce interface for reading a file, once again avoiding specific browser implementation.
author Lucas Thompson <dev@lucas.im>
date Thu, 23 Mar 2017 15:42:34 +0000
parents a50feba0d7f0
children d7e4bba39d20
line wrap: on
line source
/**
 * Created by lucast on 21/03/2017.
 */
import {Component, Input} from "@angular/core";
import Waves from 'waves-ui';

export interface Analysis {
  audioUri: string;
  combinedKey: string;
}

@Component({
  selector: 'ugly-analysis-item',
  templateUrl: './analysis-item.component.html',
  styleUrls: ['./analysis-item.component.css']
})
export class AnalysisItemComponent {
  private _audioBuffer: AudioBuffer;
  @Input() timeline: Timeline;
  @Input() title: string;
  @Input() description: string;

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

    }
  }

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