Streaming a Spotify track when using the Web API - spotify

I'm not really happy with the Windows Phone Spotify app. I'm looking into developing my own Spotify client using the Web API. It looks like it's not possible to stream a track using the Web API, after receiving the track metadata. Is this conclusion correct? Is there another way to make this work, using the track uri/href/spotify url? Will it become available in Web API in the near future?
Thx Martijn

Related

Is there a way to get audio from spotify

So I'm Working on a NodeJs project and am wondering if there is a way to get audio from Spotify Like you Input a song URL and It plays the track, I've looked all around and can only find stuff for the web browser, I don't know if they even have a way. If there is any info about this please let me know.
You'd have to make calls through the Spotify API.
You can read more about the API here: Spotify API Documentation
This is a node.js specific library that you may also want to check out:
thelinmichael's node.js Spotify API Library
The answer provisioned and marked as correct is wrong.
The only way you can extract audio is by using a Windows VM, connect via RDP. Run a script to play Spotify programatically and record the audio.
Since this is the only solution. It is not possible to query data from Spotify.

Set up Google Analytics to track a command line Node app

I'd like to use Google Analytics to track usage of a command line Node app. Tracking will be strictly opt-in. I'd like to track basic usage, plus which operating system and version of Node was used.
I've found the Measurement Protocol, but I'm wondering whats the best way to set up Google Analytics.
You can choose from Web or App - App seems the best fit, but then I'm sent to Firebase to set up an iOS, Android or Web app. None of these are correct. So is 'Web' the best way to track my app usage? Or is Google Analytics not the right approach?
Seems like the best approach is Google Measurement Protocol. There's a Node library for it.
Really Google Analytics is completely designed around web apps and more recently mobile apps, it has concepts like "page views" which don't make sense for CLIs, and Firebase Analytics is only for Android and iOS.
You might be able to shoehorn he CLI use case for some purposes. Alternatively, you could consider using a cloud database like Firebase real-time DB to capture your own events.
Google analytics really isnt designed for something like this. You have only two options web app where everything is page based. http://example.com/hello.php vs using a mobile app where everything is screen based. Home, about, help.
I have done this before with several console applications, a custom SSIS task (dll) and an arduino project. I chose mobile application mainly because i thought it was closer. I know of someone who did the same with an actions on google project.
In the end what you use will be up to you. Just consider what it is you want to track exactly and lay it out before you start.
If you choose mobile make sure you send Screen views and not page views. The Google analytics website is split you cant mix and match the hit type.
Workaround for createing moble account without firebase.
create a new web property on Google analytics type Web
create a new view under that web property type mobile.
We made Console Cat for this exact purpose! It's built from the ground up to track telemetry / analytics for CLIs including things like flags, command duration, version, etc.

Can I let the client stream the content from Spotify in a browser based player?

Couldn't find anything on Google about that topic, so I'm asking here.
I had an idea for a web based Spotify player (not like the offical one) and I would like to know if it's possible to let the client (user) stream the content from Spotify instead of my server (app). Would be pretty expensive if my server would have to stream the data and to send it to the client :-/
Thanks!
Unfortunately, there is no web library that you can use for streaming content from Spotify. The closest is the Spotify Play Button but that is a widget that remote controls Spotify from the desktop client or Spotify's web player.
You are limited to use the 30 seconds previews, or use the Android or iOS SDK if you were to build a mobile version of your site. The SDKs allow full playback for Spotify premium users.
There is a feature request for fetching full tracks on Spotify's Web API GitHub repo that you can watch or add comments to.

Is it possible to access the player API form a web interface without registering an app?

I want to use spotify play to integrate with an artist's website. I want to be able to access the player API to play items embedded from spotify as part of a combined playlist.
is this possible?
thanks
Paul
I think you're talking about the Apps API, which is only available inside the Spotify client.
However, the Spotify Play Button might be what you're after.

using Spotify's webAPI in an iOS app

So I'm in the process of developing an iOS app and I wanted to use the Spotify web API for searching and looking up songs in Spotify. However, I can't really tell if that is how to do it or if there would be better ways to do it and wanted to clarify before I began. Thanks in advance!
If you'd like the use the Web API, it works just the same as any other JSON REST API, so a lot of the tutorials out there for doing that on iOS will help you just fine. For converting between JSON and Objective-C data structures, newer iOS versions have NSJSONSerialization, otherwise I can recommend the open-source TouchJSON.
Also, you might want to look at CocoaLibSpotify, which is an Objective-C library for interacting with the Spotify service in a much more integrated way than the Web API — including music streaming. However, it does require a Spotify user be logged in to use.

Resources