audioplayer rc4
This commit is contained in:
parent
ebb8806c2b
commit
6ca3367808
|
@ -99,7 +99,7 @@ class HomeProvider with ChangeNotifier {
|
||||||
try {
|
try {
|
||||||
final source = UrlSource(
|
final source = UrlSource(
|
||||||
"https://${invidiousUrl[1]}/latest_version?id=${track.id}&itag=140&local=true&listen=1");
|
"https://${invidiousUrl[1]}/latest_version?id=${track.id}&itag=140&local=true&listen=1");
|
||||||
print('playyy');
|
print(source.url);
|
||||||
await player.play(source);
|
await player.play(source);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Play error: ' + e.toString());
|
print('Play error: ' + e.toString());
|
||||||
|
|
|
@ -416,6 +416,15 @@ TableRow _buildTableRow(Track track, BuildContext context) {
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (track.number != -1) {
|
if (track.number != -1) {
|
||||||
|
// FutureBuilder<void>(
|
||||||
|
// future: hp.playTrack(context, track),
|
||||||
|
// builder: (
|
||||||
|
// BuildContext context,
|
||||||
|
// AsyncSnapshot<void> snapshot,
|
||||||
|
// ) {
|
||||||
|
// return const SizedBox();
|
||||||
|
// },
|
||||||
|
// );
|
||||||
hp.playTrack(context, track);
|
hp.playTrack(context, track);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,14 +6,10 @@
|
||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <dart_vlc/dart_vlc_plugin.h>
|
#include <audioplayers_linux/audioplayers_linux_plugin.h>
|
||||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
|
||||||
|
|
||||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
g_autoptr(FlPluginRegistrar) dart_vlc_registrar =
|
g_autoptr(FlPluginRegistrar) audioplayers_linux_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "DartVlcPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "AudioplayersLinuxPlugin");
|
||||||
dart_vlc_plugin_register_with_registrar(dart_vlc_registrar);
|
audioplayers_linux_plugin_register_with_registrar(audioplayers_linux_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
|
||||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dart_vlc
|
audioplayers_linux
|
||||||
url_launcher_linux
|
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
|
15
pubspec.lock
15
pubspec.lock
|
@ -28,7 +28,7 @@ packages:
|
||||||
name: audioplayers
|
name: audioplayers
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0-rc.2"
|
version: "1.0.0-rc.4"
|
||||||
audioplayers_android:
|
audioplayers_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -42,7 +42,14 @@ packages:
|
||||||
name: audioplayers_darwin
|
name: audioplayers_darwin
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0-rc.2"
|
version: "1.0.0-rc.4"
|
||||||
|
audioplayers_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: audioplayers_linux
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0-rc.3"
|
||||||
audioplayers_platform_interface:
|
audioplayers_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -56,14 +63,14 @@ packages:
|
||||||
name: audioplayers_web
|
name: audioplayers_web
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0-rc.2"
|
version: "1.0.0-rc.3"
|
||||||
audioplayers_windows:
|
audioplayers_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: audioplayers_windows
|
name: audioplayers_windows
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0-rc.2"
|
version: "1.0.0-rc.3"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -26,7 +26,7 @@ dependencies:
|
||||||
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
|
audioplayers: ^1.0.0-rc.4
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
Loading…
Reference in New Issue