v0.1.1
dlna_dart
純 Dart 編寫的簡單 DLNA 客戶端,在 Flutter 中運行良好,不到 500 行代碼即可完成所有任務。
29喜歡 1萬近 30 天下載130Pub 分數
AndroidiOSmacOSWindowsLinux
純 Dart 編寫的簡單 DLNA 客戶端 | Dart 編寫的 DLNA 投屏客戶端
^6.5.0以下為英文專案原文快照,最新內容請造訪 GitHub。
simple dlna client
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);
print(value.activeTime);
print('\r\n');
// 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 DLNAManager() many times , you must use start(reusePort:true)
}
python version
https://github.com/suconghou/dlna-python
app example
https://github.com/suconghou/u2flutter