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?
Related
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.
So I have some time on my hands and thought I would make myself a little jukebox / radio type app.
It would be fairly simple, just a collection of MP3's on the server, one is chosen at random, it plays, on completion, the next one is chosen and plays. The front of this would just be a super simple page that has a player and displays the metadata.
I don't really have any experience with server programming but I'm going to look in to Node, seems like it would be good for this. I've already written a little script in Python that chooses a song from a selection and plays it (using VLC at the moment) so it should be simple to port it to Node / js.
Just wondering if someone could point me in the right direction for how to link the "player" with the "playlist".
Looking in to it, I can only find solutions involving a client and server using shoutCast or ICEcast or similar - so the playlist streams audio to a shoutcast server, and the website is just a player looking at the shoutCast URL - that seems unnecessary for me, as the streaming and the site would be the same thing.
New to a lot of this :) but I have time at the moment so happy to get stuck in!
Thanks in advance
I've built something similar and opted to do almost all the work client-side. There are several advantages:
Less infrastructure needed (and less to go wrong)
You can re-use normal HTTP CDNs for serving static files
More flexibility for client changes later (like sending different content to different clients, for A/B testing)
Potential for offline playback
No need for SHOUTcast or Icecast. All you need to do is publish the playlist and associated files to a web server. Client side, you can read this playlist, randomly pick an entry, and then load it via a simple new Audio().
Now, when your audio object fires its ended event, set the src property to the URL of the next item in the playlist. (This detail is important or Safari will stop playing audio, as they assume the user didn't want to continue.)
I am searching for the same. I think you are right using node.
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.
I apologize for the question but I don't have the resources to figure it out myself.
I'm looking for features my next iOS / android app should have and as you can imagine, I'm interested on a "pinch of social" that's why getsream seems to be my saver.
After reading the getting started section and the documentation, I found this warning http://getstream.io/docs/#mobile that confuses me.
I supposed getstream is a managed service that takes care of everything letting me use the REST API to build my mobile community within their phones.
Could you please tell me where I'm wrong?
Many thanks
There are two main reasons we do not recommend integrating Getstream client side (i.e. in the browser or on mobile). First, it is hard to guarantee security when you integrate from the client-side, you have to somehow provision tokens for each user's feed (and feeds they want to target with activities http://getstream.io/docs/#targetting), you could also generate an application wide (read/write) token and ship this to all clients but this is also a bad idea for obvious reasons. Second, we do not recommend using Getstream to store all your activity data, you store references to objects in your local database and enrich the activities from getstream at read time (have a look at our integration libraries for Django/Rails).
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.