How do I find all the streams from a live IHeartRadio station? - node.js

I'm trying to find the entire stream list from a live IHeartRadio station (all streams available), and I've seen this answer, but they've since changed it, and now window.__store is null. Is there another way to find streams? I've looked around, and the only stuff I can find on IHeart seems to be this module, which does not seem to work for me. I've been at this for a good 3-4 hours, and have given up and gone last resort to come here. Also, I've seen methods where people use mitmproxy to inspect the traffic, but I need the icecast stream, specifically, which I cannot find at all.

It seems that, while window.__store is now being set to null, if you pause the website while it's loading using the developer console, you can search for streams and they will show up. You can also do this using Postman.

I've now actually published a module that fixes this exact issue. It uses the Public IHeartRadio API to search and get streams. It can be found here.

Related

WebRTC/getUserMedia - Getting source of stream

I have searched far and wide for the answer to this and am surprised that there aren't more people talking about this.
There doesn't appear to be a way to ensure that the stream/track that is selected is a native camera versus a stream provided by something like ManyCam (https://manycam.com/?__c=1) or AlterCam. The use case for this is secure apps that, for security reasons, want to ensure that the video/images/data coming through the stream comes from a "legitimate" (native camera) source rather than a source that can really be anything and/or altered before it gets to the client code.
Is there any known way of ensuring this? I'm not looking for a whitelist/blacklist option, since many of the camera programs allow changing of the camera name, which ends up showing up in the label property.

How to format the terminal window node is using to be in sections

I'm wanting to make an application with node have a cli interface, as it needs to be ran in a terminal. I want to split the terminal into several sections, one with some identification as to who is viewing the application, another with some other random info, a menu on the side that you can use the arrow keys to move up and down the options, a main logs section, and another that you can type, and press enter to send text in. I've drawn up a little diagram of how I want to make it: (I know this looks awful, it was made in mspaint)
I've gotten the console input part working by using the readline module, but I don't even know where to really start with designing the terminal how I want it, setting text in certain sections, etc. I've looked around at things like terminal-kit, and clci, but either they didn't seem like what I wanted, or their docs/examples were a mess.
I would prefer to do this with node only, not using another application in another language, as all of the stuff going to the console sections will be from the same node application.
I found the blessed library at https://github.com/chjj/blessed. It is based on the ncurses library (written in C, https://en.wikipedia.org/wiki/Ncurses) and it allows you to create different sections with specified heights, widths, etc. in different areas of the terminal. Very useful in theory, and you can follow the advice on the github page, clone the repo into your desktop, look into the test folder, and then run the different files ie. node test/widget-form.js to see the different types of interfaces that you can create in your terminal.
It hasn't really worked for me, because it keeps crashing on my end, but I see that there are a lot of open pull requests and that people are still trying, so it might be working for some, although I think that the usage for some "widgets" is limited. The next best thing I can recommend is either blessed-contrib or neo-blessed, the former being developed by some dude from Facebook. Blessed-contrib is newer so you might have more luck with it, but it's essentially made for visual output, so you'd be able to create a section for a log, a selection menu, a paragraph section, etc. but nothing to create an area where you can input text (so 4/5 of what you need), based on my reading of the documentation, which you'll find here https://github.com/yaronn/blessed-contrib.
I personally think it's dope. Good luck with it, I'm going through the motions of understanding the documentation better myself, and I've delved pretty deeply in it, so feel free to reach out if you need any help.
On another note, let me know if you've found anything else other than the resources I mentioned, which would be very helpful for me, as the alternative right now is for me to code the text user interface myself using C and the ncurses library, which I'm trying to avoid if it's unnecessary :)
EDIT:
I found something for you and for me that might send us in the right direction. Good news. This is the gitter-cli. It uses the library I mentioned above blessed. If you clone the gitter-cli's repo, follow the instructions to get a token and create an account, and join one of the rooms (you can find the name of the rooms like 'gitterHQ/javascript' on the gitter.im website), you'll see that the chat works. There might be some optimizations I'm not aware of, but I recommend just delving into their code while also delving into the blessed documentation to understand how it works. It should give you an idea of what to do next.
It took me a lot of hours to find all these different resources and connect the dots so you should definitely check them out.

Audio processing steganography on iOS

For one of our projects, we got a new requirement on our hands but I don't have any idea about how to do it.
We need to process audio captured from the environment and do something in the app (show a message, picture, etc) when a specific pattern is recognized.
The first thing that came to my mind when I heard this requirement was Shazam. I did a little research and found Echo Print library (http://echoprint.me). I think that works on the whole of the songs, what I need to do is constantly listen to environment and act when the patterns are recognized. I don't know anything about audio processing (at least for now) but this sounds more like steganography. Correct me if I'm wrong.
Any help will be greatly appreciated!
EDIT: I think I need to correct some points in my question. Yes, the application will listen to the environment but it will recognize the patterns in a pre-configured audio. A specific song on a radio, a dog bark, etc. So the patterns will be artificially defined in the audio.
Thanks.

simultaneous text editing

I'm trying to program a Webpage, which allows to edit a text document simultaneously.
To program something like a Chat in Node.js is not very difficult, but working on the same text makes it kinda tricky.
I thought about sending the char position and the changes characters, but if someone types something previous to the change, the change would be placed on the wrong position.
What's the best way to exchange Modifications between my clients?
You should use Socket.io to have make your Real-Time application.
I just founded a nice blog article which speaks about real time edition, see here.
It's also providing a link to the github project and to an open source online editor project.
Take a look and try to understand how they do stuff like this, good luck !
Two people cannot be manipulating the same object at the same time from a different place. You basically have two choices.
1. Let them take turns with the object
2. duplicate it if they both want it, but that doesnt sound like it would end well

Designing an AJAX driven Quicksilver-style search with multiple search plugins for a website

I'm trying to build a Quicksilver style search system for the internal web app that we develop at work. There are plenty of examples of really cool front ends for this using JQuery or MooTools or whatever. None of these examples really talk about the back-end. As far as I can tell, these examples assuming the back-end is searching a single table or at least, performing a single query. What I want to do is design a system where you can, literally, type anything at all at it and find what you were looking for. Idealy, I want to be able to just write plugins for this system, drop them in, and start searching.
I have a solution where the back-end uses the observer pattern to send the query to different plugins for each type of search. However, this will return the results from all the plug-ins as one chunk. This could get noticeably slow if there are many kinds of searches. I'd like it to be quick and return the results in a more asynchronous fashion where results are displayed as they come in, a la OS X's Spotlight or Quicksilver.
Another solution is to write, on the fly, a javascript array with the names of the plug-ins to be used. I could then fire off separate calls to the server with the query, one for each plug-in. Something about this solution seems... off to me. I can't exactly put my finger on it though.
So, my question is: does anyone have any better solutions for building a plug-in based search system where the individual search types are not known before the page is loaded and the results are returned ASAP?
Another solution is to write, on the fly, a javascript array with the names of the plug-ins to be used. I could then fire off separate calls to the server with the query, one for each plug-in. Something about this solution seems... off to me. I can't exactly put my finger on it though.
This does not seem like that bad of an option. It gives you everything you need.
You need search results to come back as soon as they can.
It allows you to use your existing plugin architecture, I believe.
It follows the KISS principle.
It is not a new solution, but I think that it is the easiest.
Regards.
You could do a Comet style solution that used long polling in Ajax to get results for the search. Make one place for the script to call that will give back the results of all the plugins as they come in. This method allows you to get the quick results displayed sooner.
Having an array of plugins is an option but some browsers are limited to 2 requests at a time so that would limit the amount of request just being kicked off and could cause a fast process to have to wait for the slow processes.
It sounds like you are getting close with with back end you have just make it provide up the data as it comes in. Also this will allow you to add and remove plugins on the fly without effecting the JS so no worries about cached array lists.
A few thoughts on the back end from comment. Build a work queue so search requests can be farmed out to many workers. It would be possible to implement the work queue in a DB or through a web service so you could use other languages or even computers to do the work for each search. The work call would need some id to pass back to direct the data at the correct client. Also you would want a way to remove jobs from the queue or at least mark all work for a client as void if that client goes away. (You should be able to detect this if you are using long polling.)
Connection limits
IE7 for HTTP1 4
IE7 for HTTP1.1 2
IE8 for HTTP1 6
IE8 for HTTP1.1 6
From all the comments and talk it seems like you want to build this on the front end.
Don't build an array of plugins to call it forces you to worry about caching when changing out plugins you should do instead is build a bootstrap system. It would be a simple ajax call that got a list of plugins with there URL to call. This will allow you to turn on and off plugins from a central location and it will work better.
You will have to make each of your plugins into a web service instead of a plugin so each can be called independently. Make sure to use mediasalve's link about the number of connections because it will be limited by browsers if you don't get around it.

Resources