Change for audioplayer version of kplayer
|
@ -0,0 +1 @@
|
||||||
|
{}
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
assets/test.webm
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 137 KiB |
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 512 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 780 B After Width: | Height: | Size: 786 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.4 KiB |
|
@ -4,12 +4,12 @@ import 'package:fipy/screens/home.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:kplayer/kplayer.dart';
|
import 'package:kplayer/kplayer.dart';
|
||||||
// import 'package:kplayer_with_audioplayers/kplayer_with_audioplayers.dart' as kp;
|
import 'package:kplayer_with_audioplayers/kplayer_with_audioplayers.dart' as kp;
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
Player.boot();
|
Player.boot();
|
||||||
// kp.Player.boot();
|
kp.Player.boot();
|
||||||
runApp(const FipyApp());
|
runApp(const FipyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// ignore_for_file: avoid_print
|
// ignore_for_file: avoid_print
|
||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:ffmpeg_cli/ffmpeg_cli.dart';
|
|
||||||
import 'package:fipy/globals.dart';
|
import 'package:fipy/globals.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:universal_io/io.dart';
|
import 'package:universal_io/io.dart';
|
||||||
|
@ -13,11 +12,14 @@ import 'package:youtube_explode_dart/youtube_explode_dart.dart';
|
||||||
import 'package:fipy/providers/player.dart';
|
import 'package:fipy/providers/player.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:http/http.dart';
|
import 'package:http/http.dart';
|
||||||
// import 'package:kplayer_with_audioplayers/kplayer_with_audioplayers.dart' as kp;
|
import 'package:audioplayers/audioplayers.dart';
|
||||||
|
import 'package:kplayer_with_audioplayers/kplayer_with_audioplayers.dart' as kp;
|
||||||
|
|
||||||
class HomeProvider with ChangeNotifier {
|
class HomeProvider with ChangeNotifier {
|
||||||
Track? currentTrack;
|
Track? currentTrack;
|
||||||
PlayerController? player;
|
PlayerController? player;
|
||||||
|
AudioPlayer audioPlayer = AudioPlayer();
|
||||||
|
|
||||||
List<Track> trackList = [];
|
List<Track> trackList = [];
|
||||||
int trackNbr = 0;
|
int trackNbr = 0;
|
||||||
int userPageNbr = 3;
|
int userPageNbr = 3;
|
||||||
|
@ -96,13 +98,19 @@ class HomeProvider with ChangeNotifier {
|
||||||
'invidious.snopyta.org',
|
'invidious.snopyta.org',
|
||||||
'invidious.fdn.fr',
|
'invidious.fdn.fr',
|
||||||
];
|
];
|
||||||
// final media = PlayerMedia(
|
|
||||||
// type: PlayerMediaType.network,
|
// audioPlayer.stop();
|
||||||
// resource:
|
// Future.delayed(const Duration(milliseconds: 5));
|
||||||
// "https://${invidiousUrl[0]}/latest_version?id=${track.id}&itag=140&local=true&listen=1");
|
// await audioPlayer.play(DeviceFileSource(
|
||||||
// player = kp.Player(media: media);
|
// "https://${invidiousUrl[1]}/latest_version?id=${track.id}&itag=140&local=true&listen=1"));
|
||||||
player = Player.network(
|
|
||||||
"https://${invidiousUrl[0]}/latest_version?id=${track.id}&itag=140&local=true&listen=1"); // https://${invidiousUrl[0]}/embed/${track.id}?listen=1&raw=1&local=true
|
final media = PlayerMedia(
|
||||||
|
type: PlayerMediaType.network,
|
||||||
|
resource:
|
||||||
|
"https://${invidiousUrl[1]}/latest_version?id=${track.id}&itag=140&local=true&listen=1");
|
||||||
|
player = kp.Player(media: media);
|
||||||
|
// player = Player.network(
|
||||||
|
// "https://${invidiousUrl[0]}/latest_version?id=${track.id}&itag=140&local=true&listen=1"); // https://${invidiousUrl[0]}/embed/${track.id}?listen=1&raw=1&local=true
|
||||||
player!.init();
|
player!.init();
|
||||||
print(player!.media.resource);
|
print(player!.media.resource);
|
||||||
|
|
||||||
|
@ -120,9 +128,13 @@ class HomeProvider with ChangeNotifier {
|
||||||
currentTrack!.duration = player!.duration;
|
currentTrack!.duration = player!.duration;
|
||||||
playerProvider.reload();
|
playerProvider.reload();
|
||||||
}
|
}
|
||||||
if (event.name == 'status' && player!.position == player!.duration) {
|
if (event.name == 'end' &&
|
||||||
|
currentTrack == track &&
|
||||||
|
(currentTrack!.duration!.inSeconds - player!.position.inSeconds <=
|
||||||
|
1)) {
|
||||||
var nextTrack = trackList
|
var nextTrack = trackList
|
||||||
.firstWhere((element) => element.number == track.number + 1);
|
.firstWhere((element) => element.number == track.number + 1);
|
||||||
|
currentTrack = nextTrack;
|
||||||
playTrack(context, nextTrack);
|
playTrack(context, nextTrack);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -208,27 +220,27 @@ class DownloadProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future convertToMp3(String audioFile) async {
|
// Future convertToMp3(String audioFile) async {
|
||||||
audioFile = 'E:\\Téléchargements/test.webm';
|
// audioFile = 'E:\\Téléchargements/test.webm';
|
||||||
final command = FfmpegCommand(
|
// final command = FfmpegCommand(
|
||||||
inputs: [FfmpegInput.asset(audioFile)],
|
// inputs: [FfmpegInput.asset(audioFile)],
|
||||||
args: [
|
// args: [
|
||||||
// CliArg(name: 'i', value: audioFile),
|
// // CliArg(name: 'i', value: audioFile),
|
||||||
const CliArg(name: 'ab', value: '320'),
|
// const CliArg(name: 'ab', value: '320'),
|
||||||
const CliArg(name: 'ar', value: '44100'),
|
// const CliArg(name: 'ar', value: '44100'),
|
||||||
],
|
// ],
|
||||||
filterGraph: const FilterGraph(
|
// filterGraph: const FilterGraph(
|
||||||
chains: [
|
// chains: [
|
||||||
FilterChain(
|
// FilterChain(
|
||||||
inputs: [],
|
// inputs: [],
|
||||||
filters: [],
|
// filters: [],
|
||||||
outputs: [],
|
// outputs: [],
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
outputFilepath: "E:\\Téléchargements/test.mp3",
|
// outputFilepath: "E:\\Téléchargements/test.mp3",
|
||||||
);
|
// );
|
||||||
|
|
||||||
// Execute command
|
// // Execute command
|
||||||
await Ffmpeg().run(command);
|
// await Ffmpeg().run(command);
|
||||||
}
|
// }
|
||||||
|
|
|
@ -5,6 +5,7 @@ import 'package:fipy/models/track.dart';
|
||||||
import 'package:fipy/providers/home.dart';
|
import 'package:fipy/providers/home.dart';
|
||||||
import 'package:fipy/providers/player.dart';
|
import 'package:fipy/providers/player.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:miniplayer/miniplayer.dart';
|
import 'package:miniplayer/miniplayer.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:youtube_explode_dart/youtube_explode_dart.dart';
|
import 'package:youtube_explode_dart/youtube_explode_dart.dart';
|
||||||
|
@ -24,7 +25,18 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
HomeProvider hp = Provider.of<HomeProvider>(context, listen: false);
|
HomeProvider hp = Provider.of<HomeProvider>(context, listen: false);
|
||||||
final MiniplayerController controller = MiniplayerController();
|
final MiniplayerController controller = MiniplayerController();
|
||||||
|
|
||||||
return Stack(
|
return RawKeyboardListener(
|
||||||
|
autofocus: true,
|
||||||
|
focusNode: FocusNode(),
|
||||||
|
onKey: (RawKeyEvent event) {
|
||||||
|
if (event.runtimeType == RawKeyDownEvent &&
|
||||||
|
event.data.logicalKey.keyId == 32) //Enter Key ID from keyboard
|
||||||
|
{
|
||||||
|
print('tata');
|
||||||
|
hp.player?.playing ?? false ? hp.player?.pause() : hp.player?.play();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Scaffold(
|
Scaffold(
|
||||||
body: RawScrollbar(
|
body: RawScrollbar(
|
||||||
|
@ -65,7 +77,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
iconSize: 22,
|
iconSize: 22,
|
||||||
onChanged: (String? newPageNumber) {
|
onChanged: (String? newPageNumber) {
|
||||||
setState(() {
|
setState(() {
|
||||||
hp.userPageNbr = int.parse(newPageNumber!);
|
hp.userPageNbr =
|
||||||
|
int.parse(newPageNumber!);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
items: hp.pageList),
|
items: hp.pageList),
|
||||||
|
@ -126,7 +139,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
defaultVerticalAlignment:
|
defaultVerticalAlignment:
|
||||||
TableCellVerticalAlignment.middle,
|
TableCellVerticalAlignment.middle,
|
||||||
children: snapshot.data!
|
children: snapshot.data!
|
||||||
.map((item) => _buildTableRow(item, context))
|
.map(
|
||||||
|
(item) => _buildTableRow(item, context))
|
||||||
.toList()
|
.toList()
|
||||||
..insert(
|
..insert(
|
||||||
0,
|
0,
|
||||||
|
@ -242,7 +256,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
hp.player?.playing ?? false
|
hp.player?.playing ?? false
|
||||||
? hp.player?.pause()
|
? hp.player?.pause()
|
||||||
: hp.player?.play();
|
: hp.player?.play();
|
||||||
playerProvider.reload();
|
// playerProvider.reload();
|
||||||
},
|
},
|
||||||
child: Icon(
|
child: Icon(
|
||||||
hp.player?.playing ?? false
|
hp.player?.playing ?? false
|
||||||
|
@ -280,9 +294,10 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
Row(children: [
|
Row(children: [
|
||||||
const SizedBox(width: 70),
|
const SizedBox(width: 70),
|
||||||
Text(
|
Text(
|
||||||
timeFormat(
|
timeFormat(hp.player?.position ??
|
||||||
hp.player?.position ?? const Duration(seconds: 0)),
|
const Duration(seconds: 0)),
|
||||||
style: TextStyle(color: Colors.grey[500], fontSize: 12),
|
style:
|
||||||
|
TextStyle(color: Colors.grey[500], fontSize: 12),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 3),
|
const SizedBox(width: 3),
|
||||||
SliderTheme(
|
SliderTheme(
|
||||||
|
@ -316,9 +331,10 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
),
|
),
|
||||||
const SizedBox(width: 3),
|
const SizedBox(width: 3),
|
||||||
Text(
|
Text(
|
||||||
timeFormat(
|
timeFormat(hp.player?.duration ??
|
||||||
hp.player?.duration ?? const Duration(seconds: 0)),
|
const Duration(seconds: 0)),
|
||||||
style: TextStyle(color: Colors.grey[500], fontSize: 12),
|
style:
|
||||||
|
TextStyle(color: Colors.grey[500], fontSize: 12),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
@ -326,7 +342,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
SliderTheme(
|
SliderTheme(
|
||||||
data: const SliderThemeData(
|
data: const SliderThemeData(
|
||||||
thumbShape: RoundSliderThumbShape(enabledThumbRadius: 7),
|
thumbShape:
|
||||||
|
RoundSliderThumbShape(enabledThumbRadius: 7),
|
||||||
overlayShape:
|
overlayShape:
|
||||||
RoundSliderThumbShape(enabledThumbRadius: 8),
|
RoundSliderThumbShape(enabledThumbRadius: 8),
|
||||||
trackHeight: 2.5,
|
trackHeight: 2.5,
|
||||||
|
@ -354,6 +371,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\dart_vlc_plugin.dll
|
||||||
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\flutter_windows.dll"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\flutter_windows.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\libvlc.dll"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\libvlc.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\libvlccore.dll"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\libvlccore.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\url_launcher_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\audioplayers_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\plugins\*"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "C:\Users\poka\dev\fipy\build\windows\runner\Release\plugins\*"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
139
pubspec.lock
|
@ -36,6 +36,48 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.10.0"
|
version: "0.10.0"
|
||||||
|
audioplayers:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: audioplayers
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0-rc.2"
|
||||||
|
audioplayers_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: audioplayers_android
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0-rc.2"
|
||||||
|
audioplayers_darwin:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: audioplayers_darwin
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0-rc.2"
|
||||||
|
audioplayers_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: audioplayers_platform_interface
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0-rc.2"
|
||||||
|
audioplayers_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: audioplayers_web
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0-rc.2"
|
||||||
|
audioplayers_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: audioplayers_windows
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0-rc.2"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -70,7 +112,7 @@ packages:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.16.0"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -112,7 +154,7 @@ packages:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.0"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -120,13 +162,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.2"
|
version: "1.1.2"
|
||||||
ffmpeg_cli:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: ffmpeg_cli
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.0"
|
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -204,7 +239,7 @@ packages:
|
||||||
name: js
|
name: js
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.3"
|
version: "0.6.4"
|
||||||
json_annotation:
|
json_annotation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -247,6 +282,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.12"
|
version: "0.0.12"
|
||||||
|
kplayer_with_audioplayers:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: kplayer_with_audioplayers
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.0.10"
|
||||||
kplayer_with_dart_vlc:
|
kplayer_with_dart_vlc:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -268,13 +310,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "1.0.1"
|
||||||
logging:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: logging
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.2"
|
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -288,7 +323,7 @@ packages:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.3"
|
version: "0.1.4"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -318,7 +353,7 @@ packages:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.1"
|
||||||
path_provider:
|
path_provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -421,7 +456,7 @@ packages:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.2"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -456,7 +491,7 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.8"
|
version: "0.4.9"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -471,62 +506,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.4"
|
version: "2.0.4"
|
||||||
url_launcher:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: url_launcher
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "6.1.0"
|
|
||||||
url_launcher_android:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: url_launcher_android
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "6.0.16"
|
|
||||||
url_launcher_ios:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: url_launcher_ios
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "6.0.15"
|
|
||||||
url_launcher_linux:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: url_launcher_linux
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.0"
|
|
||||||
url_launcher_macos:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: url_launcher_macos
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.0"
|
|
||||||
url_launcher_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: url_launcher_platform_interface
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.5"
|
|
||||||
url_launcher_web:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: url_launcher_web
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.9"
|
|
||||||
url_launcher_windows:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: url_launcher_windows
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.0"
|
|
||||||
uuid:
|
uuid:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -540,7 +519,7 @@ packages:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -577,5 +556,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.0"
|
version: "1.11.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.16.2 <3.0.0"
|
dart: ">=2.17.0-266.5.beta <3.0.0"
|
||||||
flutter: ">=2.10.0"
|
flutter: ">=2.8.1"
|
||||||
|
|
14
pubspec.yaml
|
@ -2,7 +2,7 @@ name: fipy
|
||||||
description: Advanced FIP radio track explorer
|
description: Advanced FIP radio track explorer
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
version: 0.0.1+1
|
version: 0.0.2+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.16.2 <3.0.0"
|
sdk: ">=2.16.2 <3.0.0"
|
||||||
|
@ -15,10 +15,9 @@ dependencies:
|
||||||
# git:
|
# git:
|
||||||
# url: https://git.p2p.legal/poka/youtube_explode.git
|
# url: https://git.p2p.legal/poka/youtube_explode.git
|
||||||
# ref: master
|
# ref: master
|
||||||
url_launcher: ^6.1.0
|
|
||||||
http: ^0.13.4
|
http: ^0.13.4
|
||||||
kplayer: ^0.1.18
|
kplayer: ^0.1.18
|
||||||
# kplayer_with_audioplayers: ^0.0.10
|
kplayer_with_audioplayers: ^0.0.10
|
||||||
miniplayer: #^1.0.1
|
miniplayer: #^1.0.1
|
||||||
git:
|
git:
|
||||||
url: https://git.p2p.legal/poka/flutter_miniplayer.git
|
url: https://git.p2p.legal/poka/flutter_miniplayer.git
|
||||||
|
@ -26,7 +25,8 @@ dependencies:
|
||||||
provider: ^6.0.1
|
provider: ^6.0.1
|
||||||
path_provider: ^2.0.9
|
path_provider: ^2.0.9
|
||||||
universal_io: ^2.0.4
|
universal_io: ^2.0.4
|
||||||
ffmpeg_cli: ^0.1.0
|
# ffmpeg_cli: ^0.1.0
|
||||||
|
# audioplayers: ^1.0.0-rc.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
@ -40,14 +40,14 @@ flutter_icons:
|
||||||
# macos: true
|
# macos: true
|
||||||
windows: true
|
windows: true
|
||||||
web: true
|
web: true
|
||||||
image_path: "assets/logo_aquamarine.jpg"
|
image_path: "assets/logo_green_dark.jpg"
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
|
||||||
# To add assets to your application, add an assets section, like this:
|
# To add assets to your application, add an assets section, like this:
|
||||||
assets:
|
# assets:
|
||||||
- assets/test.webm
|
# - assets/test.webm
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||||
|
|
BIN
web/favicon.png
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 50 KiB |
|
@ -1,13 +1,16 @@
|
||||||
|
# Project-level configuration.
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
project(fipy LANGUAGES CXX)
|
project(fipy LANGUAGES CXX)
|
||||||
|
|
||||||
|
# The name of the executable created for the application. Change this to change
|
||||||
|
# the on-disk name of your application.
|
||||||
set(BINARY_NAME "fipy")
|
set(BINARY_NAME "fipy")
|
||||||
|
|
||||||
|
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||||
|
# versions of CMake.
|
||||||
cmake_policy(SET CMP0063 NEW)
|
cmake_policy(SET CMP0063 NEW)
|
||||||
|
|
||||||
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
|
# Define build configuration option.
|
||||||
|
|
||||||
# Configure build options.
|
|
||||||
get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
if(IS_MULTICONFIG)
|
if(IS_MULTICONFIG)
|
||||||
set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
|
set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
|
||||||
|
@ -20,7 +23,7 @@ else()
|
||||||
"Debug" "Profile" "Release")
|
"Debug" "Profile" "Release")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
# Define settings for the Profile build mode.
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
|
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
|
set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
|
||||||
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
|
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
|
||||||
|
@ -30,6 +33,10 @@ set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||||
add_definitions(-DUNICODE -D_UNICODE)
|
add_definitions(-DUNICODE -D_UNICODE)
|
||||||
|
|
||||||
# Compilation settings that should be applied to most targets.
|
# Compilation settings that should be applied to most targets.
|
||||||
|
#
|
||||||
|
# Be cautious about adding new options here, as plugins use this function by
|
||||||
|
# default. In most cases, you should add new options to specific targets instead
|
||||||
|
# of modifying this function.
|
||||||
function(APPLY_STANDARD_SETTINGS TARGET)
|
function(APPLY_STANDARD_SETTINGS TARGET)
|
||||||
target_compile_features(${TARGET} PUBLIC cxx_std_17)
|
target_compile_features(${TARGET} PUBLIC cxx_std_17)
|
||||||
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
|
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
|
||||||
|
@ -38,12 +45,11 @@ function(APPLY_STANDARD_SETTINGS TARGET)
|
||||||
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")
|
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
|
||||||
|
|
||||||
# Flutter library and tool build rules.
|
# Flutter library and tool build rules.
|
||||||
|
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
||||||
add_subdirectory(${FLUTTER_MANAGED_DIR})
|
add_subdirectory(${FLUTTER_MANAGED_DIR})
|
||||||
|
|
||||||
# Application build
|
# Application build; see runner/CMakeLists.txt.
|
||||||
add_subdirectory("runner")
|
add_subdirectory("runner")
|
||||||
|
|
||||||
# Generated plugin build rules, which manage building the plugins and adding
|
# Generated plugin build rules, which manage building the plugins and adding
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# This file controls Flutter-level build steps. It should not be edited.
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
|
||||||
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
|
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
|
#include <audioplayers_windows/audioplayers_windows_plugin.h>
|
||||||
#include <dart_vlc/dart_vlc_plugin.h>
|
#include <dart_vlc/dart_vlc_plugin.h>
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
|
AudioplayersWindowsPluginRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin"));
|
||||||
DartVlcPluginRegisterWithRegistrar(
|
DartVlcPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("DartVlcPlugin"));
|
registry->GetRegistrarForPlugin("DartVlcPlugin"));
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
|
audioplayers_windows
|
||||||
dart_vlc
|
dart_vlc
|
||||||
url_launcher_windows
|
)
|
||||||
|
|
||||||
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||||
|
@ -15,3 +18,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
|
||||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
|
||||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
|
||||||
endforeach(plugin)
|
endforeach(plugin)
|
||||||
|
|
||||||
|
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
|
||||||
|
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
|
||||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
|
||||||
|
endforeach(ffi_plugin)
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
project(runner LANGUAGES CXX)
|
project(runner LANGUAGES CXX)
|
||||||
|
|
||||||
|
# Define the application target. To change its name, change BINARY_NAME in the
|
||||||
|
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
|
||||||
|
# work.
|
||||||
|
#
|
||||||
|
# Any new source files that you add to the application should be added here.
|
||||||
add_executable(${BINARY_NAME} WIN32
|
add_executable(${BINARY_NAME} WIN32
|
||||||
"flutter_window.cpp"
|
"flutter_window.cpp"
|
||||||
"main.cpp"
|
"main.cpp"
|
||||||
|
@ -10,8 +15,18 @@ add_executable(${BINARY_NAME} WIN32
|
||||||
"Runner.rc"
|
"Runner.rc"
|
||||||
"runner.exe.manifest"
|
"runner.exe.manifest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Apply the standard set of build settings. This can be removed for applications
|
||||||
|
# that need different build settings.
|
||||||
apply_standard_settings(${BINARY_NAME})
|
apply_standard_settings(${BINARY_NAME})
|
||||||
|
|
||||||
|
# Disable Windows macros that collide with C++ standard library functions.
|
||||||
target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
|
target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
|
||||||
|
|
||||||
|
# Add dependency libraries and include directories. Add any application-specific
|
||||||
|
# dependencies here.
|
||||||
target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
|
target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
|
||||||
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
|
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
|
||||||
|
|
||||||
|
# Run the Flutter tool portions of the build. This must not be removed.
|
||||||
add_dependencies(${BINARY_NAME} flutter_assemble)
|
add_dependencies(${BINARY_NAME} flutter_assemble)
|
||||||
|
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
@ -48,10 +48,10 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) {
|
||||||
int target_length = ::WideCharToMultiByte(
|
int target_length = ::WideCharToMultiByte(
|
||||||
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
|
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
|
||||||
-1, nullptr, 0, nullptr, nullptr);
|
-1, nullptr, 0, nullptr, nullptr);
|
||||||
if (target_length == 0) {
|
|
||||||
return std::string();
|
|
||||||
}
|
|
||||||
std::string utf8_string;
|
std::string utf8_string;
|
||||||
|
if (target_length == 0 || target_length > utf8_string.max_size()) {
|
||||||
|
return utf8_string;
|
||||||
|
}
|
||||||
utf8_string.resize(target_length);
|
utf8_string.resize(target_length);
|
||||||
int converted_length = ::WideCharToMultiByte(
|
int converted_length = ::WideCharToMultiByte(
|
||||||
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
|
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
|
||||||
|
|