annotate src/app/analysis-item/analysis-item.component.ts @ 196:aa1c92c553cb

A few different @Input flags allowing for using component for just a waveform or features or both, turning off seeking and allowing more than one feature to be extracted to the component. Very messy, desperately needs refactoring.
author Lucas Thompson <dev@lucas.im>
date Fri, 24 Mar 2017 11:00:54 +0000
parents a50feba0d7f0
children d7e4bba39d20
rev   line source
dev@170 1 /**
dev@170 2 * Created by lucast on 21/03/2017.
dev@170 3 */
dev@170 4 import {Component, Input} from "@angular/core";
dev@181 5 import Waves from 'waves-ui';
dev@170 6
dev@170 7 export interface Analysis {
dev@170 8 audioUri: string;
dev@170 9 combinedKey: string;
dev@170 10 }
dev@170 11
dev@170 12 @Component({
dev@170 13 selector: 'ugly-analysis-item',
dev@170 14 templateUrl: './analysis-item.component.html',
dev@170 15 styleUrls: ['./analysis-item.component.css']
dev@170 16 })
dev@170 17 export class AnalysisItemComponent {
dev@170 18 private _audioBuffer: AudioBuffer;
dev@189 19 @Input() timeline: Timeline;
dev@188 20 @Input() title: string;
dev@188 21 @Input() description: string;
dev@170 22
dev@170 23 @Input()
dev@170 24 set audioBuffer(buffer: AudioBuffer) {
dev@170 25 this._audioBuffer = buffer || undefined;
dev@170 26 if (this.audioBuffer) {
dev@170 27
dev@170 28 }
dev@170 29 }
dev@170 30
dev@170 31 get audioBuffer(): AudioBuffer {
dev@170 32 return this._audioBuffer;
dev@170 33 }
dev@170 34 }