brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.87k stars 2.34k forks source link

Enable Chromecast support #209

Closed bsclifton closed 5 years ago

bsclifton commented 6 years ago

Need to enable Chromecast?

See https://github.com/brave/brave-browser/issues/209#issuecomment-459846613 and https://github.com/brave/brave-browser/issues/209#issuecomment-468966429

Description

It should be easy to toggle support for Chromecast. Given the steps above (enabling in brave://flags, etc) it isn't trivial to enable.

Original issue description

Carried over from browser-laptop

Starting with Chrome 51, casting support should be built in. We need to:

LesterCovax commented 5 years ago

The following settings work for me in Chrome 75.0.3770.100, but do not work in Brave Dev: 0.68.99 Chromium: 75.0.3770.100. This is with a variety of cast devices (Cast [audio] Group, Chromecast Ultra via ethernet, Chromecast Audio, Home Mini, Home, Home Max, and even a Fire TV Edition via ethernet), with most devices in different VLAN/subnets (10.0.0.x/24 vs 10.0.2.x/24 VLAN), with multicast DNS (mDNS) and multicast enhancement (IGMPv3) enabled on the router.

LesterCovax commented 5 years ago

As of Version 0.69.94 Chromium: 76.0.3809.62, it's now working again! Thank you all for the hard work getting this working again 👍

wi-ski commented 5 years ago

I just installed this browser and have spent the entire day moving my life into it.

Ty for building this. Ty for building this. Ty for building this.

bsclifton commented 5 years ago

@LesterCovax @wi-ski thanks for the appreciation! 😄

The credit goes to @jumde, @simonhong, and folks that helped them along the way!

Some notes about the implementation:

mcouvill commented 5 years ago

Using Version 0.68.132 Chromium: 76.0.3809.132 (Official Build) (64-bit). WebRTC new encode flag is disabled. Load Media Router Extension is Enabled. Connect to Cast devices on all IP disabled. View Cast Dialog is disabled.

I get the cast menu and pop, but it never finds devices. Trying to cast to a Chromecast stick. If I launch Chrome I see not only the stick, but the Google Home as well as my TVs if they are on. Same system so I don't think it is settings in the computer or network stopping it.

Any ideas on what to try?

LesterCovax commented 5 years ago

@mcouvill It appears you may be on the release version, and I'm not sure if the support has made its way to that version yet. When you enabled the Media Router Extension, did you do so during the flags or the extensions section in setting? You should have the following in your settings tab if the functionality is implemented.

image

mcouvill commented 5 years ago

Yeah, looks like I'm on release. Had to set it through the flags. Where do I grab the latest for Win10?

LesterCovax commented 5 years ago

@mcouvill There are links for each branch on their site.

https://brave.com/download-nightly https://brave.com/download-dev https://brave.com/download-beta

image

mcouvill commented 5 years ago

new issue. Grabbed both the beta and the nightly build but now stuck on it Connecting To The Internet and failing. Going dig through the archives first.

TheRoarkster commented 5 years ago

Is anyone else unable to change the volume using the Chromecast button?

Previously, the Chromecast dialog box would open separately from the Chromecast button if you disabled Views Cast Dialog. But now, that option is no longer available in brave://flags.

Is there a way to get it back? Or change the volume for the cast on the browser?

jumde commented 5 years ago

@TheRoarkster - Can you check if enabling brave://flags/#mirroring-service fixes it for you?

TheRoarkster commented 5 years ago

Nope (but thanks!). It looks like this is a Chrome change, not a Brave change (see Reddit).

@TheRoarkster - Can you check if enabling brave://flags/#mirroring-service fixes it for you?

kjozwiak commented 5 years ago

Verification PASSED on macOS 10.14.16 x64 using the following build:

Brave 0.69.130 Chromium: 77.0.3865.90 (Official Build) (64-bit)
Revision 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS macOS Version 10.14.6 (Build 18G95)
Screen Shot 2019-09-30 at 11 16 04 PM Screen Shot 2019-09-30 at 11 18 49 PM Screen Shot 2019-09-30 at 11 17 58 PM Screen Shot 2019-09-30 at 11 29 40 PM Screen Shot 2019-09-30 at 11 45 48 PM Screen Shot 2019-09-30 at 11 45 22 PM

Verification PASSED on Mint 19.1 x64 using the following build:

Brave 0.69.131 Chromium: 77.0.3865.90 (Official Build) (64-bit)
Revision 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS Linux
Screen Shot 2019-10-02 at 1 12 20 PM

Screenshot from 2019-10-02 13-03-39

Screen Shot 2019-10-02 at 1 13 43 PM

Verification PASSED on Windows 10 x64 using the following build:

Brave 0.69.131 Chromium: 77.0.3865.90 (Official Build) (64-bit)
Revision 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS Windows 10 OS Version 1809 (Build 17763.737)

casting2 casting1

TheRoarkster commented 5 years ago

Has anyone been able to get it to work with volume control?

bric3 commented 4 years ago

For me what worked, enabling these two flags, relauching Brave after toggling on each of the following flags :

joejoejo commented 4 years ago

bric3 that fixed the problem for me but there should be a permanent solution that does not require to keep changing flags inorder to keep it working.

elvey commented 4 years ago

I wonder - for the folks for whom this isn't working - could their firewall settings be the culprit? (For example, on MacOS, I don't have "Automatically allow downloaded signed software to to receive incoming connections enabled, and my initial response if I was prompted asking if I wanted to allow or deny incoming connections would be to deny.) It would help to clarify what the desired vs expected UI & behavior is on various OSes if there's a firewall block.

timojuonoja commented 3 years ago

Does not work for me.. I enabled #load-media-router-component-extension, but couldn't find other flags listed. Brave browser can see my chromecast device and connection can be initiated. However it disconnects immediately and TV flashes from black back to chromecast desktop showing slideshow.

OS: Solus Linux Brave: 1.18.77

Tried already if reboot helps, but same problem still...

amine250 commented 3 years ago

Does not work for me.. I enabled #load-media-router-component-extension, but couldn't find other flags listed. Brave browser can see my chromecast device and connection can be initiated. However it disconnects immediately and TV flashes from black back to chromecast desktop showing slideshow.

OS: Solus Linux Brave: 1.18.77

Tried already if reboot helps, but same problem still...

It works for me running the latest brave, the second flag is called brave://flags/#allow-all-sites-to-initiate-mirroring

timojuonoja commented 3 years ago

It works for me running the latest brave, the second flag is called brave://flags/#allow-all-sites-to-initiate-mirroring

That flag doesn't help for me. Still the same... tries, but fails.

Edit Seems to problem on my machine somehow.. even Chrome is not working anymore. I can cast Youtube, which I guess has some native support, but desktop or tab casting fails every time on both browsers. Works on other devices though... weird.

Edit2 Seems to problem on video acceleration in Linux. It tries to use VA-API, which fails. I can bypass this by starting Brave with --disable-gpu. Hopefully this will be resolved sooner or later somehow..

raduliviu commented 3 years ago

Hey guys, I tried enabling the load-media-router-component from brave://flags and after relaunching, the browser crashes instantly. I can't even open up brave://flags again since it crashes. Any thoughts on how to disable it from some other place than the GUI? I'm on macOS btw

simonhong commented 3 years ago

EDIT - You can pass --no-experiments command line switch to disable all changes from flags like below. open /Applications/Brave\ Browser.app --args --no-experiments I recommends using this instead of below Local State file editing.

@raduliviu You can reset changes of flags by editing Local State file from user-dir. If you're using stable channel, it's /Users/USER_ACCOUNT_NAME/Library/ApplicationSupport/BraveSoftware/Brave-Browser/Local State In that file, you can see "load-media-router-component-extension@1". To make it have default value, you can delete the whole "load-media-router-component-extension@1" from that file. Before editing Local State, please back up that file and edit. Hope this helps.

I also tried to repro this crash by toggling this feature also, but couldn't on stable and nightly channel.