This is probably one of the most critical components needed in order for most people to be able to switch away from binary gmscore, mainly because most media nowadays (i.e. youtube, netflix, etc.) depends on it in order to be at all useful. Everything else can be worked around, replaced, or proxied.
There is no real indicator of status of this, the closest is from 3rd party website, and indicates "Cast API: Some initial work done, nothing usable, applications may crash."
youtube cast seems to work fine as it still uses castv1. Almost all other apps have migrated to castv2.
Castv2 support could be added using this API https://github.com/vitalidze/chromecast-java-api-v2
Nice find @funkypc !
I am a long time cyanogenmod user without gapps. The cast api is one of the most missing feature (to use chromecast). Just added a 15$ bounty to support this issue: https://www.bountysource.com/issues/30090937-cast-api-not-implemented
I've just added $ 25,-- to the bounty, I'd be really happy to see this issue resolved.
It seems that there are big progresses in the last preview build :)
Does it work yet? I'm currently investigating if I'm going to switch to no gapps (or at least no google account) but Chromecast will be missed because I use it daily. If it works, or needs to be tested, I'll give it a try.
No, Cast API is not yet implemented.
But in the log there is "Fix newest Cast Framework for some apps".
Doesn't it include something?
This is just a fix to ensure that apps using the newest cast framework don't crash on startup and are usable, it does not provide cast functionality.
Is there a workaround to get Casting working either with an app or a hack until it is officially implemented into microg?
BubbleUPnP has Chromecast support and allows you to stream arbitrary content to the Chromecast, but only if the content is provided as drm-free media file/stream. Some older versions of YouTube can cast without play services. There are also apps that stream the screen content which might be usable with a chromecast as well.
AFAIK there is no fully features free software solution other than using chromium on a desktop so far to control a chromecast.
Thanks, I'll investigate.
I have also found this "unofficial" documentation of the protocol v2: https://github.com/jloutsenhizer/CR-Cast/wiki/Chromecast-Implementation-Documentation-WIP
Is there anything one can do to help with this problem? I own a chromecast 1st gen and want to use a complete Google-free smartphone in the future.
@christianfl: Anyone (well, a programmer) could implement it and submit a pull request.
There is also a plugin for PulseAudio(Linux audio server) which supports streaming to Chromecast.
Here is the code concerning chromecast:
https://github.com/masmu/pulseaudio-dlna/tree/master/pulseaudio_dlna/plugins/chromecast
I'd like to see this so I've added $5 to the bounty.
Is anybody even looking at this?
This is THE critical feature.
I can't lead the effort on this, but if somebody else does, I am happy to help out.
I'm looking at the code but I can't figure out where to start, @mar-v-in any ideas on how I should begin familiarizing myself with MicroG
@AshotN Did you manage to familiarise yourself with the code and make any progress. Personally I wouldn't know where to begin, but wishing you the best of luck in getting this feature implemented.
I can't say I have, I spoke with @mar-v-in and he said I'd have to de-compile the original GApps and reverse engineer the Chromecast implementation. Sadly, this is bit out of my scope and I wouldn't be able to take lead on something like this.
Just added $100 to the bounty for this. Hope this helps get the ball rolling on this project.
Any work arounds for the time being? I only need Netflix to cast to the chromecast
@boggle247 best workaround at the moment is to get an Android TV device instead of the chromecast. There are Android TV builds available for raspberry pi 3, but I don't know if netf**ks works on it or not.
@lbdroid it's suboptimal because most of those devices can only stream from Netflix in 960x540 (SD) thanks to the "Level 1-Widevine-drm"/Netflix certification checks the app does and the Android TV devices don't/can't implement.
So get a nexus player from ebay. Or cancel that service and use something better.
And do you really need to see the color of tv actors' zits?
Does anyone here have contacts with the VLC developers? They're beta testing their open implementation of cast in VLC player.
I found this commit for VLC Android that may or may not be helpful.
@kevincianfarini : Do they actually implement cast? Or are they just using the public API?
@lbdroid VLC is committed to a fully open implementation of their app. It does not rely on Google Play Services at all. They just implemented casting in their app without those dependencies so it might be worth looking into.
@kevincianfarini : That appears to be an assumption you are making, rather than actual fact.
Since you said that, I decided to actually take a peek at the commit you referenced to, and they are, in fact, linking against MediaRouter. They are NOT re-implementing MediaRouter and everything else from there to the chromecast (which includes google services). So unfortunately, their implementation is entirely useless.
I think that you are misunderstanding what it is to write something that is open source. In fact it generally does NOT (except in the case of GNU zealots) mean that everything it uses has to be open source. Rather it just means that WHAT YOU WRITE is open source. You can write open source software that uses closed source components.
@lbdroid sorry it seems I haven't done my due diligence. I was under the impression from both the yalp store and some conversations online that VLC doesn't rely on Google play services.
Also there is no misunderstanding there. I was operating under the guise that VLC only used open components in their tech stack which is most definitely wrong.
Update: you may want to read this https://geoffreymetais.github.io/features/vlc-30/
It seems they don't rely on Google play services?
I've found the commit from VLC that actually seems to implement the cast API, not the actual act of casting in android.
https://code.videolan.org/videolan/vlc-android/commit/d29241e315211752c475b0f890392f0c076c390e
@kevincianfarini the version that supposedly has an fully open source implementation of the chromecast streaming api is the desktop version (VLC 3.0 to be exact)
@baguio the article I linked specifically mentions not using Google play services and building their own Chromecast API. Google play services is only available for Android. I'm fairly certain that this API is built for the VLC Android app as well.
_VLC android does not rely on google play services._ They had to have implemented the cast API somehow without them to get the functionality.
Would pychromecast (https://github.com/balloob/pychromecast, based on this: https://github.com/minektur/chromecast-python-poc) be a good starting point to look at how the cast protocol works down inside the machine room?
Hi guys. Is there any chance to access media servers by dlna in a local area network without gapps and closed source/playstore app? I have bought AllCast (at leas from xda devs) but it´s not handy for playing music.
I don´t wanna go without microg anymore... :-/
@MarcoWilli Yes, but that is off topic.
@kevincianfarini the code you are looking for, for VLC is here: https://git.videolan.org/?p=vlc.git;a=tree;f=modules/stream_out/chromecast;hb=HEAD
The code you linked to is just the Android UI for this code.
@lbdroid "You can write open source software that uses closed source components." this would be a direct violation of the GPL for VLC.
@kevincianfarini yes, you are correct, we only use system components and open source components for VLC.
@jbkempf: then do please explain how it is that VLC can use closed source video decode acceleration (Nvidia) and is able to output video through a closed source driver (again nvidia as an example). Or for the matter, do anything at all on windoze.
Your claim that use of any closed source API in a gpl program is a gpl violation is patently absurd. In fact, the gpl only protects in the other way around. You cannot link TO something licensed under gpl FROM something that is closed source.
then do please explain how it is that VLC can use closed source video decode acceleration (Nvidia) and is able to output video through a closed source driver (again nvidia as an example). Or for the matter, do anything at all on windoze.
@lbdroid by using the system APIs. See GPLv2 section 3, starting from _"However, as a special exception"_...
Your claim that use of any closed source API in a gpl program is a gpl violation is patently absurd
I do not claim that, please read correctly my comment, and notably the part about system components. But yes, embedding non-GPL-compatible code inside a GPL application is a GPL violation, whether you like it or not.
Nobody is talking about embedding closed source code in it to begin with. Cast is a system API.
Absolutely not: it is a Google Play Service API, that is not part of the system AND a non-open source SDK, that you need to embed in your application (com.google.android.gms:play-services-cast first and now com.google.android.gms:play-services-cast-framework). In addition to a different license than the rest of the GPS SDK.
The only way I can read that is that you are politically butthurt by google.
No. I just respect the GPL license. If you don't like the GPL, don't use it. But stop claiming counter-truths or doing ad hominem attacks...
Also, the goal of this very project is to replace the Google Play Services... Therefore, not using the GPS SDK.
Anyway, what are the steps forward for this?
@jbkempf & @mar-v-in Let's be pragmatic here, is there anything I can do to help, I'm running Android 8.1.
VLC is casting itself to the Chromecast and does just that, but what MicroG needs is to replace the whole Cast API so that any Chromecast-enabled app can recognize it and use it like if it was the real thing. That's a little different.
To begin we need to find how apps recognize the presence of a Chromecast.
Then we need to let the app communicate (send and receive) with the Chromecast.
More easily said than done :-)
So..tcpdump and stuff on my lan router?
~A
-------- Original Message --------
On Apr 19, 2018, 17:37, Gabriel Hautclocq wrote:
VLC is casting itself to the Chromecast and does just that, but what MicroG needs is to replace the whole Cast API so that any Chromecast-enabled app can recognize it and use it like if it was the real thing. That's a little different.
To begin we need to find how apps recognize the presence of a Chromecast.
Then we need to let the app communicate (send and receive) with the Chromecast.
More easily said than done :-)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Not sure why people are arguing about VLC.
~~~
+-------------------------+
| Your phone | +----------+
| pychromecast +--->+-+-------->Chromecast|
| VLC +----^ | +----------+
| +--->G Play Svcs +----^ |
| +-------->microG +----^ |
| | (2) (1) |
| | |
| | |
| <-+ stupid app 1 |
| <-+ stupid app 2 |
| ^-+ stupid app 3 |
| |
+-------------------------+
~
The problem is nobody knows how to re-implement (2) since G Play Svcs is closed-source. Hopefully there are API docs somewhere, like MS's Windows API docs. (1) is known so it's "easy" although microG still has to spend the development cost to do it itself in Java.
Yes the stupid apps could talk to the chromecast directly and bypass G Play Svcs, but for some reason, some idiot apps like to get assfucked by Google without lube. microG is transparently replacing this with a harmless dildo, so the apps don't have to each individually change their stupid ass minds about it.
BTW I'm happy to contribute 0.1 BTC to the bounty, cba going through bountysource myself. Be quick the price is dropping :p
Bounty currently stays around $950 so it's probably not the money. What needs to be done here?
It seems relegated to the "to do" list seemingly indefinitely.
I'd love to see some information where to put which code. What's missing actually? C code, Java code?
Which interfaces do I need to implement? How do I make my implementation available?
If you could help a little bit with where to start, it shouldn't be too hard to do.
@armills is working on this, his PR #555 is very far already. I had no time to test it yet, but looks promising. It currently requires some modifications of another library, which I'd prefer to have merged before merging the code.
@mar-v-in So far the upstream maintainer has pushed back quite a bit on the changes, and to be fair our use case is kind of out-of-scope for that project. I think that since we're asking them to expose a new API, we'll be better off merging #555 which points to my fork, and circling back to getting the changes upstreamed once we're more confident that the API won't need to change.
Will this ever get fixed?
Yes, I plan to test and merge @armills work within the next 2 weeks.
@mar-v-in will you try to get safetynet working again when you start working on microg again?
@mar-v-in, is this one still on your radar? Aiming to check-in here, not annoy you. I'd love to test this when it's all merged in.
Added another $5, seems the bounty is now a total of $255
@mar-v-in, is this one still on your radar? Aiming to check-in here, not annoy you. I'd love to test this when it's all merged in.
He said he planned it but he didn't get to it?
Will it ever get fixed?
Doesn't work for me, I was curious when I saw this so I tried to use the Cast function from quick settings. It didn't do anything. Setup notes that I know of: Moto X4 w/ Havoc OS (Pie) and installed core only as user (not system). I needed it to keep GCam from crashing, didn't bother trying it for anything else until now.
Please update to this build and retry.
This build isn't on F-Droid.
I installed your listed version, no change.
I tried as priv-app and with the other plugins but there was no change. I also saw the cast icon didn't show up in Youtube Vanced (I don't use it but I checked to see if other apps would show the icon).
I also posted a question to the Moto X4 Havoc group to make sure it's working with normal GPlay Services: https://forum.xda-developers.com/showpost.php?p=80092491&postcount=701
Should this work by now? Using microG 2.0.10.1940 which is built-in in LineageOS for microG it does not work neither with casting directly from quick settings nor with Netflix and Amazon. Netflix shows the icon (and after tipping on it the name of the chromecast) but does not connect.
Any information on this? Can I help somehow?
Just to clarify, you guys (that just commented about it not working) are testing the GSF Cast API and not just the regular chromecast connection? Try installing VLC and casting from that - it talks to the chromecast directly without going through the GSF Cast API. (Play a video, then after 2-3 seconds a cast icon will show up in the corner.) If this doesn't work, then your problem is something other networking issue unrelated to this issue.
If VLC cast works, but (e.g.) Spotify cast doesn't work - it uses the GSF Cast API - then your issue is the same as this one.
Casting works very inconsistently and very poorly for me using Netflix. VLC works fine. This issue should be reopened.
I am using microG Services Core 0.2.10.19420 with lineageOS 16 from just a couple months ago. VLC works & Spotify doesn't work. I have a relatively complex firewall, but the same settings work for both Spotify and VLC on my other phone using the real GSF.
Would be nice if devs could provide some diagnostic instructions.
One workaround that works for me is, if I log into Spotify on both phones, use the real-Google phone's Spotify to connect to the chromecast, then I can use my microG phone's Spotify to control the chromecast. Ofc, this depends on having a 2nd real-Google phone & an app that supports this level of control.
This suggests that the chromecast is talking to the service directly, rather than via the controller, which makes some sense. In other words, any quality issues you might be having, is probably not microG's fault. (My Spotify's streaming quality in the chromecast is fine even though microG can't connect to it.)
Disney+ isn't working, somebody know why?
Anybody else facing YouTube casting issues? The cast button isn't displayed. I'm on android 10 using the latest stable microg build. It's the only feature that's keeping me from using this.
I am using microG Services Core 0.2.10.19420 with lineageOS 16 from just a couple months ago. VLC works & Spotify doesn't work. I have a relatively complex firewall, but the same settings work for both Spotify and VLC on my other phone using the real GSF.
Would be nice if devs could provide some diagnostic instructions.
If I recall correctly, VLC implemented their own casting fix irrelevant of MicroG. The only reason to test with VLC is to check for a network connectivity issue.
But this issue is definitely not resolved. I'm not sure why it's still closed.
Most helpful comment
Is anybody even looking at this?
This is THE critical feature.