Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

araudioplayer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

araudioplayer

audio player interface for web AR projects made by Patrice-Morgan Ongoly for the House of Venus

  • 0.2.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

ARAudioPlayer

for emily

an audio player for web AR experiences and distributed applications

The ARAudioPlayer generates an audio player that users can experience in augmented reality through a web browser on most mobile, laptop, desktop, or tablet devices. Experiences are produced using Three.js/AFrame to achieve a secure, cross-platform standard for sharing audio on the Immersive Web.

Developers can implement the module in both modular server-side and non-modular client-side applications with just a few lines of JavaScript code.

Tutorials:

  • Build and Share Your Own AR Music Playlist

Usage:

Server-side

Client-side

Server-Side

  1. install using npm
npm install araudioplayer
  1. import araudioplayer (using require is recommended: not all releases of Node have the newest ES6 features enabled by default)

(a) using add method

var myPlayer = require('araudioplayer');

myPlayer.add('../media/img/OracularSpectacular.png', '../media/audio/TheYouth.mp3' , { title: 'The Youth', author: 'MGMT', year: 2007});

myPlayer.add('../media/img/ExtraFine.png', '../media/audio/ExtraFine.mp3', { title: 'Extra Fine', author: 'Starmaker', year: 2019});

myPlayer.spawn();

(b) using addFromList method

an object or array of objects in the following format can be processed by the module to generate same outcome as above

var myPlayer = require('araudioplayer');

var collection = {
    'The Youth': {
        coverURL: '../media/audio/TheYouth.png',
        audioURL: '../media/audio/TheYouth.mp3',
        {
            title: 'The Youth',
            author: 'MGMT',
            year: 2007
        }
    },
    'Extra Fine': {
        coverURL: '../media/audio/ExtraFine.png',
        audioURL: '../media/audio/ExtraFine.mp3',
        {
            title: 'Extra Fine',
            author: 'Starmaker',
            year: 2019
        }
    }
};

myPlayer.addFromList(collection);
myPlayer.spawn();

Client-Side

  1. download the boilerplate or make your own test directory
  2. move to the app.js or index.js level of the directory and create a test.js file
  3. implement as follows:
var myPlayer = new ARAudioPlayer();
myPlayer.build();

myPlayer.add('../media/img/OracularSpectacular.png', '../media/audio/TheYouth.mp3' , { title: 'The Youth', author: 'MGMT', year: 2007});

coreEventListeners.launch([myPlayer]);

Full API

propertytypedescription
typestringshort paragraph descriptor of type property
socketobjectshort paragraph descriptor of socket object
hellomethodshort paragraph descriptor of hello method
buildCoreMarkupmethodshort paragraph descriptor of buildCoreMarkup method
spawnmethodshort paragraph descriptor of spawn method
assetsContainerobjectshort paragraph descriptor of assetContainer object
buildmethodshort paragraph descriptor of build method
addmethodshort paragraph descriptor of add method
addFromListmethodshort paragraph descriptor of addFromList method
showTrackListmethodshort paragraph descriptor of showTrackList method
playNextTrackmethodshort paragraph descriptor of playNextTrack method
playPreviousTrackmethodshort paragraph descriptor of playPreviousTrack method
streammethodshort paragraph descriptor of type method
applicationobjectshort paragraph descriptor of type object
viewstringshort paragraph descriptor of type property
XRSettingstringshort paragraph descriptor of type property

FAQs

Package last updated on 08 Jan 2019

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