comparison src/app/app.component.ts @ 457:906dd152e333

Unload current audio from the audio player if removed.
author Lucas Thompson <dev@lucas.im>
date Thu, 29 Jun 2017 20:24:31 +0100
parents 7bb0bac6f8dc
children 8d561b6df2fa
comparison
equal deleted inserted replaced
456:7bb0bac6f8dc 457:906dd152e333
264 toRemove.push(index); 264 toRemove.push(index);
265 } 265 }
266 return toRemove; 266 return toRemove;
267 }, []); 267 }, []);
268 if (isPendingRootAudioItem(item)) { 268 if (isPendingRootAudioItem(item)) {
269 this.resourceManager.revokeUrlToResource(item.uri); 269 if (this.rootAudioItem.uri === item.uri) {
270 this.audioService.unload();
271 } else {
272 this.resourceManager.revokeUrlToResource(item.uri);
273 }
270 } 274 }
271 this.analyses.remove(...indicesToRemove); 275 this.analyses.remove(...indicesToRemove);
272 } 276 }
273 277
274 ngOnDestroy(): void { 278 ngOnDestroy(): void {