
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@libertymp/ngx-howler
Advanced tools
Audio library based on howler.js for Angular
npm install ngx-howler --save
Load howler.js library, you can use local or external CDN
export class AppModule {
constructor(
ngxHowlerService: NgxHowlerService
) {
ngxHowlerService.loadScript('https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.0/howler.min.js');
}
}
Register an audio object
export class ExampleComponent implements OnInit {
constructor(
public howl: NgxHowlerService
) {
}
ngOnInit() {
this.howl.register('dev', {
src: ['sound.mp3'],
html5: true
}).subscribe(status => {
// ok
});
}
}
Play this audio object
export class ExampleComponent implements OnInit {
constructor(
public howl: NgxHowlerService
) {
}
play() {
this.howl.get('dev').play();
}
}
If howler's listen event is used, you need to manually cancel the listen when the page is destroyed
export class ExampleComponent implements OnInit {
constructor(
public howl: NgxHowlerService
) {
}
ngOnInit() {
this.howl.get('dev').on('load', () => {
// ...
});
}
ngOnDestroy() {
this.howl.get('dev').off();
}
}
Unregistered audio object
export class ExampleComponent implements OnInit {
constructor(
public howl: NgxHowlerService
) {
}
unregister() {
this.howl.unregister('dev');
}
}
FAQs
Audio library based on howler.js for Angular
We found that @libertymp/ngx-howler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.