New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-audio-context

Package Overview
Dependencies
Maintainers
1
Versions
462
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-audio-context

An AngularJS wrapper for the Web Audio API's AudioContext

  • 1.2.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by131.07%
Maintainers
1
Weekly downloads
 
Created
Source

angular-audio-context

An AngularJS wrapper for the Web Audio API's AudioContext.

tests dependencies version

Besides being a wrapper this module also patches the deprecated and prefixed versions of the AudioContext which are out there. It uses the standardized-audio-context to do so.

This module is intended to be used with Browserify like this:

var audioContext = require('angular-audio-context');

angular
  .module('my-app', [audioContext.name])
  .controller('ExampleCtrl', ['audioContextService', function (audioContextService) {

    // do something with the audioContextService instance ...

}]);

In addition to the audioContextService, which is essentially an instantiated AudioContext, this module also provides an extra property called isSupported. It is a boolean value that indicates if the currently used browser supports the Web Audio API's AudioContext or not. An example usage might look like this:

angular
    .module('your-module', [])
    .config(function (audioContextServiceProvider, $provide) {
        $provide.constant('audioContextIsSupported', audioContextServiceProvider.isSupported);
    })
    .controller('YourController', ['audioContextIsSupported', function (audioContextIsSupported) {

        this.audioContextIsSupported = audioContextIsSupported;

    });
<div ng-controller="YourController as ctrl" ng-if="!ctrl.audioContextIsSupported">
    <span>Sorry AudioContext is not supported.</span>
</div>

In case you are missing a feature or found a bug just fork this repository or raise an issue. Thanks.

There is also module called ngWebAudio which tries to simplify the buffering and playback of a single audio file by utilizing the Web Audio API.

The naming of this module tries to align with the recommendations given in the Specification for reusable AngularJS components.

FAQs

Package last updated on 22 Feb 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc