chromecast_dlna_finder library

Classes

CachedDevice
ChromecastDlnaFinder
Main class for Chromecast and DLNA device discovery
DeviceDiscoveryEvent
裝置發現事件的基礎類別
DeviceFoundEvent
找到裝置的事件
DiscoveredDevice
DiscoveryService
Device discovery service
DlnaSoapUtil
DLNA/UPnP SOAP 輔助工具
PlatformInfo
SearchCompleteEvent
搜尋完成事件
SearchErrorEvent
搜尋錯誤事件
SearchStartedEvent
搜尋開始事件

Enums

DeviceType
裝置資料結構

Functions

fetchAvTransportControlUrl(String descriptionUrl) Future<String?>
解析 DLNA description.xml,取得 AVTransport controlURL
fetchControlUrls(String descriptionUrl) Future<List<String?>>
fetchRenderingControlUrl(String descriptionUrl) Future<String?>
解析 DLNA description.xml,取得 RenderingControl controlURL
pickBestName({required Map<String, String> txtMap, String? fallback, String? location, String? serviceName}) String
scanAirplayRxDevices({dynamic onDeviceFound(DiscoveredDevice)?, Duration scanDuration = const Duration(seconds: 5)}) Future<List<DiscoveredDevice>>
Scan for AirPlay RX (接收端, 如 Apple TV, 支援 AirPlay RX 的 Mac/iOS)
scanAirplayTxDevices({dynamic onDeviceFound(DiscoveredDevice)?, Duration scanDuration = const Duration(seconds: 5)}) Future<List<DiscoveredDevice>>
Scan for AirPlay TX (發射端, 如 iPhone/iPad/Mac)
scanAllDlnaDevices({Duration scanDuration = const Duration(seconds: 3), dynamic onDeviceFound(DiscoveredDevice)?}) Future<List<DiscoveredDevice>>
Scan for all DLNA devices (including Renderers and Media Servers) onDeviceFound 回調函數,當找到新裝置時調用
scanChromecastDevices({dynamic onDeviceFound(DiscoveredDevice)?, Duration scanDuration = const Duration(seconds: 5)}) Future<List<DiscoveredDevice>>
Scan for Chromecast devices in the local network onDeviceFound 回調函數,當找到新裝置時調用
scanDlnaMediaServerDevices({Duration scanDuration = const Duration(seconds: 3), dynamic onDeviceFound(DiscoveredDevice)?}) Future<List<DiscoveredDevice>>
Scan for DLNA Media Server devices in the local network (using SSDP/UPnP) onDeviceFound 回調函數,當找到新裝置時調用
scanDlnaRendererDevices({Duration sendQueryMessageInterval = const Duration(seconds: 3), Duration scanDuration = const Duration(seconds: 15), dynamic onDeviceFound(DiscoveredDevice)?}) Future<List<DiscoveredDevice>>
Scan for DLNA Renderer devices in the local network (using SSDP/UPnP) onDeviceFound 回調函數,當找到新裝置時調用
scanMdnsDevices({required String serviceType, required String mdnsType, required DiscoveredDevice deviceFactory({required String ip, List<String>? mdnsTypes, required int port, required String serviceName, required Map<String, String> txtMap}), dynamic onDeviceFound(DiscoveredDevice)?, String? logTag, Duration sendQueryMessageInterval = const Duration(seconds: 3), Duration scanDuration = const Duration(seconds: 15), bool useSystemMdns = false}) Future<List<DiscoveredDevice>>
共用 mDNS 掃描器

Exceptions / Errors

MdnsPortInUseException
Exception that may occur when scanning Chromecast devices in the local network