Coder Social home page Coder Social logo

Comments (8)

terrabythia avatar terrabythia commented on August 11, 2024 1

Of course, this was actually a problem with the MDSN Plugin. Glad you found a solution (all though I don't think the best solution is just assigning the address to the hostName, but I'll look into the issue on the MDNS plugin myself later. 👍

Closing this issue now.

from dart_chromecast.

terrabythia avatar terrabythia commented on August 11, 2024

Hi,

It seems like, for some reason, the GET request to http://192.168.2.2:8008/setup/eureka_info?params=name,device_info always throws an exception on iOS. Maybe because your app is not allowed to request non-https URLs?

You could try allowing insecure HTTP loads in your app, but this is not recommended. I think Apple may even not allow an app to be published in the App Store when it allows HTTP requests.

I did just update the code to only set the device name to 'Unknown' when we didn't already have a name for the device. This might fix your problem. Let me know.

from dart_chromecast.

DorsetDevStudio avatar DorsetDevStudio commented on August 11, 2024

thanks for taking a look, i just pulled the change as no difference. However I am curious, in my console i'm seeing this:
I/flutter (24722): found device Name: Chromecast-cde702228a5d2b47e14584f2048908f4, Type: ._googlecast._tcp, HostName: 192.168.1.22, Address: 192.168.1.22, Port: 8009
which says port 8009 ? while that may be a port chromecast uses it not 8008 which is where the GET request needs to go. is it possible your GET request is going to 8009 not 8008 somehow?

Looking at the code all seems legit

'http://${host}:8008/setup/eureka_info?params=name,device_info');

from dart_chromecast.

terrabythia avatar terrabythia commented on August 11, 2024

No, the eureka_info is on a different port than the actual ChromeCast itself, so that's how it's supposed to be.

Did you run this test on an iOS device? I'm pretty sure the problem is the eureka_info URL not being https.

I've just updated the code to use a https url. Could you try again? It might still not work because the https certificate isn't valid, but maybe iOS doesn't mind that.

from dart_chromecast.

DorsetDevStudio avatar DorsetDevStudio commented on August 11, 2024

Hi, I have found the root cause of the issue, it's not this plugin. The host name returned by ios is some random.local. address, if i ignore that and use the IP it works perfectly in IOS and Android so the fix should be in https://github.com/terrabythia/flutter_chromecast_example (see below)

image

from dart_chromecast.

DorsetDevStudio avatar DorsetDevStudio commented on August 11, 2024

I will test the https implementation now

from dart_chromecast.

DorsetDevStudio avatar DorsetDevStudio commented on August 11, 2024

hi, I have just retested on ios and android, your https update does not fix the original issue but is good (it works). I am only able to resolve the problem by adding this line to the code i'm using from https://github.com/terrabythia/flutter_chromecast_example to force the use of the ip address and not the hostname.

I realise patching that module does not help those using this module so perhaps you have a way to use ip address and not the hostnames from here.

Thanks

image

from dart_chromecast.

DorsetDevStudio avatar DorsetDevStudio commented on August 11, 2024

I'll push an update to my FarmTUBE app shortly which will contain the fix above as proof it works.

from dart_chromecast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.