Socket
Socket
Sign inDemoInstall

@music-metadata/s3

Package Overview
Dependencies
16
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @music-metadata/s3

Extension for music-metadata to read metadata from audio files on Amazon S3 storage


Version published
Weekly downloads
14
decreased by-75.44%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Build Status NPM version npm downloads Known Vulnerabilities Total alerts Language grade: JavaScript DeepScan grade

@music-metadata/s3

Extension for music-metadata to retrieve metadata from files stored on Amazon Web Services (AWS) S3 cloud storage.

The magic of this module is, it is able to extract the metadata from your audio files, without downloading and parsing the entire file.

This module is integrating @tokenizer/s3, for reading from the S3 cloud, and using music-metadata to parse the audio file.

Deprecated

This module is deprecated. It has become obsolete with @tokenizer/s3. You may want to use this example as starting point.

Installation

npm install @music-metadata/s3

Reading audio metadata from Amazon S3

Read metadata from 'My audio files/01 - My audio track.flac' stored in the S3 cloud:

const { parseS3Object } = require('@music-metadata/s3');
const S3 = require('aws-sdk/clients/s3');

(async () => {

  const s3 = new S3();

  console.log('Parsing...');
  try {
    const data = await parseS3Object(s3, {
        Bucket: 'your-bucket',
        Key: 'My audio files/01 - My audio track.flac'
      }
    );
    console.log('metadata:', data);
  } catch (e) {
    console.error(`Oops: ${e.message}`);
  }
})();

Using conventional streaming using the disableChunked flag:

const { parseS3Object } = require('@music-metadata/s3');
const S3 = require('aws-sdk/clients/s3');

(async () => {

  const s3 = new S3();
  
  console.log('Parsing...');
  try {
    const data = await parseS3Object(s3, {
        Bucket: 'your-bucket',
        Key: 'My audio files/01 - My audio track.flac'
      }, {
        disableChunked: true // Disable chunked transfer
      }
    );
    console.log('metadata:', data);
  } catch (e) {
    console.error(`Oops: ${e.message}`);
  }
})();

Options

optiontypedescription
disableChunkedbooleanset to true to switch to conventional sequential streaming.

Other options are inherited from music-metadata

Dependency graph

dependency graph

Keywords

FAQs

Last updated on 13 Mar 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc