Giter VIP home page Giter VIP logo

soundcloud-audio.js's People

Contributors

elving avatar ivangreene avatar joewestcott avatar npbee avatar ricardogarcia avatar rvlouie avatar voronianski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

soundcloud-audio.js's Issues

Unable to add event listener on resolve()

using your package on Opera 50.x Safari and with the following code

SC.resolve(tracks[0].uri, () => {
    SC.pause()
    SC.on('timeupdate', function () {
      console.log(SC.audio.currentTime );
    });
    SC.play()

    console.log('ok');
  })

the track plays but the time update is not operational. do I need to set it up on the audio property itself? or does it need to streamUrl?

Json parse error

Since last week I get the following error:
SyntaxError: Unexpected token ':'. Parse error.

I guess this has to do with SoundCloud updating (GO Update), but I'm not sure how to fix it.

Playlists

Has anyone got an example of using this tool with playlists? The single example works great but I'm having trouble getting it to work with a playlist and pulling in the individual track data

Few notable updates for documentation

You've done fantastic work with this. Wanted to give you a few heads up on changes that I presume come from changes in the SoundCloud API

Resolve

Your example:

scPlayer.resolve('https://soundcloud.com/djangodjango/first-light', function (err, track) {
     ...
});

here err and track have swapped places to

scPlayer.resolve('https://soundcloud.com/djangodjango/first-light', function (track, err) {
     ...
});

TimeUpdate

Your example:

scPlayer.on('timeupdate', function (audio) {
    console.log(audio.currentTime);
});

I thought I had this figured out but I don't. The event is working right, but I'm not seeing the currentTime property come in. As a workaround I'm currently grabbing the current time from scPlayer.audio.currentTime when the event fires.

I'll update this if I find more. Sorry if this is the wrong place to notify, new to this contributing game ๐Ÿ˜„

Submit new npm release?

Currently the latest npm release does not have the new setTime() function. Can you do a new npm release with setTime?

Local Error:
Uncaught TypeError: _soundcloud.scPlayer.setTime is not a function

1.1.0...master

iOS - Play next track while device is locked

Not sure if this is new behavior or I just never paid attention.

I'm using the latest soundcloud-audio.js version (1.4.0) on an iPhone X with the most recent OS. If a user chooses a track it will play normally. When the song is completed, the next track in a list is played. However, when the device is locked or has gone to sleep, it simply stops at the end of the selected track.

Here's what I'm using:

function playTrack(track-identifier-example){
	global.currentSoundObject.play({
    		streamUrl: track-identifier-example_stream_url
	});

	global.currentSoundObject.on('ended', function() {
		playTrack(next-track-identifier-example);
	});
}

Anyone else seeing this behavior? Should I be triggering the next track in a different way or is this a bug?

Cannot run tests

Old version of Karma fails to run tests, depends upon a seemingly broken version of socket.io

[Request] Add support for resolving playlist from array or json prop

Currently, soundcloud-audio resolves by url and client id and makes a call to api.soundcloud to get playlist.tracks.
To use a playlist from other audio sources, I would like to see soundcloud-audio use a key value array or json list of playlist.track audio url and playlist.track index passed as a prop, so that it works with soundplayer controls like Next & Previous

[q] how to use the seek() method?

hi guys, the library is great. i'm using it on a project i just started to learn about the Web Audio API (you can see it here).
i'm updating the progress.value like this

      var progress = document.getElementById('progress');
      progress.max = song.duration/1000;
      scPlayer.on('timeupdate', function () {
        progress.value = scPlayer.audio.currentTime;
      });

can somebody explain how to use the seek() method with the progress element?

Is it possible to get an Audio Buffer?

Question
Hello! I'm trying to develop a Discord Bot, and I need to know if it's possible to create a buffer when it plays.

Example
Basically, it would be able to work by doing this:

let buffer = <module>.<functionname>(url)
buffer.pipe(fs.createWriteStream("audio.mp3"));

SCplayer js added in head tag

when i added SCPlayer.js in head tag. audio markup is not showing in HTML. but audio playing. and i need to stop audio on event.

Doesn't work with Safari's DNT header

This isn't really soundcloud-audio.js's fault, but maybe we can think of a way around this problem together?

The way that the SoundCloud API's CORS is currently set up, it rejects requests with the DNT header. Unfortunately it seems like Safari adds this header on its own to all XHR requests when the setting is enabled, which gives us the following result:
screen shot 2017-01-24 at 22 25 52
Current versions of Safari don't support Fetch either, so that won't help here. Can you think of other possible solutions that won't leave DNT-enabled users left out?

I've written SoundCloud's dev account on Twitter about this so hopefully they're willing to whitelist the DNT header.

Playlist restarts when paused then played

Trying to investigate. Using v 1.2.2
Will update if I make any progress on it.

To reproduce:

  1. Load a playlist, play it
  2. Advance to a song other than the first using player.next()
  3. Pause, then play it again, and it will start from the beginning of the playlist

Expected:

Should retain the position in the playlist after paused/played.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.