Can i use Chromecast as a server? - node.js

Studying the possibility to achieve the following:
We have a CMS that from time to time posts to a web hook a media URL (video) (public internet hosted)
This web hook post we would like to post directly to a ChromeCast which is plugged in to a TV
Questions:
1. Can a web server like nodeJS be installed on a chrome cast?
2. Is it possible to use for example DynamicDNS to link the Chromecast to a domain name so the post from the web hook can be made?

ChromeCast has a sender API which allows you to "send" content to a specific Chromecast. Right now, the sender API works on Android, IOS and Chrome OS. You can read more about it here: https://developers.google.com/cast/docs/sender_apps.
And, here's how a receiver application that would receive your content on the ChromeCast would work: https://developers.google.com/cast/docs/receiver_apps or if you're content is a standard type, then you can use a prebuilt receiver application without building your own.
To answer your specific questions:
Can a web server like nodeJS be installed on a chrome cast?
No, not without enormous hacking and development yourself to basically take over the hardware somehow and get your own stuff to run on it.
Is it possible to use for example DynamicDNS to link the Chromecast to
a domain name so the post from the web hook can be made?
Not that I know of.

The chromecast has an android like google chrome operating system. It is possible to root it, but you will not be able to (to my knowledge) get a server on it. I would suggest taking a look at the Raspberry Pi. You should be able to run a slim server on it. After you get that set up it might be feasible to pass command line commands to chrome or another web browser to display the data you like. A browser is not necessary, but I'm not sure if you know of any other way to display the media.
A different approach would be to have a server anywhere (could be in your home) and have something like the raspberry pi (any computer for displaying the content) connect to a webpage hosted with that server. Using websockets something like socket.io, you could set it up so that the server could send messages (url of video) to the browser session you have open. The javascript of your webpage would then use that message to open that url.

Related

Running an app from the browser, and detecting if the app is installed or not

In my web app, I want to discover devices on the local network. The devices announce themselves with mDNS (Bonjour) and from everything that I read, It's impossible to go deep enough in the network layer and detect these devices from the browser.
However I can do that from a Desktop app. Thus, what I need is running a Desktop app from a custom URI. There is a lot of documentation about that, like this article. But if the user do not have the app, the link just does nothing.
I noticed that a lot of apps like slack, discord, etc. that redirect to their desktop app do not provide dead links if you don't have the app installed. If you don't have the app, they make you download and install it.
How do they achieve this ?
Thank you for reading !

Remote control a Chrome Extension

I've written a non-published (personal) Chrome extension that performs page checking and then performs actions such as opening new tabs if certain conditions are met. I would like to be able to "remote control" it from my phone though, e.g. turn on or off or adjust settings when I'm away from my desk.
I considered if the extension can read/write to a file in Dropbox, which I could then edit from my phone too, or any other device. But I'm not sure if extensions are allowed to arbitrarily read/write in the filesystem, or only "apps". Any other suggestions?
Assuming you can't directly connect to your computer (otherwise wOxxOm's answer is valid)..
You could make a companion phone app and use GCM push messages; your phone would message your server via it (which can be hosted on a free App Engine tier easily if it's just for your private use) and the server will push out the message.
Though it'll probably be much easier to just have said App Engine server up and providing a WebSocket endpoint that your extension can connect to to receive commands in real-time, and some sort of API / control panel on the web (authenticated, of course).
Any free webserver-based solution would lag, as bad as 500ms, I think.
Try making a complementary native PC program: mobile apps for remote control usually have their PC part running as a background service or an application with just a shelltray icon. Such program opens a TCP/UDP port on PC and listens for commands from the mobile app, and can communicate with your extension via Chrome's native messaging API.

WebRTC Streaming between PC and Mobile Client

I would like to implement peer to peer communication between mobile device (iOS & Android) AND Windows PC, I would like Mobile app will stream camera output to PC(no audio will require), and on PC user will able to capture screenshot from running steam. Below is possibility I am thinking.
Option 1 : Develop a Web based application which will run in Google Chrome or Firefox browser on Windows PC, and also will develop mobile client app which will run on Android and iOS devices, and using WebRTC it will steam mobile camera output to website which will be running in PC’s Chrome or Safari browser, and User will able to capture screenshot from running steam and that will be saved on user’s computer. Drawback of this solution is that I have to develop Website so will have not user’s computer file storage, as standalone desktop application is more preferable because desktop application will able to easily access user’s computer file system
Option 2: Develop 3 applications
one Standalone desktop application which will have all features which require to access computer’s local file system.
Develop a small web site which will have just a single screen, it will use for display mobile camera steam, and user will capture output from that page, will develop a kind of watchdog service in desktop app, which will grab latest captured screen from Chrome or Firefox browser.
3rd app would be mobile client which will be running on mobile which will stream camera output to PC using WebRTC. Drawback of this solution is that this solution would be not real-time, because user have to use two separate interface for Screen capture have to use PC Chrome or Firefox browser, and after screen capture have to move back to PC application.
My understanding is that It’s not possible to have Server less solution for WebRTC, Signaling server will require, I found some of open source WebRTC servers i.e. Easyrtc, signalmaster which I have to use and have to configure in own environment.
As this is my first WebRTC based project, so would like to know your opinion about Solution which i am thinking, is it right or is there any better way to achieve it.
Thanks
Suresh
Hi suresh IOS not support WebRTC,But its possible in android
My option is Node-webkit(desktop app using HTML 5,Javascript,css3,Nodejs,NPM)
https://github.com/rogerwang/node-webkit/wiki
mobile app(intel xdk ) but ios not support WebRTC
http://xdk-software.intel.com/
You could use Twilio Video to do this.
You can build multi-party video calling into both web and native applications with the SDKs for:
JavaScript
iOS
Android
https://www.twilio.com/docs/api/video
You will also find the server-side starter apps in various languages you need to get started quickly.
In my preferred language example Python, a small Flask app handles token creation to handle user access for video conversations in app.py and the basic WebRTC functions can be found in quickstart.js.
Note: I work for Twilio.

Create Application "web" protocol

I am using chrome and I see this line when hovering over a link
steam://run/17730
An example exists at the link below, click play game which opens a dialog and then hover over "Yes I have steam".
http://store.steampowered.com/app/17730/
This appears to be a restful command to a client application using an application specific protocol, in this case the "Steam game management service"
My question is this
if it is not a local command what is it?
If it is a local command, how could I implement something like this using say a Bill:// protocol.
I can't find anything on this so this may be tagged incorrectly, I apologize for that.
It seems that steam has registered a protocol with the browser which communicates with the local steam process. The following link might get you started with registering your own protocol in firefox at least:
https://support.steampowered.com/kb_article.php?ref=2087-MZES-9065
I would guess that there are similar links on the steam support site for other browsers.
The other part of this is probably going to be writing a simple local web server that can receive and respond to these requests. I'm not sure what language you are working in but an example for C# is the following: http://www.codeproject.com/Articles/36517/Communicating-from-the-Browser-to-a-Desktop-Applic. Best of luck!

How to launch a chrome packaged app using a URL scheme

I have a chrome packaged app that I update form time to time - when I'm creating an update I want to send email to subscribed customers with a link the that extension -that will launch it.
Anyone knows if there is a chrome url scheme i can use?
Currently this is not possible, but there is an API proposal and an implementation being developed for a chrome-app://appid URL schema that would do pretty much what you describe.
Follow the status here
I also want to be able to do this. It seems that one possible solution is to install both an extension and a packaged app, and have the extension register a context menu that then communicates with the app, or something similar.

Resources