GithubHelp home page GithubHelp logo

suconghou / dlna-dart Goto Github PK

View Code? Open in Web Editor NEW
40.0 3.0 8.0 31 KB

simple dlna client in pure dart | Dart 编写的DLNA投屏客户端

Home Page: https://pub.dev/packages/dlna_dart

License: BSD 3-Clause "New" or "Revised" License

Dart 100.00%
dart flutter dlna upnp udp dlna-mediarenderer

dlna-dart's Introduction

dlna_dart

simple dlna client

Getting Started

import 'dart:async';
import 'package:dlna_dart/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)
}

python version

https://github.com/suconghou/dlna-python

app example

https://github.com/suconghou/u2flutter

dlna-dart's People

Contributors

suconghou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dlna-dart's Issues

升级flutter3.x

问下,是否有升级flutter3.x的计划,让其支持flutter3.x中使用

Encountering an exception when attempting to play/pause media via DLNA.

Please investigate the play/pause exception that occurs when hitting the cast screen button and selecting media mode. The exception has a status code of 500.

Exception: request http://192.168.1.7:2869/upnphost/udhisapi.dll?control=uuid:71fbf567-c9ce-4f84-a025-1c9e88e260c4+urn:upnp-org:serviceId:AVTransport error , status 500
I/flutter ( 2316): <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">SOAP-ENV:BodySOAP-ENV:FaultSOAP-ENV:ClientUPnPError<u:UPnPError xmlns:u="urn:schemas-upnp-org:control-1-0"><u:errorCode>501</u:errorCode><u:errorDescription>Action Failed</u:errorDescription></u:UPnPError></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

Getting started...

Hi,

I'm trying to play audio files from a MiniDLNA server locally on an Android phone.

So far, I can search for DLNA server in my network and I get the MiniDLNA device. But when I try to access this device I get always the error "Bad state: No element".

I tried to figure out what your u2flutter is doing, but it's really hard for a non chinese speaking person like me. I did see here in another issue that someone else was mentioning this error too. But since that conversation is also in chinese, it didn't helped me.

Maybe you can give me some advise how to grab artists, albums and songs from the DLNA server using your library.

Thanks

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.