voronianski / soundcloud-audio.js Goto Github PK
View Code? Open in Web Editor NEW:musical_note: SoundCloud tracks and playlists with HTML5 Audio API
Home Page: http://caniuse.com/#feat=audio
:musical_note: SoundCloud tracks and playlists with HTML5 Audio API
Home Page: http://caniuse.com/#feat=audio
@magicspon and I noticed that the https://github.com/soundblogs/react-soundplayer/ package was failing on IE11, and traced it to the underlying soundcloud-audio package.
More details are available here:
kosmetism/react-soundplayer#53
Rolling back to 0.1.7 seemed to fix the issue for me on https://koya.brailleface.co
Wasn't able to ascertain what exactly was causing the issue, but it seems to be to do with the _appendQueryParam
function.
Would be great to have the options to set the tracks volume or even set a fadeIn/fadeOut on play()/pause() .
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?
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.
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
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
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) {
...
});
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 ๐
Hello! Could you please tell me when a new version with #24 is planned?
It's working on desktop but not on mobile device, including android mobile and iPad.
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
Using v 1.2.2
To reproduce:
Try to play unsupported file.
See the developer console.
soundCloudAudio.play() returns undefined and we cannot handle this exception
Expected:
According to https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play soundCloudAudio.play() returns promise and we can handle this exception
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?
Old version of Karma fails to run tests, depends upon a seemingly broken version of socket.io
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
Hello,
first, thank you for this great plugin! The only problem is when I give a custom start time with the url.
Example: https://soundcloud.com/balamii/dj-sotofett-b2b-brian-not-brian-jayda-g-jan-2016#t=13:10
The t=13:10 tells soundcloud to start at the 13th minute of the song. But it gives the following error: Failed to load resource: the server responded with a status of 401 (Unauthorized).
Any idea what could cause this?
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?
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"));
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.
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:
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.
Trying to investigate. Using v 1.2.2
Will update if I make any progress on it.
player.next()
Should retain the position in the playlist after paused/played.
Per kosmetism/react-soundplayer#34, I and at least one other are having issues with resolve() being called multiple times in quick succession.
Is it possible that jsonp callback script tags that are added to the DOM may be overriding a previous script tag? i.e., (new Date()).valueOf()
is not unique enough?
https://github.com/voronianski/soundcloud-audio.js/blob/master/dist/soundcloud-audio.js#L82
Hi there, thank you for your nice work! Is there a way to get the favoritings_count
from the data?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.