Web Audio API for Angular is a library for declarative use of the Web Audio API with Angular 7+. It also provides a service that allows you to easily convert a hosted audio file to AudioBuffer through GET requests.
angular play audio in background, web audio api example, web audio api typescript, angular web api project github, angular audio events
How to Create Audio Visualizations with JavaScript | Wave.js
How to make use of it:
You can create an audio graph with directions.
<audio src="/demo.wav" waMediaElementAudioSourceNode> <ng-container #node="AudioNode" waDelayNode [delayTime]="delayTime"> <ng-container waGainNode [gain]="gain"> <ng-container [waOutput]="node"></ng-container> <ng-container waAudioDestinationNode></ng-container> </ng-container> </ng-container> <ng-container waAudioDestinationNode></ng-container> </audio>
To register your AudioWorklet handlers in a generic virtual audio script, you can use tokens:
@NgModule({ bootstrap: [AppComponent], declarations: [AppComponent], providers: [ { provide: AUDIO_WORKLET_PROCESSORS, useValue: 'assets/my-processor.js', multi: true, }, ], }) export class AppModule {}
@Component({ selector: 'app', templateUrl: './app.component.html', }) export class AppComponent { constructor( @Inject(AUDIO_WORKLET_PROCESSORS_READY) readonly processorsReady: Promise<boolean>, ) {} // ... }
Angular Web Audio API Declarative Library Plugin/Github
See Demo And Download
Official Website(ng-web-apis): Click Here
This superior jQuery/javascript plugin is developed by ng-web-apis. For extra Advanced Usages, please go to the official website.