Comments (6)
Hi!
Good shout, I will check that out. Sometimes you are so focused on the problem you can't see the simple fixes anymore.. Thanks haha
About spotify:
The integration with Spotify was quite easy. Spotify provides multiple API's, one of which is the Playback SDK. With this SDK you can create a spotify player in your browser. It will then show up as a device in the spotify app.
A working version of my app can be found at https://demo.phos.steinjonker.nl/ on the visualizer page. Open the settings panel by clicking the left button in the top toolbar and select the spotify tab.
After logging in you are redirected to the home page, so go back to the visualizer. I'm working on redirecting you to the visualizer page automatically.
Then select the device from the Spotify app and there it goes!
I completed a PR within my own repo yesterday that completed the work on this, it can be found here. But for easier viewing, I'd recommend to just look at the source files. The files that are changes are the only pieces of code that are involved with this functionality.
from audiomotion-analyzer.
Suggested fix of not using gradient at all works, closing this issue.
Thanks!
from audiomotion-analyzer.
Update: My fix was not actually sufficient.
Setting gradientLeft and gradientRight to undefined results in an error about the gradient not being found, which is interesting.
Instead, I now delete the gradientLeft and gradientRight attributes using the delete
keyword:
// Register gradient here obviously
this.visualizerOptions.gradient = "spotify";
delete this.visualizerOptions.gradientLeft;
delete this.visualizerOptions.gradientRight;
// Dispatch the redux store change here, which will trigger a call to audiomotion.setOptions(options) somewhere
ps, Absolutely love this library, it is truly amazing and I use it daily. I'll buy you some coffee.
from audiomotion-analyzer.
Hello @Staijn1!
Maybe I'm missing something here, but have you tried setting only gradientLeft
and gradientRight
in your options object? You don't need to define a value for gradient
, unless you want to use the same gradient on both channels.
ps, Absolutely love this library, it is truly amazing and I use it daily. I'll buy you some coffee.
Thanks a lot! I really really appreciate the support and feedback! ❤️🙏
Also, how do you integrate with Spotify? 👀 Is your application a browser extension?
from audiomotion-analyzer.
Cool, thanks for the info! Angulon is looking awesome!
from audiomotion-analyzer.
Hi!
Good shout, I will check that out. Sometimes you are so focused on the problem you can't see the simple fixes anymore.. Thanks haha
About spotify: The integration with Spotify was quite easy. Spotify provides multiple API's, one of which is the Playback SDK. With this SDK you can create a spotify player in your browser. It will then show up as a device in the spotify app.
A working version of my app can be found at https://demo.phos.steinjonker.nl/ on the visualizer page. Open the settings panel by clicking the left button in the top toolbar and select the spotify tab. After logging in you are redirected to the home page, so go back to the visualizer. I'm working on redirecting you to the visualizer page automatically.
Then select the device from the Spotify app and there it goes!
I completed a PR within my own repo yesterday that completed the work on this, it can be found here. But for easier viewing, I'd recommend to just look at the source files. The files that are changes are the only pieces of code that are involved with this functionality.
Hey, I see you ask for microphone permission in order to setup the audio stream from Spotify to motion analyzer, why is this? (probably project specific). Do you happen to know how I could stream my currently played spotify song to motion analyzer without asking for extra permissions? I tried setting connectSpeakres to true to visualize whatever audio is playing on my computer, but it doesn't seem to work. (btw I try to visualize stuff in the browser).
I also tried messing around with the source attribute but this won't work with the track uri I get back from the Spotify API. Only thing that seems to work is using the preview_url from a track to get a 30 second mp3 file.
from audiomotion-analyzer.
Related Issues (20)
- [Feature Request] Dynamic gradients, spectrogram display, and combined channel spectrum HOT 8
- [Question] createMediaStreamSource with stereo stream
- [Question] Is there a way to connect multiple audio elements to a visualizer, or maybe the final AudioDestinationNode? HOT 2
- [Question] Can we seek and draw audio visualizer on a particular time? HOT 1
- Error when trying to connect pizzicato element HOT 1
- The microphone icon in Chrome stays open when disconnected HOT 5
- Gain keeps getting higher every time a AudioMotionAnalyzer is initialized HOT 6
- About Fluid feature
- [Feature Request] It would be great if the demo has a copy as options button HOT 2
- 2 Feature Requests: Let user decide the size of the circle / use existing canvas HOT 3
- Audio gets stuck on mobile IOS safari
- roundBars not working in radial mode HOT 1
- CommonJS?
- canvas height growing indefinitely while using <div> but not when using <span> (setup: bun+vite) HOT 2
- What scale does the y-axis display (showScaleY = true) ? HOT 3
- Adjustable ScaleX Precision/Detail HOT 1
- audio dropouts with mobile browsers
- Is there a way to set the background color or even make it alpha = 0? HOT 2
- Wrong typing or documentation about `GradientOptions.bgcolor` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audiomotion-analyzer.