Comments (6)
I see. But I maintain that's a little bit out of scope for this library : the goal here is only to discover the MDNS devices on your network.
To achieve what you want, I'm affraid that you may have to dive into the internal documentation of how Chromecasts work. I've did a little search for you : pychromecast
(a Python library that helps interacting with Chromecast devices) first looks at the port :
- If it's not 8009, then the cast type is set to
group
. - If it's 8009, then it looks to the model type (
md
attribute) and refers to this table to know whether the cast type iscast
,audio
orgroup
.
Now ; the cast type cast
supports both video and audio while the cast types audio
and group
only support audio.
Reference : https://github.com/home-assistant-libs/pychromecast/blob/master/pychromecast/discovery.py#L211.
from bonsoir.
Hi Skyost,
Thank you for your valuable response and for searching for the information I requested. I appreciate your effort and I will look into the reference you provided.
Thankyou.
from bonsoir.
Well, it's a little bit off-topic. You may have to deal with the service name or with its attributes, but I can't tell you more since I've never been interested in this question. Sorry.
from bonsoir.
Hi Skyost,
Thank you for your quick response. I apologize for not conveying the importance of this topic clearly.
We are currently using the library and it works well to detect the devices. However, we also need to know the device capabilities, which is not possible with the service name and properties received from the library. The device name can be different if a third party has integrated the Chromecast in their device.
It could be helpful to have some way similar to android native castDevices methods mentioned here.
https://developers.google.com/android/reference/com/google/android/gms/cast/CastDevice#public-boolean-hascapabilities-int%5B%5D-capabilities
Below are examples of a video device and an audio device:
Video Device
{
"service.name":"DIW7022-8c80d0745f97d83edd8825c4e7ea3153",
"service.type":"_googlecast._tcp",
"service.port":8009,
"service.attributes":{
"bs":"FA8F6C9F4A95",
"cd":"F57B7061D22CDF749CAFC29C0A5DBD8A",
"rs":"",
"st":"0",
"md":"DIW7022",
"fn":"Desk-A",
"nf":"1",
"ic":"/setup/icon.png",
"id":"8c80d0745f97d83edd8825c4e7ea3153",
"rm":"8EC0B0432CB99D7C",
"ca":"266757",
"ve":"05"
},
"service.ip":"192.168.*.*"
}
Audio Device
{
"service.name":"Google-Nest-Mini-f085fd9042490e01a04233c8bf333778",
"service.type":"_googlecast._tcp",
"service.port":8009,
"service.attributes":{
"bs":"FA8FCA78A8D0",
"cd":"5810A9FF37B193370398E3678764CF83",
"rs":"",
"st":"0",
"md":"Google Nest Mini",
"fn":"Office speaker",
"nf":"1",
"ic":"/setup/icon.png",
"id":"f085fd9042490e01a04233c8bf333778",
"rm":"",
"ca":"199172",
"ve":"05"
},
"service.ip":"192.168.*.**"
}
For security reason, I have changed the ip address in the above response.
It would be appreciated if you could give us a clue on how to differentiate the video and audio capabilities of the devices.
Thank you.
from bonsoir.
No problem 👍
from bonsoir.
@RaghuMudem hi! did you ever set this up working for chromecasts or other video-audio devices? If so, did you open source it or would you be open for that? I am looking for solutions in this line and Bonsoir looks a great option to me ...
(sorry for continuing the slight offtopic)
from bonsoir.
Related Issues (20)
- Crash when pushing the app into the background and pulling it back into the foreground HOT 6
- Discovery fails on iOS 17 HOT 2
- Example link in the documentation leads to a 404 HOT 2
- A way to start discovery and broadcast with timeout... HOT 1
- Exception when discovering an iOS service broadcasted by Android phone HOT 3
- On iOS, both broadcast and discovery stop immediately after restarting HOT 4
- Error: A value of type 'List<List<int>>' can't be returned from a function with return type 'List<Uint8List>' HOT 1
- Resolver cuts attribute keys to 9 characters HOT 1
- Getting the IP/address of BonsoirDiscoveryEvent HOT 3
- More pub points HOT 2
- Example page is not relevent HOT 1
- Crashes related to messages being sent from native to Flutter on non-platform thread HOT 4
- Customise hostname HOT 5
- IP Address Return HOT 3
- Crash when TXT record contains empty properties HOT 2
- java.net.SocketTimeoutException: Poll timed out leads to crash on android few seconds after discovering service HOT 6
- iOS cannot discover a host running on Windows HOT 7
- normalizeType error HOT 4
- Error Redeclaration: BonsoirService HOT 1
- Scan for all the mDNS devices in the network HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bonsoir.