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

videojs-wavesurfer

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-wavesurfer - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

examples/mic.html

2

bower.json
{
"name": "videojs-wavesurfer",
"version": "0.3.0",
"version": "0.4.0",
"homepage": "https://github.com/collab-project/videojs-wavesurfer",

@@ -5,0 +5,0 @@ "description": "video.js plugin that adds a navigable waveform for audio files.",

{
"name": "videojs-wavesurfer",
"version": "0.3.0",
"version": "0.4.0",
"description": "video.js plugin that adds a navigable waveform for audio files.",

@@ -23,4 +23,9 @@ "main": "videojs.wavesurfer.js",

],
"dependencies": {
"video.js": ">=4.6",
"wavesurfer.js": ">=1.0.0"
},
"author": "",
"license": "MIT",
"readmeFilename": "README.md",
"bugs": {

@@ -27,0 +32,0 @@ "url": "https://github.com/collab-project/videojs-wavesurfer/issues"

@@ -13,5 +13,5 @@ Video.js Wavesurfer

You can use [bower](http://bower.io) to install the plugin
(`bower install videojs-wavesurfer`), or simply download and include
`videojs.wavesurfer.js` in your project.
You can use [bower](http://bower.io) (`bower install videojs-wavesurfer`) or
[npm](https://www.npmjs.org) (`npm install videojs-wavesurfer`) to install the
plugin, or download and include `videojs.wavesurfer.js` in your project.

@@ -48,14 +48,15 @@ The plugin depends on the wavesurfer.js and video.js packages:

{
"controls": true,
"autoplay": true,
"loop": false,
"width": 600,
"height": 300,
"plugins": {
"wavesurfer": {
"src": "media/heres_johnny.wav",
"waveColor": "grey",
"progressColor": "black",
"cursorColor": "black",
"hideScrollbar": true
controls: true,
autoplay: true,
loop: false,
width: 600,
height: 300,
plugins: {
wavesurfer: {
src: "media/heres_johnny.wav",
msDisplayMax: 10,
waveColor: "grey",
progressColor: "black",
cursorColor: "black",
hideScrollbar: true
}

@@ -69,2 +70,8 @@ }

The `msDisplayMax` plugin option is an optional setting that defaults to 3 sec.
It indicates the number of seconds that is considered the boundary value for
displaying milliseconds in the time controls. An audio clip with a total
length of 2 seconds and a `msDisplayMax` of 3 will use the format `M:SS:MMM`.
Clips longer than `msDisplayMax` will be displayed as `M:SS` or `HH:MM:SS`.
License

@@ -71,0 +78,0 @@ -------

@@ -34,9 +34,17 @@ // Copyright Collab 2014

// indicates the number of seconds that is considered
// the boundary value for displaying milliseconds in the
// time controls. An audio clip with a total length of
// 2 seconds with a msDisplayMax of 3 will be displayed
// as M:SS:MMM. Clips longer than msDisplayMax will be
// displayed as M:SS or HH:MM:SS.
this.msDisplayMax = 3;
if (this.options().options.msDisplayMax !== undefined)
{
// msDisplayMax indicates the number of seconds that is
// considered the boundary value for displaying milliseconds
// in the time controls. An audio clip with a total length of
// 2 seconds and a msDisplayMax of 3 will use the format
// M:SS:MMM. Clips longer than msDisplayMax will be displayed
// as M:SS or HH:MM:SS.
this.msDisplayMax = parseFloat(this.options().options.msDisplayMax);
}
else
{
// default
this.msDisplayMax = 3;
}

@@ -61,4 +69,2 @@ // customize controls

this.player().controlBar.volumeControl.el().style.marginRight = '15px';
// waveform events

@@ -93,3 +99,3 @@ this.surfer = Object.create(WaveSurfer);

// start loading
if (options.src != undefined)
if (options.src !== undefined)
{

@@ -184,4 +190,4 @@ this.load(options.src);

{
var duration = this.surfer.backend.getDuration();
var currentTime = this.surfer.backend.getCurrentTime()
var duration = this.surfer.getDuration();
var currentTime = this.surfer.getCurrentTime();
var time = Math.min(currentTime, duration);

@@ -200,3 +206,3 @@

{
var duration = this.surfer.backend.getDuration();
var duration = this.surfer.getDuration();

@@ -225,3 +231,3 @@ // update control

// display milliseconds
if (this.surfer.backend.getDuration() < this.msDisplayMax)
if (this.surfer.getDuration() < this.msDisplayMax)
{

@@ -446,3 +452,3 @@ this.player().controlBar.durationDisplay.el().style.width =

this.el().appendChild(this.waveform.el());
};
}

@@ -449,0 +455,0 @@ // register the plugin

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