Creating website optimized for use on TV - javascript

I want to create a website which will be optimized to be used from TV. The main thing that concerns me at the moment is that I want the user to be able to control the website with the remote control. So for example when the user press the up arrow(usually used to change the channel), I want to take this as an input and take action(for example switching image). Is there any way I can accomplish this? I think this should be done on the front-end since the server won't have such kind of access on the client. Also I don't want to use plugins such as Java Applet and Adobe Flash or Microsoft Silverlight or anything similar

Related

How can I automate the web from a web server?

I'm attempting to create my first ever full-blown website. The site will host a form that takes a user's link and scrapes the inputted website. Besides scraping, I'm also looking for click and input functionality (for future projects).
I managed to create a PhantomJS function that scrapes a website depending on the parameters. However, I have absolutely no idea how to implement this into my Xampp server which locally hosts my website...PhantomJS only runs off of a command line as far as I'm aware.
Is it even possible to host a PhantomJS program on a website? Should I be using something else, such as NodeJS or another language? Ultimately, I'll go learn anything in order to make this happen.
Any ideas/suggestions are much appreciated. I apologize if this question seems dumb.

IS it possible to open .exe files inside a website that is displayed on the webpage itself instead of just opening it on the computer

Is it possible to add a load of programs to a website that can be opened within the webpage itself. for example say the animation software blender. Would it be possible to add all the blender files to the website files and execute them within the webpage creating the GUI inside a window sized set of parameters
Updates Based on Inputs: Amazon recently released a Product/Service named Appstream 2.0 which does exactly what you had asked for, It is a proprietary platform though and has its own learning curve to even set it up. It does work well with solidworks, so it should work with most of other applications too.(Solidworks are providing the demo of their software via this service as of now(Nov18)). Also it uses a specific technique which doesn't require a live video stream and instead streams just the changes in images sprites which in itself is pretty interesting.
Another alternative is cameyo which is also a paid service.
As of opensource alternatives, I don't yet know of such a software.
-----------------------------------------------------------------------------------------
The closest you will ever get to this thing is flash and that too is NOT an exe.
About having a GUI for a software is a different thing, depends upon whether that specific software is exposing an API and maybe a service/Port that its listening to. And maybe making a script based client side GET request to that specific service on localhost, maybe.
Anyways, Wanting to run an executable on the client side is totally defeating the purpose of a website. Generally it is the other way round like say, you want to provide a service via website to compress a picture. You can pipe the submitted data to that respective software and then return the result as a response.

Images, OCR and greasemonkey

I have a webpage on which I'm doing tons of cool stuff using greasemonkey. I'm actually pretty terrible at greasemonkey/javascript but I'm learning quick. Every once in a while I get a really terrible CAPTCHA validation which I want to automate. I have a command-line utility that can do this with local and remote files, but not with the file in question because It's behind a session..
tim#g2sv ocr-thingy my-image.png
135189
Works like a charm. I'm looking for a way to pass the image from the website (running the script) to the utility. I don't care how complicated it has to be, but at the moment I'm clueless. I've been thinking about providing the utility as some type of REST-like API for greasemonkey to interface with but I don't know how to supply an image to an API other than by passing the URL which doesn't work (as stated before). Greasemonkey (luckly) doesn't allow you to download a file an run software on my PC so the most straightforward option is out.
I'm open to all suggestions it's a fun side-project for me so the crazier the better ;) I would prefer an option that silently runs in the background (doesn't take or require focus like mouse and keyboard controlling software, java robot).
Maybe you're interested to know I'm not trying to brake any laws or anything, the owner of the website knows I'm doing this and was interested to see if I was able to do it!
"I don't care how complicated it has to be, but at the moment I'm clueless."
Well, it's possible, but it is an "involved" process. Here's the high level steps:
Approach 1:
Forget about Greasemonkey; write a Firefox add-on. Add-ons can interact with the file system and probably can get the image data without having to use Flash or Canvas.
Approach 2:
Use Greasemonkey and JS to send the image data to your server (using GM_xmlhttpRequest()). This is not simple, search around for how to do that.
Your server can be your own local machine running something like XAMPP or any one of the free web-application servers.
Your server uses PHP (or Coldfusion, or C#, or Python, etc.) to run your OCR program and do whatever you want with the results, including AJAXing them back to the GM script.

Implementing a Powerpoint like application in the browser - Javascript, Silverlight, or something else?

I need to implement a moderately simple Powerpoint-like tool for the web. The user should be able to draw text boxes on a grid, drag & drop or resize them and save the result. Several options for formatting the text should be available (font, size, allignment, etc.). Also, the application should have an undo function (crl+z) to undo recent actions.
All the saved templates can be edited, deleted and printed. Additionaly, the user should be able to drag predefined textfields and images to the grid.
On the server side, I need to use Microsoft Technology. My first idea was to do all the functionality in javascript and use ASP.NET MVC server side. But as more and more requirements were assembled, the idea doesn't sound as good anymore.
My question is: What technology would you choose? Would Silverlight be the way to go? Or are there any Javascript libraries or open source projects I could use?
Any suggestion is appreciated!
Cheers,
Chris
EDIT: The web application is going to be accessed exclusively via thin clients with IE pre-installed. So compatibility with mobile phones or tablets won't be necessary.
Silverlight is DEFINITELY the way to go especially considering that you are 100% guaranteed that all of your users will have it installed. Moreover, you'll have access to the .net framework which will significantly improve the coding experience.
However, that being said, this is not going to be a small task. You are essentially trying to build a mini-PowerPoint creator with quite a bit of functionality. There is going to be quite a bit of work involved at every step so plan your schedule accordingly and leave a lot of extra time for tweaking at the end.
The technology depends on the finer requirements I guess, Google managed to make an OK presentation tool in Google Docs with HTML / JavaScript, but if you need custom fonts or don't want to bother with browser incompatibility you could go for Silverlight. I'm pretty sure the latter will be much easier to develop, but for example won't work on mobile phones and tablets.

Accessing contents of a file in a web-application without uploading

As far as I can tell, it is impossible to access the content of files on the user's computer in a web application without first uploading to the server, then re-downloading to user, unless some sort of plug-in is used. (Flash, etc.) Ideally, the user would upload the file directly to localstorage and then scripts would have a chance to process/display/validate/filter without the user having to wait on an upload.
Are there any features in upcoming web standards such as html5 that will allow this? If not, why has there been no effort to make this possible, and how can I work around it without getting stuck with plugins?
EDIT: DO NOT assume that I want to let JavaScript access arbitrary files on the hard drive without any user intervention. We already have the ability to prompt the user for a file and upload it, I only want the ability to prompt the user for a file to be loaded into the browser's memory. I was only hoping HTML5 would have support for something you can already do with both Flash and Java applets.
Doesn't the File API ( http://www.w3.org/TR/FileAPI/ ) do that ?
It's implemented in Firefox 3.6 (see https://developer.mozilla.org/en/DOM/FileReader and https://developer.mozilla.org/en/Using_files_from_web_applications )
According to http://code.google.com/events/io/2010/sessions/html5-status-chrome.html it is supported in chrome.
What you can do in HTML 5 (or 6, 7, ...) depends on what a diverse group of vendors with competing agendas think the new HTML version should or should not do... it is designed by committee.
Giving a web page that you create permission to access resources (e.g. files) on your computer creates a very large security hole (would you like my web page to read your emails and home banking files?)
It's very unlikely that a committee will agree to standardize on a feature that creates a security risk, given that only one browser on one device/platform needs to poorly implement that standard to open Pandora's Box to hackers.
Individual vendors (the people that make plugins) don't have to get a bunch of other companies to agree on a feature. They just implement it, and users get to decide if they trust it enough to install it. Microsoft's first attempt at this was a major security disaster.
Like Raul and Eric pointed out, there is a significant trust issue involved, and requiring people to give code they don't know access to their hard drives will not make your site popular.
You are probably stuck with choosing between plugins or browser specific features/addons for a long time.
That said, you can do cool things by just making the best of this situation. One approach I've used several times is to have an invisible plugin (Applet in my case) present on a web page, but control it entirely via JavaScript, giving the web app a very "natural" look and feel.
Another approach is progressive enhancement of some sort - providing an enhanced experience for users who have the required plugin installed and opt to use it. I've experimented with this on sites such as http://www.pdfcombine.com - users who don't have the Java plugin installed get to merge PDF files by uploading them to a server and downloading the merged file, whereas users with the Java plugin are given the option to do it all locally with the Applet.

Categories

Resources