upnp_client 1.4.1 copy "upnp_client: ^1.4.1" to clipboard
upnp_client: ^1.4.1 copied to clipboard

Universal Plug and Play (UPnP) Client Implementation. Supports IGD control as well as DLNA media casting.

UPnP Client #

License Supported Dart SDK Package Version Package download statistics Development Status

Universal Plug and Play (UPnP) Client Implementation. Supports IGD control as well as DLNA media casting.

Covered

  • Discovery — SSDP search over IPv4 and IPv6, returning typed device profiles
  • DLNA castingAVTransport playback, RenderingControl volume and mute, ConnectionManager format negotiation, and DIDL-Lite metadata
  • IGD port forwarding — NAT port mapping on WANIPConnection / WANPPPConnection, plus external IP and WAN connection status

Not covered — eventing (GENA SUBSCRIBE/NOTIFY), ContentDirectory browsing, and IPv6 pinholes. Services without a typed wrapper are still reachable through Service.invokeAction.

Installation #

Use the package manager pub to install the upnp client.

dart pub add upnp_client

Usage #

See example/example.md for discovery, port forwarding and media casting, or run one of the examples against your own network:

dart run example/upnp_client_example.dart                 # discover everything
dart run example/port_forward_example.dart 8080           # map a port on the router
dart run example/media_cast_example.dart <http url>       # cast audio to a renderer

To use on an Android device #

You must add the following permissions in your AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.NEARBY_WIFI_DEVICES" android.usesPermissionFlags="neverForLocation"/>

To use on an iOS device (Required for iOS 14+) #

You need to follow these steps to use Multicast Networking functionalities on any iOS device:

  1. Go to https://developer.apple.com/contact/request/networking-multicast and fill out the form for your app.
  2. Wait for the acceptance email (Approx. 30 days).
  3. Go to https://developer.apple.com/account/resources/identifiers/list.
  4. Choose the needed app.
  5. Go to "Additional Capabilities".
  6. Mark "Multicast Networking".
  7. Go to your project file "Runner.xcworkspace".
  8. Choose "Runner" -> "Signing & Capabilities" -> "+ capability" and search for "Multicast Networking".
  9. Build your project.

Contributing #

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License #

MIT

6
likes
160
points
1.66k
downloads

Documentation

API reference

Publisher

verified publisherhillpro.dev

Weekly Downloads

Universal Plug and Play (UPnP) Client Implementation. Supports IGD control as well as DLNA media casting.

Repository (GitHub)
View/report issues

Topics

#upnp #dlna #ssdp #igd #networking

License

MIT (license)

Dependencies

collection, xml

More

Packages that depend on upnp_client