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

soundcloud-audio

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

soundcloud-audio - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

bower.json
{
"name": "soundcloud-audio",
"main": "dist/soundcloud-audio.js",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://github.com/voronianski/soundcloud-audio.js",

@@ -6,0 +6,0 @@ "description": "Play SoundCloud tracks and playslists in modern browsers with HTML5 Audio API",

@@ -12,2 +12,4 @@ 'use strict';

this._events = {};
this._clientId = clientId;

@@ -58,10 +60,26 @@ this._baseUrl = 'http://api.soundcloud.com';

SoundCloud.prototype.on = function (e, callback) {
this.audio.addEventListener(e, callback, false);
SoundCloud.prototype.on = function (e, fn) {
this._events[e] = fn;
this.audio.addEventListener(e, fn, false);
};
SoundCloud.prototype.off = function (e, callback) {
this.audio.removeEventListener(e, callback);
SoundCloud.prototype.off = function (e, fn) {
this._events[e] = null;
this.audio.removeEventListener(e, fn);
};
SoundCloud.prototype.unbindAll = function () {
for (var e in this._events) {
var fn = this._events[e];
if (fn) {
this.off(e, fn);
}
}
};
SoundCloud.prototype.preload = function (streamUrl) {
this._track = {stream_url: streamUrl};
this.audio.src = streamUrl+'?client_id='+this._clientId;
};
SoundCloud.prototype.play = function (options) {

@@ -68,0 +86,0 @@ options = options || {};

{
"name": "soundcloud-audio",
"version": "0.1.1",
"version": "0.1.2",
"description": "Play SoundCloud tracks and playslists in modern browsers with HTML5 Audio API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -54,5 +54,5 @@ # <img src="http://www.officialpsds.com/images/thumbs/Soundcloud-Logo-psd47614.png" width="75" align="left">&nbsp;soundcloud-audio.js

// e.g. we do it here when playing track is finished
scPlayer.onAudioEnded = function () {
scPlayer.on('ended', function () {
scPlayer.next();
};
});

@@ -86,2 +86,6 @@ // play specific track from playlist by it's index

#### `preload(streamUrl)`
Preloads track data without playing it.
#### `pause()`

@@ -125,2 +129,4 @@

#### `unbindAll()`
```javascript

@@ -127,0 +133,0 @@ var SoundCloudAudio = require('soundcloud-audio');

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