dlna_dart 0.0.8 copy "dlna_dart: ^0.0.8" to clipboard
dlna_dart: ^0.0.8 copied to clipboard

simple dlna client in pure dart,works fine in flutter,do all the job less than 500 lines

example/dlna_dart_example.dart

import 'dart:async';
import '../lib/dlna.dart';

main(List<String> args) async {
  final searcher = DLNAManager();
  final m = await searcher.start();
  m.devices.stream.listen((deviceList) {
    deviceList.forEach((key, value) async {
      print(key);
      if (value.info.friendlyName.contains('Wireless')) return;
      print(value.info.friendlyName);
      // final text = await value.position();
      // final r = await value.seekByCurrent(text, 10);
      // print(r);
    });
  });

  // close the server,the closed server can be start by call searcher.start()
  Timer(Duration(seconds: 30), () {
    searcher.stop();
    print('server closed');
  });

  // if you new search() many times , you must use start(reusePort:true)
}
26
likes
140
points
1.19k
downloads

Publisher

unverified uploader

Weekly Downloads

simple dlna client in pure dart,works fine in flutter,do all the job less than 500 lines

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

xml

More

Packages that depend on dlna_dart