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

music-metadata-browser

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

music-metadata-browser - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

.eslintrc

47

karma.conf.js
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
const path = require('path')
const path = require('path');

@@ -59,9 +59,48 @@ module.exports = config => {

}
},
combineBrowserReports: true // Combines coverage information from multiple browsers into one report
},
// global BrowserStack configuration
browserStack: {
forcelocal: true // force traffic through the local BrowserStack tunnel, passes flag through to BrowserStackTunnel
},
// define browsers
customLaunchers: {
bs_win_chrome_69: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Chrome',
browser_version: '69.0'
},
bs_win_firefox_62: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Firefox',
browser_version: '62.0'
},
bs_osx_safari_12: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Mojave',
browser: 'Safari',
browser_version: '12.0'
},
bs_win_edge_17: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Edge',
browser_version: '17'
}
},
//autoWatch: true,
browsers: ['Chrome'],
colors: true,
singleRun: false
})
}
singleRun: false,
});
};

29

package.json
{
"name": "music-metadata-browser",
"version": "0.6.1",
"version": "0.6.2",
"description": "Browserifed version of music-metadata",

@@ -53,3 +53,5 @@ "main": "dist/index.js",

"build": "npm run compile-dist",
"lint": "tslint 'src/**/*.ts' --exclude 'src/**/*.d.ts' 'test/**/*.ts' --exclude 'test/**/*.d.ts'",
"tslint": "tslint 'src/**/*.ts' --exclude 'src/**/*.d.ts' 'test/**/*.ts' --exclude 'test/**/*.d.ts'",
"eslint": "eslint karma.conf.js",
"lint": "npm run tslint && npm run eslint",
"karma": "karma start",

@@ -59,13 +61,18 @@ "karma-firefox": "karma start --browsers Firefox",

"travis-karma": "karma start --browsers Firefox --single-run --reporters coverage-istanbul,spec",
"post-coveralls": "coveralls < coverage/lcov.info"
"browserstack": "karma start --browsers bs_win_chrome_69,bs_win_firefox_62,bs_osx_safari_12,bs_win_edge_17 --single-run --reporters coverage-istanbul,spec",
"travis-karma-browserstack": "karma start --browsers bs_win_chrome_69,bs_win_firefox_62,bs_osx_safari_12,bs_win_edge_17 --single-run --reporters coverage-istanbul,spec,BrowserStack",
"post-coveralls": "coveralls < coverage/lcov.info",
"post-codacy": " codacy-coverage < coverage/lcov.info"
},
"devDependencies": {
"@types/jasmine": "^2.8.8",
"@types/node": "^10.9.4",
"@types/jasmine": "^2.8.9",
"@types/node": "^10.12.1",
"coveralls": "^3.0.2",
"del-cli": "^1.1.0",
"eslint": "^5.8.0",
"filereader-stream": "^2.0.0",
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "^3.2.1",
"karma": "^3.0.0",
"jasmine-core": "^3.3.0",
"karma": "^3.1.1",
"karma-browserstack-launcher": "^1.3.0",
"karma-chrome-launcher": "^2.2.0",

@@ -75,7 +82,7 @@ "karma-coverage-istanbul-reporter": "^2.0.4",

"karma-jasmine": "^1.1.2",
"karma-jasmine-html-reporter": "^1.3.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-spec-reporter": "^0.0.32",
"karma-webpack": "^3.0.5",
"stream-http": "^2.8.3",
"ts-loader": "^5.2.1",
"stream-http": "^3.0.0",
"ts-loader": "^5.2.2",
"tslint": "^5.11.0",

@@ -89,3 +96,3 @@ "typescript": "^3.0.3",

"debug": "^4.0.1",
"music-metadata": "^3.1.4",
"music-metadata": "^3.1.6",
"remove": "^0.1.5",

@@ -92,0 +99,0 @@ "typedarray-to-buffer": "^3.1.5"

@@ -6,4 +6,6 @@ [![Build Status](https://travis-ci.org/Borewit/music-metadata-browser.svg?branch=master)](https://travis-ci.org/Borewit/music-metadata-browser)

[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/music-metadata/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/music-metadata-browser?targetFile=package.json)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/77818ccb061e445e907cacbafc6ac8c2)](https://www.codacy.com/app/Borewit/music-metadata-browser?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Borewit/music-metadata-browser&amp;utm_campaign=Badge_Grade)
[![Coverage Status](https://coveralls.io/repos/github/Borewit/music-metadata-browser/badge.svg?branch=master)](https://coveralls.io/github/Borewit/music-metadata-browser?branch=master)
![NPM version](https://img.shields.io/bundlephobia/min/music-metadata-browser.svg)
![Minified size](https://img.shields.io/bundlephobia/min/music-metadata-browser.svg)
[![Chat](https://img.shields.io/discord/460524735235883049.svg)](https://discord.gg/M8EWZk7)

@@ -16,23 +18,23 @@ # music-metadata-browser

* Supports metadata of the following audio and tag types:
* Supports metadata of the following audio and tag types:
### Support for audio file types:
### Support for audio file types
| Audio format | Description | Wiki | |
| ------------- |---------------------------------| -------------------------------------------------------------------|:---:|
| AIFF / AIFF-C | Audio Interchange File Format | [:link:](https://wikipedia.org/wiki/Audio_Interchange_File_Format) | <img src="https://upload.wikimedia.org/wikipedia/commons/8/84/Apple_Computer_Logo_rainbow.svg" width="40" alt="Apple rainbow logo">
| APE | Monkey's Audio | [:link:](https://wikipedia.org/wiki/Monkey's_Audio) | <img src="https://foreverhits.files.wordpress.com/2015/05/ape_audio.jpg" width="40" alt="Monkey's Audio logo">
| ASF | Advanced Systems Format | [:link:](https://wikipedia.org/wiki/Advanced_Systems_Format) |
| FLAC | Free Lossless Audio Codec | [:link:](https://wikipedia.org/wiki/FLAC) | <img src="https://upload.wikimedia.org/wikipedia/commons/e/e0/Flac_logo_vector.svg" width="80" alt="FLAC logo">
| MP2 | MPEG-1 Audio Layer II | [:link:](https://wikipedia.org/wiki/MPEG-1_Audio_Layer_II) |
| MP3 | MPEG-1 / MPEG-2 Audio Layer III | [:link:](https://wikipedia.org/wiki/MP3) | <img src="https://upload.wikimedia.org/wikipedia/commons/e/ea/Mp3.svg" width="80" alt="MP3 logo">
| MPEG 4 | mp4, m4a, m4v, aac | [:link:](https://wikipedia.org/wiki/MPEG-4) | <img src="https://svgshare.com/i/8Ss.svg" width="40" alt="AAC logo">
| Ogg / Opus | | [:link:](https://wikipedia.org/wiki/Opus_(audio_format)) | <img src="https://upload.wikimedia.org/wikipedia/commons/0/02/Opus_logo2.svg" width="80" alt="Opus logo">
| Ogg / Speex | | [:link:](https://wikipedia.org/wiki/Speex) | <img src="https://upload.wikimedia.org/wikipedia/commons/b/b5/Speex_logo_2006.svg" width="80" alt="Speex logo">
| Ogg / Vorbis | | [:link:](https://wikipedia.org/wiki/Ogg_Vorbis) | <img src="https://upload.wikimedia.org/wikipedia/en/a/ac/XiphophorusLogoSVG.svg" width="70" alt="Vorbis logo">
| WAV | | [:link:](https://wikipedia.org/wiki/WAV) | <img src="https://www.shareicon.net/download/2015/12/08/684232_file.svg" width="60" alt="WAV logo">
| WavPack | | [:link:](https://wikipedia.org/wiki/WavPack) | <img src="http://www.wavpack.com/wavpacklogo.svg" width="60" alt="WavPack logo">
| WMA | Windows Media Audio | [:link:](https://wikipedia.org/wiki/Windows_Media_Audio) | <img src="https://upload.wikimedia.org/wikipedia/commons/7/76/Windows_Media_Player_simplified_logo.svg" width="40" alt="Windows Media logo">
| Audio format | Description | Wiki | |
| ------------- |---------------------------------| -------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------:|
| AIFF / AIFF-C | Audio Interchange File Format | [:link:](https://wikipedia.org/wiki/Audio_Interchange_File_Format) | <img src="https://upload.wikimedia.org/wikipedia/commons/8/84/Apple_Computer_Logo_rainbow.svg" width="40" alt="Apple rainbow logo"> |
| APE | Monkey's Audio | [:link:](https://wikipedia.org/wiki/Monkey's_Audio) | <img src="https://foreverhits.files.wordpress.com/2015/05/ape_audio.jpg" width="40" alt="Monkey's Audio logo"> |
| ASF | Advanced Systems Format | [:link:](https://wikipedia.org/wiki/Advanced_Systems_Format) | |
| FLAC | Free Lossless Audio Codec | [:link:](https://wikipedia.org/wiki/FLAC) | <img src="https://upload.wikimedia.org/wikipedia/commons/e/e0/Flac_logo_vector.svg" width="80" alt="FLAC logo"> |
| MP2 | MPEG-1 Audio Layer II | [:link:](https://wikipedia.org/wiki/MPEG-1_Audio_Layer_II) | |
| MP3 | MPEG-1 / MPEG-2 Audio Layer III | [:link:](https://wikipedia.org/wiki/MP3) | <img src="https://upload.wikimedia.org/wikipedia/commons/e/ea/Mp3.svg" width="80" alt="MP3 logo"> |
| MPEG 4 | mp4, m4a, m4v, aac | [:link:](https://wikipedia.org/wiki/MPEG-4) | <img src="https://svgshare.com/i/8Ss.svg" width="40" alt="AAC logo"> |
| Ogg / Opus | | [:link:](https://wikipedia.org/wiki/Opus_(audio_format)) | <img src="https://upload.wikimedia.org/wikipedia/commons/0/02/Opus_logo2.svg" width="80" alt="Opus logo"> |
| Ogg / Speex | | [:link:](https://wikipedia.org/wiki/Speex) | <img src="https://upload.wikimedia.org/wikipedia/commons/b/b5/Speex_logo_2006.svg" width="80" alt="Speex logo"> |
| Ogg / Vorbis | | [:link:](https://wikipedia.org/wiki/Ogg_Vorbis) | <img src="https://upload.wikimedia.org/wikipedia/en/a/ac/XiphophorusLogoSVG.svg" width="70" alt="Vorbis logo"> |
| WAV | | [:link:](https://wikipedia.org/wiki/WAV) | <img src="https://www.shareicon.net/download/2015/12/08/684232_file.svg" width="60" alt="WAV logo"> |
| WavPack | | [:link:](https://wikipedia.org/wiki/WavPack) | <img src="http://www.wavpack.com/wavpacklogo.svg" width="60" alt="WavPack logo"> |
| WMA | Windows Media Audio | [:link:](https://wikipedia.org/wiki/Windows_Media_Audio) | <img src="https://upload.wikimedia.org/wikipedia/commons/7/76/Windows_Media_Player_simplified_logo.svg" width="40" alt="Windows Media logo"> |
### Support for tags:
### Support for tags

@@ -47,14 +49,15 @@ * [APE](https://en.wikipedia.org/wiki/APE_tag)

### Audio format & encoding details:
### Audio format & encoding details
* Support for encoding / format details:
* [Bit rate](https://wikipedia.org/wiki/Bit_rate)
* [Audio bit depth](https://wikipedia.org/wiki/Audio_bit_depth)
* Duration
* encoding profile (e.g. [CBR](https://en.wikipedia.org/wiki/Constant_bitrate), V0, V2)
Support for encoding / format details:
* [Bit rate](https://wikipedia.org/wiki/Bit_rate)
* [Audio bit depth](https://wikipedia.org/wiki/Audio_bit_depth)
* Duration
* encoding profile (e.g. [CBR](https://en.wikipedia.org/wiki/Constant_bitrate), V0, V2)
### Online demo's
* [Audio Tag Analyzer](https://audio-tag-analyzer.netlify.com/)
* [Webamp powered with music-metadata](https://music-metadata-webamp.netlify.com/)
## Online demo's
* [<img src="https://gitcdn.xyz/repo/Borewit/audio-tag-analyzer/master/src/assets/icon/audio-tag-analyzer.svg" width="40">Audio Tag Analyzer](https://audio-tag-analyzer.netlify.com/)
* [<img src="https://svgshare.com/i/8uW.svg" width="40"> Webamp](https://webamp.org/)
### Donation

@@ -75,3 +78,3 @@ Not required, but would be extremely motivating.

### Import music-metadata:
### Import music-metadata

@@ -88,3 +91,3 @@ This is how you can import music-metadata in JavaScript, in you code:

### Module Functions:
### Module Functions

@@ -202,11 +205,13 @@ There are currently three ways to parse (read) audio tracks:

### Options:
* `duration`: default: `false`, if set to `true`, it will parse the whole media file if required to determine the duration.
* `fileSize`: provide this if parsing from a stream.
* `loadParser: (moduleName: string) => Promise<ITokenParser>;`: default: lazy load using require, allows custom async lazy loading of parser modules. The resolved `ITokenParser` will not be cached.
* `native`: default: `false`, if set to `true`, it will return native tags in addition to the `common` tags.
* `observer: (update: MetadataEvent) => void;`: Will be called after each change to `common` (generic) tag, or `format` properties.
* `skipCovers`: default: `false`, if set to `true`, it will not return embedded cover-art (images).
* `skipPostHeaders? boolean` default: `false`, if set to `true`, it will not search all the entire track for additional headers. Only recommenced to use in combination with streams.
### Options
The following (optional) configurations can be passed:
* `duration`: default: `false`, if set to `true`, it will parse the whole media file if required to determine the duration.
* `fileSize`: provide this if parsing from a stream.
* `loadParser: (moduleName: string) => Promise<ITokenParser>;`: default: lazy load using require, allows custom async lazy loading of parser modules. The resolved `ITokenParser` will not be cached.
* `native`: default: `false`, if set to `true`, it will return native tags in addition to the `common` tags.
* `observer: (update: MetadataEvent) => void;`: Will be called after each change to `common` (generic) tag, or `format` properties.
* `skipCovers`: default: `false`, if set to `true`, it will not return embedded cover-art (images).
* `skipPostHeaders? boolean` default: `false`, if set to `true`, it will not search all the entire track for additional headers. Only recommenced to use in combination with streams.
Although in most cases duration is included, in some cases it requires `music-metadata` parsing the entire file.

@@ -219,22 +224,21 @@ To enforce parsing the entire file if needed you should set `duration` to `true`.

* [`format: IFormat`](#format) Audio format information
* `native: INativeTags` List of native (original) tags found in the parsed audio file. If the native option is set to false, this property is not defined.
* [`common: ICommonTagsResult`](doc/common_metadata.md) Is a generic (abstract) way of reading metadata information.
* [`format: IFormat`](#format) Audio format information
* `native: INativeTags` List of native (original) tags found in the parsed audio file. If the native option is set to false, this property is not defined.
* [`common: ICommonTagsResult`](doc/common_metadata.md) Is a generic (abstract) way of reading metadata information.
#### Format
Audio format information. Defined in the TypeScript `IFormat` interface:
Audio format information. Defined in the TypeScript `IFormat` interface:
* `dataformat?: string` Audio encoding format. e.g.: 'flac'
* `tagTypes?: TagType[]` List of tagging formats found in parsed audio file
* `duration?: number` Duration in seconds
* `bitrate?: number` Number bits per second of encoded audio file
* `sampleRate?: number` Sampling rate in Samples per second (S/s)
* `bitsPerSample?: number` Audio bit depth
* `encoder?` Encoder name
* `codecProfile?: string` Codec profile
* `lossless?: boolean` True if lossless, false for lossy encoding
* `numberOfChannels?: number` Number of audio channels
* `numberOfSamples?: number` Number of samples frames, one sample contains all channels. The duration is: numberOfSamples / sampleRate
* `dataformat?: string` Audio encoding format. e.g.: 'flac'
* `tagTypes?: TagType[]` List of tagging formats found in parsed audio file
* `duration?: number` Duration in seconds
* `bitrate?: number` Number bits per second of encoded audio file
* `sampleRate?: number` Sampling rate in Samples per second (S/s)
* `bitsPerSample?: number` Audio bit depth
* `encoder?` Encoder name
* `codecProfile?: string` Codec profile
* `lossless?: boolean` True if lossless, false for lossy encoding
* `numberOfChannels?: number` Number of audio channels
* `numberOfSamples?: number` Number of samples frames, one sample contains all channels. The duration is: numberOfSamples / sampleRate
#### Common

@@ -261,4 +265,1 @@

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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