Implementing Sender application using javascript - Google Chromecast

Does anybody know if it would be possible to write a Google Cast sender application that runs inside a standard web browser just using javascript? Is there anything in the Sender-Receiver communication that could not be implemented using javascript?
(as long as no there is no javascript Cast Sender API available from Google this would mean writing the thing more or less from scratch)

Arne S said:
Does anybody know if it would be possible to write a Google Cast sender application that runs inside a standard web browser just using javascript? Is there anything in the Sender-Receiver communication that could not be implemented using javascript?
(as long as no there is no javascript Cast Sender API available from Google this would mean writing the thing more or less from scratch)
Click to expand...
Click to collapse
I assume you mean not in chrome. If so then you would need to implement thevram client yourself usung javascript.
I would suggest you look at the fling app. It no longerworks but i beleive it uses a custom client, of course its in java so good luck.
Seems like a lot of effort, what are trying to do?

gottahavit said:
Seems like a lot of effort, what are trying to do?
Click to expand...
Click to collapse
Not for me to implement, but if it is possible I'm sure someone will do it since it will mean that you could Google cast from any webpage regardless of browser and OS and without the user installing any software.

Related

idea for a framework

hello,
what i dont like about developing apps for phones is that you dont have such a broad choices of programming languages
here is the idea to circumvent this:
progamm a phonegap app that exposes its api to a certain web server.
the actually app code is on the server.
we only need some sort of bridge to use the javascript from the web server script
what do you think?
nomoral said:
hello,
what i dont like about developing apps for phones is that you dont have such a broad choices of programming languages
here is the idea to circumvent this:
progamm a phonegap app that exposes its api to a certain web server.
the actually app code is on the server.
we only need some sort of bridge to use the javascript from the web server script
what do you think?
Click to expand...
Click to collapse
Way too serious for off-topic. Maybe the other programming sections?

Chromecast "emulator"

Since chromecast simply get an url or data to play content already "on the cloud", it will be possibile to emulate its behaviour with a chrome extension or something like that?
I'd love to use a chromecast-like interface on my desktop pc...
p.nightmare said:
Since chromecast simply get an url or data to play content already "on the cloud", it will be possibile to emulate its behaviour with a chrome extension or something like that?
I'd love to use a chromecast-like interface on my desktop pc...
Click to expand...
Click to collapse
I'd second that. I'd love to see the ability to chrome cast TO a (widows) chrome browser.
I have a number of MCE PC's connected to HD TV's and computer with monitors throughout the house that would be great as the recipients of "casting".
At work I'd like to be able to look something up on my phone and then sent it to my nearest PC browser...
htcsens2 said:
I'd second that. I'd love to see the ability to chrome cast TO a (widows) chrome browser.
I have a number of MCE PC's connected to HD TV's and computer with monitors throughout the house that would be great as the recipients of "casting".
At work I'd like to be able to look something up on my phone and then sent it to my nearest PC browser...
Click to expand...
Click to collapse
You mean like this? - http://goo.gl/NOoel
You won't be able to push Netflix to the browser the same way, but you can certainly do so with web content.
Jason_V said:
You mean like this? - http://goo.gl/NOoel
You won't be able to push Netflix to the browser the same way, but you can certainly do so with web content.
Click to expand...
Click to collapse
Yeah kind of like that but completely integrated into he chrome cast infrastructure and APIs so that it is compatible across all apps and is just one click on the new "cast" buttons that are cropping up at the top of all my Android apps now .... (Netflix, Youtube, Google music etc.)
There has been talk of 3rd party hardware makers being encouraged to support the standard so shouldn't be too hard to do proper chrome browser integration as a target.
I can't believe no one has thought of it yet :fingers-crossed:
here
p.nightmare said:
I can't believe no one has thought of it yet :fingers-crossed:
Click to expand...
Click to collapse
Here you go github.com/dz0ny/leapcast
dz0ny said:
Here you go github.com/dz0ny/leapcast
Click to expand...
Click to collapse
awesome! I will definitely keep an eye on that :good: :good:
Nodecast is also an option
p.nightmare said:
awesome! I will definitely keep an eye on that :good: :good:
Click to expand...
Click to collapse
Beside Leapcast (which is implemented in python), there is a JavaScript-/Node.js-Port in Git-Hub available. The port was made by Sebastian Mauer, the guy who wrote Cheapcast.
I spend the last weekend exeperimenting with both Nodecast and Cheapcast. Now Nodecast runs here in a Windows 8.1 virtual machine - and I'm able to stream from other Windows and Android-devices.
I wrote a few tutorials, how to setup Nodecast on Windows (it also possible to use similar steps in Mac OS X or Linux). The tutorial is currently only in German - but Google translate shall do the job.
Nodecast setup for Windows-tutorial: http://goo.gl/2ZU5Mm
Maybe it helps
Leapcast 2.0?
Anyone still working on Leapcast now that the 2.0 SDK came out? Lots of changes like going from DIAL to mDNS for one. Leapcast was very handy for running on a PC that was already connected to the TV. Sadly, all the apps compiled against the newer SDK won't work with it. They won't even discover it as a Chromecast now.
https://chrome.google.com/webstore/...oakcolegkcddbk?utm_source=chrome-app-launcher
This was an attempt to do this but I never got it to work on my side.
Unfortunately, SDK 2.0 requires the Chromecast to calculate key using certificate issued by Google. We will probably wait a long time to see leapcast, CheapCast and NodeCast working again. It might not be even possible at all.
Johny_G said:
Unfortunately, SDK 2.0 requires the Chromecast to calcate key using certificate issued by Google. We will probably wait a long time to see leapcast, CheapCast and NodeCast working again. It might not be even possible at all.
Click to expand...
Click to collapse
Not the best news, but thanks Johny for the insight.
If all the rooted ROMs can handle SDK 2.0 and Google's new authentication, there's probably a way to get the emulators up and running with it. Just a matter of time and determination I hope. I wish Google was a bit more open on the software side for the Chromecast. Having the new SDK for sender/receiver apps is great, but allowing companie/people to recreate the piece in the middle would also benefit them I would think. It would be tough for people to beat the Chromecast's price tag, but having other options would be good.
Averix said:
Not the best news, but thanks Johny for the insight.
If all the rooted ROMs can handle SDK 2.0 and Google's new authentication, there's probably a way to get the emulators up and running with it. Just a matter of time and determination I hope. I wish Google was a bit more open on the software side for the Chromecast. Having the new SDK for sender/receiver apps is great, but allowing companie/people to recreate the piece in the middle would also benefit them I would think. It would be tough for people to beat the Chromecast's price tag, but having other options would be good.
Click to expand...
Click to collapse
I wouldn't hold my breath. The ROMs get the upgrade essentially "for free" as it's part of the stock ROM code. Maybe the desktop players can take advantage of that, probably not, especially if it's a binary or relying on some kind of TPM or other function in the Chromecast hardware itself.
Having options is good for the consumer, but for a manufacturer, more options = more competition = more mouths to feed = lower margins = more work to keep competitive. One of the reasons Apple is so aggressive about protecting the exclusivity of its platform.
Warning! TL;DR below!
The point is, that every single Chromecast device has its unique ID, its unique MAC Address, and its (unique?) signed certificate. Also, it might have some kind of ID generated when you set the device up (similar to Push ID used in Google Cloud Messaging). Some of those (maybe all of them) have to play together to calculate the key. As soon as you pull the certificate out and put it in different environment, the result of the calculation won't match the SDK's expectations. So there is pretty good chance, that bypassing the key might be completely impossible without modifying the SDK itself (and it would require the developers to actually invest some effort to support these alternatives) and maybe the Chromecast device software as well. But who knows, the guys involved in those "emulators" are way smarter than most of us and might figure something out .
This is the biggest issue. The other one is, that everything has changed in the new SDK/API, and all of the methods used in those emulators are now deprecated and need to be implemented all over again in a different fashion to work with 2.0. This might actually be a good thing, since developers involved in testing of the way-too-rushed 1.0 seemed not to have a lot of kind words to say about it. I have attended one Chromcast block on a local conference, and it was basically 2 hours of swearing.
I've stumbled upon these issues today (and a bit of yesterday), trying to get my app working in the office (I forgot my Chromecast at home - again), and here are some sources if you are more interested in the topic:
https://plus.google.com/+SebastianMauer/posts/83hTniKEDwN
https://github.com/dz0ny/leapcast/issues/29#issuecomment-37288608
https://github.com/dz0ny/leapcast/issues/96
As a developer, I have to say, that Google is making things awfully difficult lately, and the "don't be evil" policy seems to slowly fade away. They put way too much effort into marketing decisions, and have no time to properly test APIs and SDKs before they spit them out . Mostly, when trying some new Android-related technology (to be honest, its mostly Google Play Services technology these days, so AOSP starts to be completely useless), I spend most of the time working around things that nobody thought of (i.e. the Translucency API in KitKat was obviously tailored for Google Now Launcher, and is a huge PITA tu be used elsewhere) and fixing the broken samples that come with them. It might seem weird, but sometimes (say hello to Play Games Services and in-app billing v1+v2!) the sample is inseparable part of the final implementation, so you have to fix their rushed code anyway. I shouldn't be complaining, since things like that raise the value of developers willing to go through all of this in their spare time, but the change of philosophy still bugs me a lot. Google and Android used to be strongly community-oriented, and now the marketing is pulling it all away.
Should the goal really be to emulate a Chromecast or should the effort be geared toward supporting DIAL protocol?
I would think the latter is the better option because you could support whatever the hardware supports without the limitations imposed on us from CCast Hardware.
Maybe I'm wrong but I always looked at DIAL as an extension of UPnP and separate from the CCast itself and the Chromecast SDK as not much more than a kit to add DIAL support to Android (and iOS) not meant to build anything on the CCast side at all.
Other companies like Roku are planning some DIAL support and I doubt highly they will have a CCast ID and Certificate.
In the end I think we will get something similar to this functionality from a player app like VLC on PC and MAC, or perhaps in Chrome itself.
Cause I think (and I may be totally wrong here) that it isn't the Apps we use that checks the Whitelist and IDs it is the CCast itself that when invoked to load a player app to stream it also checks the whitelist and tests security before it plays.
SO if someone created a program for PC that made the PC announce itself as a DIAL capable device that when connected to loads the app into Chrome, I bet most of it would work.
Might not work with any of the DRM sites like Netflix and Hulu but for things like local content and unprotected streams I see no reason why it wouldn't.
In fact I bet the trouble some are having with Channels in Plex and others would go away because a PC Chrome instance would be able to play many more Transport types than a CCast can currently.
Asphyx said:
Should the goal really be to emulate a Chromecast or should the effort be geared toward supporting DIAL protocol?
I would think the latter is the better option because you could support whatever the hardware supports without the limitations imposed on us from CCast Hardware.
Maybe I'm wrong but I always looked at DIAL as an extension of UPnP and separate from the CCast itself and the Chromecast SDK as not much more than a kit to add DIAL support to Android (and iOS) not meant to build anything on the CCast side at all.
.......
Click to expand...
Click to collapse
I agree with you. I could actually care less about emulating the specifics of what's in the Chromecast hardware. What I do want is the ability for those unrestricted apps (ie not Netflix) to be able to use their Cast button to find, connect to, and use whatever the emulator is. The new CC SDK doesn't use DIAL to do the initial search any longer. It now uses mDNS. All of the previous apps (YouTube, Pandora, etc.) are still using the old API and DIAL discovery which appears to be backward compatible with the new Chromecast stick software. If you look at the debug logs of the stick, both the v1 and v2 APIs are accounted for. As for Roku, my guess (I haven't started digging in on what they're up to yet) is that they have an app that is using DIAL for discovering the Roku and then just acting as a remote control for all the box functions. Chromecast was a bit more unique since it could basically load up anything from the web as a receiver/playback client since the software is just basically a Chrome browser with some wrappers around it. That's what made it much more dynamic without having to load "channels" in the box within a custom framework like Roku does.
And Bhiga, as for economics on Google providing the software to other hardware makers, I think it it would actually be in their best interest. The Chromecast right now has to be either close to at cost for them or a loss leader. If they can get the Cast API to become a default standard on new consumer devices, that would help them take over that space. To me, that is such a better proposition for them than trying to get the complexities of something like GoogleTV into TVs.
Averix said:
And Bhiga, as for economics on Google providing the software to other hardware makers, I think it it would actually be in their best interest. The Chromecast right now has to be either close to at cost for them or a loss leader. If they can get the Cast API to become a default standard on new consumer devices, that would help them take over that space. To me, that is such a better proposition for them than trying to get the complexities of something like GoogleTV into TVs.
Click to expand...
Click to collapse
mDNS actually makes discovery a lot easier - mDNS = Bonjour = what Apple and TiVo use for discovery already.
I agree with you that adoption of the API and protocols is the goal. At this stage an Android emulator probably would help adoption, but my point was that a desktop emulator doesn't necessarily add to the rate. If someone starts looking to using a desktop because they think they don't need a Google Cast device, they'll likely runs across Plex and Miracast and may decide they don't need Google Cast at all.
bhiga said:
I agree with you that adoption of the API and protocols is the goal.
Click to expand...
Click to collapse
I wish Google agreed with us.
Averix said:
I wish Google agreed with us.
Click to expand...
Click to collapse
I bet anything there are some at Google who do agree with us but when your as BIG a company as Google is it takes forever to get everyone on board and thinking along the same lines enough to manifest it into an end product.
In the end what all if this really tells us is how much DLNA Consortium has failed to standardize Media Distribution by not going far enough and thinking of it from the end user ergonomic experience.
If this discovery and launch capability was more fleshed out in the DLNA specs we might not be talking about DIAL and mDNS right now.
At some point all these protocols (DLNA, UPnP, DIAL) should be merged into one standardized protocol that any platform can use.
Probably years away though...
Asphyx said:
If this discovery and launch capability was more fleshed out in the DLNA specs we might not be talking about DIAL and mDNS right now.
At some point all these protocols (DLNA, UPnP, DIAL) should be merged into one standardized protocol that any platform can use.
Probably years away though...
Click to expand...
Click to collapse
My concern is that unless Google is willing to push this as a standard rather than just apps for one dongle, it will only be a matter of time before the giant (un)friendly fruit company swoops in and AirPlay becomes the defacto standard that all TV makers, set top makers, and anyone else are forced to build in. It's not quite the same as how DLNA and UPnP have become sort of irrelevant, but it could pan out that way for the Google Cast API without more hardware devices having the capability built in. Time and market pressure will tell I guess.

Unable to root but food for thought.

Okay, I messed up and mis-spelled eureka-image while rooting and didn't pay attention and let the device update after I rebooted it after a couple hours of being gone then I was stuck in google locked down build.
Well this got me thinking if we can't root can we make "Chromecast" believe we are using Google Movies when in fact it is a 3rd party app?
Wouldn't we just need to find the string that communicates that the 3rd party app is Google Movies, or Pandora or any of the Official Apps?
I could be wrong but I think there is away to make it work but it'll have to be built in the 3rd party's app.
Thoughts?
maxjivi05 said:
Okay, I messed up and mis-spelled eureka-image while rooting and didn't pay attention and let the device update after I rebooted it after a couple hours of being gone then I was stuck in google locked down build.
Well this got me thinking if we can't root can we make "Chromecast" believe we are using Google Movies when in fact it is a 3rd party app?
Wouldn't we just need to find the string that communicates that the 3rd party app is Google Movies, or Pandora or any of the Official Apps?
I could be wrong but I think there is away to make it work but it'll have to be built in the 3rd party's app.
Thoughts?
Click to expand...
Click to collapse
The Chromecast utilises a whitelisting type file in which applications that it will respond to is presented, unfortunately if it isn't aware of an application it wont show up in the list for that device (due to the dial protocol).
We can't man in the middle non rooted devices as the whitelist received is provided through https and therefore is not easily attacked (trust me I've spent more than enough hours trying).
maxjivi05 said:
Okay, I messed up and mis-spelled eureka-image while rooting and didn't pay attention and let the device update after I rebooted it after a couple hours of being gone then I was stuck in google locked down build.
Well this got me thinking if we can't root can we make "Chromecast" believe we are using Google Movies when in fact it is a 3rd party app?
Wouldn't we just need to find the string that communicates that the 3rd party app is Google Movies, or Pandora or any of the Official Apps?
I could be wrong but I think there is away to make it work but it'll have to be built in the 3rd party's app.
Thoughts?
Click to expand...
Click to collapse
I had thought about this just before KyoCast appeared, but I'm pretty sure it would be against the DIAL registry's registration and/or Cast SDK's license for an app to impersonate another app. I still like the concept though.
Actually, even if an app used another app's DIAL ID, the whitelist would still point the Chromecast-side app to the real app, (ie, phone might run SneakyApp by Chromecast would still launch its Google Movies app), I think.
Man this is awful they went through all this effort to limit users :/
Okay, now I know all the apps require to be pulled up differently on Chromecast but what about if we mimic "Casting Tab" which I believe is driven by the host computer and Chromecast is only listening and displaying what it see's. I'm sure it's secured with HTTPS too but HTTPs isn't that secure but you'd probably need a certificate if they are authenticating but if not it would be as easy as sniffing a handshake and injecting that packet then utilizing that connection. Sorry I'm thinking outside the box! lol
Sent from my HTC6435LVW using Tapatalk
bhiga said:
I had thought about this just before KyoCast appeared, but I'm pretty sure it would be against the DIAL registry's registration and/or Cast SDK's license for an app to impersonate another app. I still like the concept though.
Actually, even if an app used another app's DIAL ID, the whitelist would still point the Chromecast-side app to the real app, (ie, phone might run SneakyApp by Chromecast would still launch its Google Movies app), I think.
Click to expand...
Click to collapse
it is probably ok to use someone else's player in an App you wrote but it is probably not ok to say you are their App that also uses it.
I can certainly see Real Player making their CCast (DIAL) Player App available to 3rd Party developers to use for other projects like NFL and MLB streams that require DRM as part of their Content Creator packages.
Maybe you know (I'm sure Team Eureka would have an idea) if it is the Apps we run that are Whitelisted or the Apps that actually play on the CCast that are restricted by the Whitelist. I'm betting the Latter...
As I know it, the whitelist controls everything Chromecast "runs."
Sent from a device with no keyboard. Please forgive typos, they may not be my own.

[Q] Default browser

I've searched and haven't found much other than it is not possible threads but is there any way to change the default browser to something other than stock?
I want to use UC Browser. The reason, I subscribe to a few boards that have videos posted, such as Powerblock TV, an automotive enthusiast site. Internet Explorer doesn't play half of them and when it comes to Flash, neither do.
However, I can cut and paste out of IE into UC and the video plays fine.
I did development back on Windows Mobile and never mad the cut to WP. We had some cool tools back then and I know the SDK is limited in WP in comparison.
Hopefully there is a way. If not, I will just live with it like I have been.
Nope, currently we can't make a default browser for THIRD PARTY Apps even SECOND PARTY apps.
Hope this feature will come in WP8.2 or may be WP9.
djamol said:
Nope, currently we can't make a default browser for THIRD PARTY Apps even SECOND PARTY apps.
Hope this feature will come in WP8.2 or may be WP9.
Click to expand...
Click to collapse
I suspected that although has anyone seen any reference to it in future releases?
It *might* be possible, on interop-unlocked phones. On WP7 I was able to make a different browser launch for *most* scenarios (that normally invoke IE) but changing the HTTP and HTTPS URI handlers in the registry.
It would be really nice if Microsoft had just let people list those URI schemes in app manifests, but nooooooo.

Do any browsers that work support proper Javascript?

I'm wanting to develop a web app that basically acts as a dashboard for e-ink devices like this, with a list of hacker news headlines, weather, time, etc. However, I'm not sure about the javascript support for the browsers that run on the NST. I've tried loading older version of firefox and some other browsers, but they always fail to install, so I can't ascertain their JS support.
Honestly, I don't need a huge array of JS support (mainly going to render the pages serverside in Node) but I do need rudimentary support for things like refreshing the page. I'm trying really hard to avoid developing a native app, since the tooling seems to cut off support for versions of android older than 2.2 and I can't find a download for the old Eclipse SDK.
Thanks for any info!
Pfhortune said:
I'm wanting to develop a web app that basically acts as a dashboard for e-ink devices like this, with a list of hacker news headlines, weather, time, etc. However, I'm not sure about the javascript support for the browsers that run on the NST. I've tried loading older version of firefox and some other browsers, but they always fail to install, so I can't ascertain their JS support.
Honestly, I don't need a huge array of JS support (mainly going to render the pages serverside in Node) but I do need rudimentary support for things like refreshing the page. I'm trying really hard to avoid developing a native app, since the tooling seems to cut off support for versions of android older than 2.2 and I can't find a download for the old Eclipse SDK.
Thanks for any info!
Click to expand...
Click to collapse
The best functioning browser for the NST is perhaps Opera Mobile (something like 12.1--available from the Opera website archive). Some people like Opera Mini but the current Play store version no longer runs.
Opera Mobile certainly handles at least some JavaScript.
nmyshkin said:
The best functioning browser for the NST is perhaps Opera Mobile (something like 12.1--available from the Opera website archive). Some people like Opera Mini but the current Play store version no longer runs.
Opera Mobile certainly handles at least some JavaScript.
Click to expand...
Click to collapse
Thanks for the info! I had to do a little searching to find the Opera ftp archive, but I found 12.1. It installed and works well! As soon as I have some progress on my web app, I'll be sure to post an update in this forum!
Pfhortune said:
Thanks for the info! I had to do a little searching to find the Opera ftp archive, but I found 12.1. It installed and works well! As soon as I have some progress on my web app, I'll be sure to post an update in this forum!
Click to expand...
Click to collapse
There is same version with extension support also

Categories

Resources