comparison src/app/notebook-feed/notebook-feed.component.ts @ 469:3a76205e06b6

Unload audio when stack is empty.
author Lucas Thompson <dev@lucas.im>
date Fri, 30 Jun 2017 15:56:43 +0100
parents 50f61d1945db
children 2142e7820706
comparison
equal deleted inserted replaced
468:2fb2357420f9 469:3a76205e06b6
32 const front = analyses[0]; 32 const front = analyses[0];
33 if (analyses !== this.mAnalyses) { 33 if (analyses !== this.mAnalyses) {
34 if (front && getRootUri(front) !== this.currentAudioUri) { 34 if (front && getRootUri(front) !== this.currentAudioUri) {
35 this.audioService.unload(); 35 this.audioService.unload();
36 this.audioService.loadAudioFromUri(getRootUri(front)); 36 this.audioService.loadAudioFromUri(getRootUri(front));
37 } else if (!front) {
38 this.audioService.unload();
37 } 39 }
38 } 40 }
39 this.mAnalyses = analyses; 41 this.mAnalyses = analyses;
40 if (front) { 42 if (front) {
41 this.currentAudioUri = this.getCurrentAudioUri(); 43 this.currentAudioUri = this.getCurrentAudioUri();