Spotify: find out which track is currently playing - spotify

I'm looking for a way to find the track a user is currently playing (if any). Curiously, there doesn't seem to be any provision for this in libspotify.
I'm not even sure that this functionality is possible at all. Spotify allows a user (account) to play music from only a single device at a time. However, I do not know whether they keep track only of the device or the track in addition.

Related

Web Bluetooth API not seeing any new characteristic values

I successfully wrote a basic JS application reading what is the Stereo/Left/Right value of a Sony Bluetooth speaker. I was able to do this by going to chrome://bluetooth-internals/ , finding and connecting to the device, then I began to click Read on each characteristic while changing the stereo on the speaker. Eventually I found the correct one that is changing when I change the setting.
I was able to get the service and characteristic ID from this and successfully write a basic prototype JS application to read this data live when notifications have started. I used code in various samples in the following page to build it. https://googlechrome.github.io/samples/web-bluetooth/index.html
My second experiment is with a Goodmans fitness watch, something very close to this (exact model does not seem to be online).
This provides information like heart rate, amount of steps complete etc.
I successfully paired it with the recommended app and can confirm that I can receive data using this Orunning app.
My next step I was hoping to achieve was to repeat the same process as that I did with the speaker. However values do not seem to be updating in chrome://bluetooth-internals/
I am successfully connecting to the device, I then check all the characteristics that have read values, I then proceeded to try read them again but no updates are occurring even though the data in the watch has changed.
My questions are:
Is there a better way to figure out the service you are looking for? I have reading this to get a better understanding: https://learn.adafruit.com/introduction-to-bluetooth-low-energy/further-information
Am I missing something regarding how it reads data? I even tried the ones with notification permissions but literally no values have changed.
I even disconnected everything, refreshed the browser and reconnected, and when I click Read on all the characteristics, its still the same values.
I have searched online to try understand this process, so if there is documentation you can point me to understand specifically this I would appreciate it.

Internet Radio, node.js

I am trying to code a radio station for my friend. I would make him a web application where he can upload audio; either a group of tracks as a playlist, or a larger file, ie a guest dj set. The idea is that between guest sets the playlists fill the gaps.
I can figure out a que system, but what i need is the que to become a real-time stream, so if two users connected to the api they would hear the same thing, not trigger the start of the song.
I need it to be constantly playing, like a radio broad cast. im guessing node deployed (firebase) can manage this. looking into OBS but i dont want to have a computer switched on, i want this parked up in the cloud somewhere and my friend just keeps loading up the schedule, and it only falls silent if he uploads nothing or miss-manages his Q
Probably know but you can take a look at AzuraCast.

How exactly do video and e-learning products similar to Coursera, Udacity, etc. track the view progress of a user?

I want to implement a system to track the how much has the user viewed a video. I am working on react, nodejs and mysql. I am able to record the amount of time of each session (a session being from (in milliseconds) and to (in milliseconds) when the video was played by the user).
I am struggling to find the best condition where i can confidently say that the user has completely viewed the video.
Is there any standard way to determine if a user has viewed the video completely? or a better way to track the progress?
Companies like the ones you mentioned usually use a third party ( such as mux or similar) to provide this service.
The way it works there, is the player software running in the browser is modified with a plugin to send state informant on an interval to a collection server, which aggregates this data and produces reports.
There is currently no standard format for the reported data, everyone does it differently.

Spotify WebAPI '/v1/me/player' best practices

I'm looking for advice about using '/v1/me/player' to get the Currently Playing Context. Obviously the endpoint gathers the current status of the media playing device but it seems to me that you would have to query it every few seconds or even more to keep up with the state of the track and device.
Is that really the intent?

Can the Spotify App framework cope with playing two things at once?

I'm interested in fiddling with a Spotify app to see whether it's possible to produce a radio type experience, which involves playing at least two things at once.
Is this possible within the Spotify API - or is it only capable of controlling one play control?
Nope! Only one thing can be playing at once.

Resources