I am trying to write an application similar to the well-known Popcorn Time - an app which lets you watch movies over torrents. It basically uses NanoHTTPD as a bridge between the LibVLC player and the torrent library to be able to stream it. I use this exact same HTTP library.
The problem I have is that, even though using chrome's built-in MP4 viewer works fine, I cannot play the video from VLC. I did notice that it sends an 'Icy-Metadata: 1' header in the HTTP request which Chrome doesn't but little is documentated on that so I'm not sure if that's the problem here.
The desktop version of VLC player does not play it either. It stands there, requesting the same over and over again without displaying my video. What could I be missing?
It may be worth noting that nginx serves it properly, but it seems like nginx doesn't even reply with any kind of http header response. Just data.
Related
I made a web-server that runs on an esp32(LAN) and I have made it possible to send information to the esp itself from the servers url, (example : 192.168.1.39/?userInput=123), the number 123 is what I want to send from the application depends on the user's input (I compiled it to a packet of 8bits) so max number is 255, the server has an XML and some basic UI for viewing the information passed back and forth, I wanna be able to send the so called packet to the server and it passing it to the esp32 with almost no delay, I used google firebase before but it has way too much delay for it to be usable, I tried using a WebView and loading the URL with the number from the packet, I ran out of ideas on how to approach this would love some advice :)
I tried searching other questions here on the site, asked friends/teachers, watched a few tutorials and asked chatGPT for help but nothing was helpful.
From reading your question it seems you are lost setting up server and client at the same time. Divide the tasks into chunks you can digest:
First, setup your ESP32 webserver. Follow a tutorial like https://randomnerdtutorials.com/esp32-web-server-arduino-ide/ and test it using a normal web browser. It can be used to run GET requests easily, and the amount of data you need to transfer that should definitely be enough. Alternatively you can use curl to send client requests.
Next, develop your java client to send the appropriate request. You can test the behaviour using any standard webserver and check the logs.
Finally put the ESP32 url into your client and see whether they work together.
How can I find out exactly what type of request to a server is being made from an android app that I am using so I can replicate such a request outside of the app usage.
Specifically I am using the home depot app that has a bar code scanner.It also has a manual barcode number input.
The manual bar code input search is what I am interested in replicating for use in a webapp.
I assume it is just a server request with the appropriate information that the server responds to.
How might I start figuring this out?
You can use local proxy for your device. For example this one: http://www.charlesproxy.com
For a project, I need to be able to stream live audio from a Java server to the browser on the client. My first guess was to use RTMP with a Flash player, my second guess to make use of the HTML5 audio tag. But so far, I've failed to find anything useful (like a library), so does anyone have any pointers on how to do this?
Here's the setup: The sound comes in from a VoIP server as a bunch of PCM samples. From there, it has to go to get to the client, while usually only one client listens to one stream. So I need to be able to send many VoIP streams to several clients, a simple form of authentication would also be nice (like a token or a secret URL where the stream is located at).
So far, I've looked at Red5 (looks to me like one-to-many streaming only) and searched for Java-based RTMP libraries. Any help is gladly appreciated!
I am writing an iOS 5.1.1 app for the iPad2 using Xcode 4.4.1. I want to be able to locate a local http server running on Java.
Once I am able to connect to the http server, all I need to communicate with it is the url including the port.
My questions:
1) Should I use Bonjour or a DNS Server running on the http server to discover the http server itself?
2) I need to authenticate the iPad2 user with name and password to work with the http server once I discover it.
I need some help understanding how I would go about accomplishing these two steps including source code if available for the iOS 5 and Xcode 4.4.1.
1) Bonjour is pretty easy to tie in with Java apps. If you're particularly masochistic you can write your own Java-based mDNS (Bonjour) responders (I've done it, it's not rocket science), but the quickest way to get going is to use jMDNS in your http server to advertise its existence. I won't copy & paste the code samples but they suffice for most applications.
On the iOS side, NSNetService is your friend. Fundamentally it involves starting a responder in the background to look for services (i.e. your Java app), then calling a delegate when something appears/disappears:
id delegateObject; // Assume this exists.
NSNetServiceBrowser *serviceBrowser;
serviceBrowser = [[NSNetServiceBrowser alloc] init];
[serviceBrowser setDelegate:delegateObject];
[serviceBrowser searchForServicesOfType:#"_http._tcp" inDomain:#""];
There's a guide that explains it all. The protocol hasn't changed for 10+ years and you count on all modern iOS/OS X versions supporting it. The jMDNS library is pretty well battle-tested at this stage, too.
You might consider creating your own service type if you don't want it to be visible to other apps that search for _http._tcp., although this is just a cosmetic thing.
2) The simplest thing that'd work would be HTTP basic auth; you didn't say what kind of authentication your app supports or how you make HTTP requests on the client side, but this is pretty well covered already.
I want to write an Android remote to PowerPoint. It means we can control the slides by using phone.
Where can I start from? Give me some hints please. I've just read the Android basics.
I think RemoteDroid will work pretty well for this purpose and it's a fairly complicated job to replicate.
http://remotedroid.net/
what I did was:
I use a .NET #C Client on the Windows Side and
A Java Servlet and XMLRPC Web App running on a Tomcat ("in the middle").
And of course a Android Client as the controler
My C# Client creates a persistent HTTP Connection to a Servlet. And the Android App is sending short HTTP GET Requests to the TomCat, stuff like goto3 or next (the request has also a kind of a Presentation ID as parameter). The Comands from the Android Device are dispatched to the previously opened Persistent HTTP Connection from the .NET Client.
In The .NET Client I use a local installed PowerPoint as an ActiveX/OLE Control. You can do pretty much everything programatically in over c# that is possible to do "by hand". Open a .ppt(x), start the SlideShow, control the Slideshow and of course it is also possible to edit the slides content. You can find a lot of examples by googling for Microsoft.Office.Interop.PowerPoint
I pair the .NET Client with the Android Phone by using a Generated QR Code. That QR Code I show in a generated PowerPoint Slide. All Work around the QR Code (C# and Android) is done by using code from the ZXing (Zebra Crossing) Project.
You can try it out, Instructions and Downloads are here. The App is called FonPrompt and can be found in Google Play.