diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index f25d7af..997acf3 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -22,7 +22,8 @@
android:label="Solian"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
- android:supportsRtl="true">
+ android:supportsRtl="true"
+ android:usesCleartextTraffic="true">
2.7.4)
- image_picker_ios (0.0.1):
- Flutter
+ - just_audio (0.0.1):
+ - Flutter
- livekit_client (2.2.4):
- Flutter
- WebRTC-SDK (= 125.6422.04)
- - media_kit_libs_ios_video (1.0.4):
- - Flutter
- - media_kit_native_event_loop (1.0.0):
- - Flutter
- - media_kit_video (0.0.1):
- - Flutter
- nanopb (3.30910.0):
- nanopb/decode (= 3.30910.0)
- nanopb/encode (= 3.30910.0)
@@ -251,8 +249,6 @@ PODS:
- PromisesObjC (= 2.4.0)
- protocol_handler_ios (0.0.1):
- Flutter
- - screen_brightness_ios (0.1.0):
- - Flutter
- SDWebImage (5.19.7):
- SDWebImage/Core (= 5.19.7)
- SDWebImage/Core (5.19.7)
@@ -268,13 +264,15 @@ PODS:
- TOCropViewController (2.7.4)
- url_launcher_ios (0.0.1):
- Flutter
- - volume_controller (0.0.1):
+ - video_player_avfoundation (0.0.1):
- Flutter
+ - FlutterMacOS
- wakelock_plus (0.0.1):
- Flutter
- WebRTC-SDK (125.6422.04)
DEPENDENCIES:
+ - audio_session (from `.symlinks/plugins/audio_session/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
@@ -291,22 +289,19 @@ DEPENDENCIES:
- gal (from `.symlinks/plugins/gal/darwin`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
+ - just_audio (from `.symlinks/plugins/just_audio/ios`)
- livekit_client (from `.symlinks/plugins/livekit_client/ios`)
- - media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
- - media_kit_native_event_loop (from `.symlinks/plugins/media_kit_native_event_loop/ios`)
- - media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- pointer_interceptor_ios (from `.symlinks/plugins/pointer_interceptor_ios/ios`)
- protocol_handler_ios (from `.symlinks/plugins/protocol_handler_ios/ios`)
- - screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- - volume_controller (from `.symlinks/plugins/volume_controller/ios`)
+ - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
SPEC REPOS:
@@ -339,6 +334,8 @@ SPEC REPOS:
- WebRTC-SDK
EXTERNAL SOURCES:
+ audio_session:
+ :path: ".symlinks/plugins/audio_session/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/darwin"
device_info_plus:
@@ -371,14 +368,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
+ just_audio:
+ :path: ".symlinks/plugins/just_audio/ios"
livekit_client:
:path: ".symlinks/plugins/livekit_client/ios"
- media_kit_libs_ios_video:
- :path: ".symlinks/plugins/media_kit_libs_ios_video/ios"
- media_kit_native_event_loop:
- :path: ".symlinks/plugins/media_kit_native_event_loop/ios"
- media_kit_video:
- :path: ".symlinks/plugins/media_kit_video/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
pasteboard:
@@ -391,8 +384,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/pointer_interceptor_ios/ios"
protocol_handler_ios:
:path: ".symlinks/plugins/protocol_handler_ios/ios"
- screen_brightness_ios:
- :path: ".symlinks/plugins/screen_brightness_ios/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
@@ -401,12 +392,13 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/sqflite/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
- volume_controller:
- :path: ".symlinks/plugins/volume_controller/ios"
+ video_player_avfoundation:
+ :path: ".symlinks/plugins/video_player_avfoundation/darwin"
wakelock_plus:
:path: ".symlinks/plugins/wakelock_plus/ios"
SPEC CHECKSUMS:
+ audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
@@ -442,10 +434,8 @@ SPEC CHECKSUMS:
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
image_cropper: 37d40f62177c101ff4c164906d259ea2c3aa70cf
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
+ just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
livekit_client: d079c5f040d4bf2b80440ff0ae997725a183e4bc
- media_kit_libs_ios_video: a5fe24bc7875ccd6378a0978c13185e1344651c1
- media_kit_native_event_loop: e6b2ab20cf0746eb1c33be961fcf79667304fa2a
- media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0
@@ -455,7 +445,6 @@ SPEC CHECKSUMS:
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
protocol_handler_ios: a5db8abc38526ee326988b808be621e5fd568990
- screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
SDWebImage: 8a6b7b160b4d710e2a22b6900e25301075c34cb3
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
@@ -463,7 +452,7 @@ SPEC CHECKSUMS:
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
- volume_controller: 531ddf792994285c9b17f9d8a7e4dcdd29b3eae9
+ video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
WebRTC-SDK: c3d69a87e7185fad3568f6f3cff7c9ac5890acf3
diff --git a/lib/main.dart b/lib/main.dart
index 5a5e079..921a18e 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -6,7 +6,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_acrylic/flutter_acrylic.dart';
import 'package:get/get.dart';
import 'package:go_router/go_router.dart';
-import 'package:media_kit/media_kit.dart';
import 'package:protocol_handler/protocol_handler.dart';
import 'package:provider/provider.dart';
import 'package:solian/bootstrapper.dart';
@@ -35,7 +34,6 @@ import 'package:flutter_web_plugins/url_strategy.dart' show usePathUrlStrategy;
void main() async {
WidgetsFlutterBinding.ensureInitialized();
- MediaKit.ensureInitialized();
await Future.wait([
_initializeFirebase(),
diff --git a/lib/providers/durations.dart b/lib/providers/durations.dart
new file mode 100644
index 0000000..08c2b25
--- /dev/null
+++ b/lib/providers/durations.dart
@@ -0,0 +1,26 @@
+extension DurationToHumanReadableString on Duration {
+ String toHumanReadableString({padZero = true}) {
+ final mm = inMinutes
+ .remainder(60)
+ .toString()
+ .padLeft(2, !padZero && inHours == 0 ? '' : '0');
+ final ss = inSeconds.remainder(60).toString().padLeft(2, '0');
+
+ if (inHours > 0) {
+ final hh = inHours.toString().padLeft(2, !padZero ? '' : '0');
+ return '$hh:$mm:$ss';
+ }
+
+ return '$mm:$ss';
+ }
+}
+
+extension ParseDuration on Duration {
+ static Duration fromString(String duration) {
+ final parts = duration.split(':').reversed.toList();
+ final seconds = int.parse(parts[0]);
+ final minutes = parts.length > 1 ? int.parse(parts[1]) : 0;
+ final hours = parts.length > 2 ? int.parse(parts[2]) : 0;
+ return Duration(hours: hours, minutes: minutes, seconds: seconds);
+ }
+}
diff --git a/lib/widgets/attachments/attachment_item.dart b/lib/widgets/attachments/attachment_item.dart
index 74d4e7b..dba9392 100644
--- a/lib/widgets/attachments/attachment_item.dart
+++ b/lib/widgets/attachments/attachment_item.dart
@@ -1,15 +1,20 @@
+import 'dart:math';
+
import 'package:cached_network_image/cached_network_image.dart';
+import 'package:chewie/chewie.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:gap/gap.dart';
import 'package:get/get.dart';
-import 'package:media_kit/media_kit.dart';
-import 'package:media_kit_video/media_kit_video.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:just_audio/just_audio.dart';
import 'package:solian/models/attachment.dart';
import 'package:solian/platform.dart';
+import 'package:solian/providers/durations.dart';
import 'package:solian/services.dart';
import 'package:solian/widgets/sized_container.dart';
import 'package:url_launcher/url_launcher_string.dart';
+import 'package:video_player/video_player.dart';
class AttachmentItem extends StatefulWidget {
final String parentId;
@@ -56,6 +61,11 @@ class _AttachmentItemState extends State {
item: widget.item,
autoload: widget.autoload,
);
+ case 'audio':
+ return _AttachmentItemAudio(
+ item: widget.item,
+ autoload: widget.autoload,
+ );
default:
return Center(
child: Container(
@@ -240,22 +250,21 @@ class _AttachmentItemVideo extends StatefulWidget {
}
class _AttachmentItemVideoState extends State<_AttachmentItemVideo> {
- late final _player = Player(
- configuration: const PlayerConfiguration(
- logLevel: MPVLogLevel.error,
- ),
- );
-
- late final _controller = VideoController(_player);
-
bool _showContent = false;
+ VideoPlayerController? _videoController;
+ ChewieController? _chewieController;
+
Future _startLoad() async {
- await _player.open(
- Media(ServiceFinder.buildUrl('files', '/attachments/${widget.item.rid}')),
- play: false,
- );
setState(() => _showContent = true);
+ final url =
+ ServiceFinder.buildUrl('files', '/attachments/${widget.item.rid}');
+ _videoController = VideoPlayerController.networkUrl(Uri.parse(url));
+ await _videoController!.initialize();
+ _chewieController = ChewieController(
+ videoPlayerController: _videoController!,
+ aspectRatio: widget.item.metadata?['ratio'],
+ );
}
@override
@@ -305,17 +314,237 @@ class _AttachmentItemVideoState extends State<_AttachmentItemVideo> {
_startLoad();
},
);
+ } else if (_chewieController == null) {
+ return const Center(
+ child: CircularProgressIndicator(),
+ );
}
- return Video(
+ return Chewie(controller: _chewieController!);
+ }
+
+ @override
+ void dispose() {
+ _chewieController?.dispose();
+ _videoController?.dispose();
+ super.dispose();
+ }
+}
+
+class _AttachmentItemAudio extends StatefulWidget {
+ final Attachment item;
+ final bool autoload;
+
+ const _AttachmentItemAudio({
+ required this.item,
+ this.autoload = false,
+ });
+
+ @override
+ State<_AttachmentItemAudio> createState() => _AttachmentItemAudioState();
+}
+
+class _AttachmentItemAudioState extends State<_AttachmentItemAudio> {
+ bool _showContent = false;
+
+ double? _draggingValue;
+
+ AudioPlayer? _audioController;
+
+ Future _startLoad() async {
+ setState(() => _showContent = true);
+ final url =
+ ServiceFinder.buildUrl('files', '/attachments/${widget.item.rid}');
+ _audioController = AudioPlayer();
+ // Platform that can cache image also capable to cache audio
+ // https://pub.dev/packages/just_audio#experimental-features
+ if (PlatformInfo.canCacheImage) {
+ final source = LockCachingAudioSource(Uri.parse(url));
+ await _audioController!.setAudioSource(source);
+ } else {
+ await _audioController!.setUrl(url);
+ }
+ _audioController!.playingStream.listen((_) => setState(() {}));
+ _audioController!.positionStream.listen((_) => setState(() {}));
+ _audioController!.durationStream.listen((_) => setState(() {}));
+ _audioController!.bufferedPositionStream.listen((_) => setState(() {}));
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ if (widget.autoload) {
+ _startLoad();
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ const ratio = 16 / 9;
+ if (!_showContent) {
+ return GestureDetector(
+ child: AspectRatio(
+ aspectRatio: ratio,
+ child: CenteredContainer(
+ maxWidth: 280,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ const Icon(
+ Icons.not_started,
+ color: Colors.white,
+ size: 32,
+ ),
+ const Gap(8),
+ Text(
+ 'attachmentUnload'.tr,
+ style: const TextStyle(
+ color: Colors.white,
+ fontWeight: FontWeight.bold,
+ fontSize: 16,
+ ),
+ ),
+ Text(
+ 'attachmentUnloadCaption'.tr,
+ style: const TextStyle(color: Colors.white),
+ textAlign: TextAlign.center,
+ ),
+ ],
+ ),
+ ),
+ ),
+ onTap: () {
+ _startLoad();
+ },
+ );
+ } else if (_audioController == null) {
+ return const Center(
+ child: CircularProgressIndicator(),
+ );
+ }
+
+ return AspectRatio(
aspectRatio: ratio,
- controller: _controller,
+ child: CenteredContainer(
+ maxWidth: 320,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ const Icon(Icons.audio_file, size: 32),
+ const Gap(8),
+ Text(
+ widget.item.alt,
+ style: const TextStyle(fontSize: 13),
+ textAlign: TextAlign.center,
+ ),
+ const Gap(12),
+ Row(
+ children: [
+ Expanded(
+ child: Column(
+ children: [
+ SliderTheme(
+ data: SliderThemeData(
+ trackHeight: 2,
+ trackShape: _PlayerProgressTrackShape(),
+ thumbShape: const RoundSliderThumbShape(
+ enabledThumbRadius: 8,
+ ),
+ overlayShape: SliderComponentShape.noOverlay,
+ ),
+ child: Slider(
+ secondaryTrackValue: _audioController!
+ .bufferedPosition.inMilliseconds
+ .abs()
+ .toDouble(),
+ value: _draggingValue?.abs() ??
+ _audioController!.position.inMilliseconds
+ .toDouble()
+ .abs(),
+ min: 0,
+ max: max(
+ _audioController!.bufferedPosition.inMilliseconds
+ .abs(),
+ max(
+ _audioController!.position.inMilliseconds.abs(),
+ _audioController!.duration?.inMilliseconds
+ .abs() ??
+ 1,
+ ),
+ ).toDouble(),
+ onChanged: (value) {
+ setState(() => _draggingValue = value);
+ },
+ onChangeEnd: (value) {
+ _audioController!
+ .seek(Duration(milliseconds: value.toInt()));
+ setState(() => _draggingValue = null);
+ },
+ ),
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(
+ _audioController!.position.toHumanReadableString(),
+ style: GoogleFonts.robotoMono(fontSize: 12),
+ ),
+ Text(
+ _audioController!.duration
+ ?.toHumanReadableString() ??
+ '00:00',
+ style: GoogleFonts.robotoMono(fontSize: 12),
+ ),
+ ],
+ ).paddingSymmetric(horizontal: 8, vertical: 4),
+ ],
+ ),
+ ),
+ const Gap(16),
+ IconButton.filled(
+ icon: _audioController!.playing
+ ? const Icon(Icons.pause)
+ : const Icon(Icons.play_arrow),
+ onPressed: () {
+ if (_audioController!.playing) {
+ _audioController!.pause();
+ } else {
+ _audioController!.play();
+ }
+ },
+ visualDensity: const VisualDensity(
+ horizontal: -4,
+ vertical: 0,
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
);
}
@override
void dispose() {
- _player.dispose();
+ _audioController?.dispose();
super.dispose();
}
}
+
+class _PlayerProgressTrackShape extends RoundedRectSliderTrackShape {
+ @override
+ Rect getPreferredRect({
+ required RenderBox parentBox,
+ Offset offset = Offset.zero,
+ required SliderThemeData sliderTheme,
+ bool isEnabled = false,
+ bool isDiscrete = false,
+ }) {
+ final trackHeight = sliderTheme.trackHeight;
+ final trackLeft = offset.dx;
+ final trackTop = offset.dy + (parentBox.size.height - trackHeight!) / 2;
+ final trackWidth = parentBox.size.width;
+ return Rect.fromLTWH(trackLeft, trackTop, trackWidth, trackHeight);
+ }
+}
diff --git a/lib/widgets/attachments/attachment_list.dart b/lib/widgets/attachments/attachment_list.dart
index 5e5739c..d3aece9 100644
--- a/lib/widgets/attachments/attachment_list.dart
+++ b/lib/widgets/attachments/attachment_list.dart
@@ -94,6 +94,8 @@ class _AttachmentListState extends State {
} else {
portrait++;
}
+ } else if (entry.mimetype.split('/').firstOrNull == 'audio') {
+ landscape++;
}
}
if (isConsistent && consistentValue != null) {
diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc
index 63960ac..77535f1 100644
--- a/linux/flutter/generated_plugin_registrant.cc
+++ b/linux/flutter/generated_plugin_registrant.cc
@@ -11,8 +11,6 @@
#include
#include
#include
-#include
-#include
#include
#include
@@ -32,12 +30,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) flutter_webrtc_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWebRTCPlugin");
flutter_web_r_t_c_plugin_register_with_registrar(flutter_webrtc_registrar);
- g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar =
- fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin");
- media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar);
- g_autoptr(FlPluginRegistrar) media_kit_video_registrar =
- fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitVideoPlugin");
- media_kit_video_plugin_register_with_registrar(media_kit_video_registrar);
g_autoptr(FlPluginRegistrar) pasteboard_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "PasteboardPlugin");
pasteboard_plugin_register_with_registrar(pasteboard_registrar);
diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake
index 5705c88..9073a89 100644
--- a/linux/flutter/generated_plugins.cmake
+++ b/linux/flutter/generated_plugins.cmake
@@ -8,14 +8,11 @@ list(APPEND FLUTTER_PLUGIN_LIST
flutter_acrylic
flutter_secure_storage_linux
flutter_webrtc
- media_kit_libs_linux
- media_kit_video
pasteboard
url_launcher_linux
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
- media_kit_native_event_loop
)
set(PLUGIN_BUNDLED_LIBRARIES)
diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift
index 34686c2..dab897c 100644
--- a/macos/Flutter/GeneratedPluginRegistrant.swift
+++ b/macos/Flutter/GeneratedPluginRegistrant.swift
@@ -5,6 +5,7 @@
import FlutterMacOS
import Foundation
+import audio_session
import connectivity_plus
import desktop_drop
import device_info_plus
@@ -16,22 +17,22 @@ import firebase_messaging
import flutter_secure_storage_macos
import flutter_webrtc
import gal
+import just_audio
import livekit_client
import macos_window_utils
-import media_kit_libs_macos_video
-import media_kit_video
import package_info_plus
import pasteboard
import path_provider_foundation
import protocol_handler_macos
-import screen_brightness_macos
import share_plus
import shared_preferences_foundation
import sqflite
import url_launcher_macos
+import video_player_avfoundation
import wakelock_plus
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
+ AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
@@ -43,18 +44,17 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
+ JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
LiveKitPlugin.register(with: registry.registrar(forPlugin: "LiveKitPlugin"))
MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin"))
- MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
- MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ProtocolHandlerMacosPlugin.register(with: registry.registrar(forPlugin: "ProtocolHandlerMacosPlugin"))
- ScreenBrightnessMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenBrightnessMacosPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
+ FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
}
diff --git a/pubspec.lock b/pubspec.lock
index 77434da..7e9727e 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -70,6 +70,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.11.0"
+ audio_session:
+ dependency: transitive
+ description:
+ name: audio_session
+ sha256: "343e83bc7809fbda2591a49e525d6b63213ade10c76f15813be9aed6657b3261"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.21"
avatar_stack:
dependency: "direct main"
description:
@@ -214,6 +222,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.3"
+ chewie:
+ dependency: "direct main"
+ description:
+ name: chewie
+ sha256: "8210c6e8702ddae9b3337aad0d539a9ff128cc4a5baaadc0174edbd0f99b0125"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.8.4"
cli_util:
dependency: transitive
description:
@@ -398,6 +414,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.5"
+ eventify:
+ dependency: transitive
+ description:
+ name: eventify
+ sha256: b829429f08586cc2001c628e7499e3e3c2493a1d895fd73b00ecb23351aa5a66
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
fake_async:
dependency: transitive
description:
@@ -1133,6 +1157,46 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.8.0"
+ just_audio:
+ dependency: "direct main"
+ description:
+ name: just_audio
+ sha256: d8e8aaf417d33e345299c17f6457f72bd4ba0c549dc34607abb5183a354edc4d
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.40"
+ just_audio_mpv:
+ dependency: "direct main"
+ description:
+ name: just_audio_mpv
+ sha256: d6e4e9fd20bfb9d2fd5e3dcd7906c90ed07f83d1d2f44f31204160821ab62fed
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.7"
+ just_audio_platform_interface:
+ dependency: transitive
+ description:
+ name: just_audio_platform_interface
+ sha256: "0243828cce503c8366cc2090cefb2b3c871aa8ed2f520670d76fd47aa1ab2790"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.3.0"
+ just_audio_web:
+ dependency: transitive
+ description:
+ name: just_audio_web
+ sha256: b163878529d9b028c53a6972fcd58cae2405bcd11cbfcea620b6fb9f151429d6
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.4.12"
+ just_audio_windows:
+ dependency: "direct main"
+ description:
+ name: just_audio_windows
+ sha256: "48ab2dec79cf6097550602fe07b1a644f341450e138dc8fdc23e42ce0ed2d928"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.1"
leak_tracker:
dependency: transitive
description:
@@ -1237,78 +1301,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.11.1"
- media_kit:
- dependency: "direct main"
- description:
- name: media_kit
- sha256: "1f1deee148533d75129a6f38251ff8388e33ee05fc2d20a6a80e57d6051b7b62"
- url: "https://pub.dev"
- source: hosted
- version: "1.1.11"
- media_kit_libs_android_video:
- dependency: transitive
- description:
- name: media_kit_libs_android_video
- sha256: "9dd8012572e4aff47516e55f2597998f0a378e3d588d0fad0ca1f11a53ae090c"
- url: "https://pub.dev"
- source: hosted
- version: "1.3.6"
- media_kit_libs_ios_video:
- dependency: transitive
- description:
- name: media_kit_libs_ios_video
- sha256: b5382994eb37a4564c368386c154ad70ba0cc78dacdd3fb0cd9f30db6d837991
- url: "https://pub.dev"
- source: hosted
- version: "1.1.4"
- media_kit_libs_linux:
- dependency: transitive
- description:
- name: media_kit_libs_linux
- sha256: e186891c31daa6bedab4d74dcdb4e8adfccc7d786bfed6ad81fe24a3b3010310
- url: "https://pub.dev"
- source: hosted
- version: "1.1.3"
- media_kit_libs_macos_video:
- dependency: transitive
- description:
- name: media_kit_libs_macos_video
- sha256: f26aa1452b665df288e360393758f84b911f70ffb3878032e1aabba23aa1032d
- url: "https://pub.dev"
- source: hosted
- version: "1.1.4"
- media_kit_libs_video:
- dependency: "direct main"
- description:
- name: media_kit_libs_video
- sha256: "20bb4aefa8fece282b59580e1cd8528117297083a6640c98c2e98cfc96b93288"
- url: "https://pub.dev"
- source: hosted
- version: "1.0.5"
- media_kit_libs_windows_video:
- dependency: transitive
- description:
- name: media_kit_libs_windows_video
- sha256: "32654572167825c42c55466f5d08eee23ea11061c84aa91b09d0e0f69bdd0887"
- url: "https://pub.dev"
- source: hosted
- version: "1.0.10"
- media_kit_native_event_loop:
- dependency: transitive
- description:
- name: media_kit_native_event_loop
- sha256: "7d82e3b3e9ded5c35c3146c5ba1da3118d1dd8ac3435bac7f29f458181471b40"
- url: "https://pub.dev"
- source: hosted
- version: "1.0.9"
- media_kit_video:
- dependency: "direct main"
- description:
- name: media_kit_video
- sha256: "2cc3b966679963ba25a4ce5b771e532a521ebde7c6aa20e9802bec95d9916c8f"
- url: "https://pub.dev"
- source: hosted
- version: "1.2.5"
meta:
dependency: transitive
description:
@@ -1325,6 +1317,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.6"
+ mpv_dart:
+ dependency: transitive
+ description:
+ name: mpv_dart
+ sha256: a33bd9a68439b496b7a5f36fecd3aa3cf6cbf0176ae15b9b60b12ae96e58f5a4
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.0.1"
nested:
dependency: transitive
description:
@@ -1661,62 +1661,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.28.0"
- safe_local_storage:
- dependency: transitive
- description:
- name: safe_local_storage
- sha256: ede4eb6cb7d88a116b3d3bf1df70790b9e2038bc37cb19112e381217c74d9440
- url: "https://pub.dev"
- source: hosted
- version: "1.0.2"
- screen_brightness:
- dependency: transitive
- description:
- name: screen_brightness
- sha256: ed8da4a4511e79422fc1aa88138e920e4008cd312b72cdaa15ccb426c0faaedd
- url: "https://pub.dev"
- source: hosted
- version: "0.2.2+1"
- screen_brightness_android:
- dependency: transitive
- description:
- name: screen_brightness_android
- sha256: "3df10961e3a9e968a5e076fe27e7f4741fa8a1d3950bdeb48cf121ed529d0caf"
- url: "https://pub.dev"
- source: hosted
- version: "0.1.0+2"
- screen_brightness_ios:
- dependency: transitive
- description:
- name: screen_brightness_ios
- sha256: "99adc3ca5490b8294284aad5fcc87f061ad685050e03cf45d3d018fe398fd9a2"
- url: "https://pub.dev"
- source: hosted
- version: "0.1.0"
- screen_brightness_macos:
- dependency: transitive
- description:
- name: screen_brightness_macos
- sha256: "64b34e7e3f4900d7687c8e8fb514246845a73ecec05ab53483ed025bd4a899fd"
- url: "https://pub.dev"
- source: hosted
- version: "0.1.0+1"
- screen_brightness_platform_interface:
- dependency: transitive
- description:
- name: screen_brightness_platform_interface
- sha256: b211d07f0c96637a15fb06f6168617e18030d5d74ad03795dd8547a52717c171
- url: "https://pub.dev"
- source: hosted
- version: "0.1.0"
- screen_brightness_windows:
- dependency: transitive
- description:
- name: screen_brightness_windows
- sha256: "9261bf33d0fc2707d8cf16339ce25768100a65e70af0fcabaf032fc12408ba86"
- url: "https://pub.dev"
- source: hosted
- version: "0.1.3"
sdp_transform:
dependency: transitive
description:
@@ -2010,22 +1954,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.2"
- universal_platform:
- dependency: transitive
- description:
- name: universal_platform
- sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec"
- url: "https://pub.dev"
- source: hosted
- version: "1.1.0"
- uri_parser:
- dependency: transitive
- description:
- name: uri_parser
- sha256: "6543c9fd86d2862fac55d800a43e67c0dcd1a41677cb69c2f8edfe73bbcf1835"
- url: "https://pub.dev"
- source: hosted
- version: "2.0.2"
url_launcher:
dependency: "direct main"
description:
@@ -2130,6 +2058,54 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
+ video_player:
+ dependency: "direct main"
+ description:
+ name: video_player
+ sha256: e30df0d226c4ef82e2c150ebf6834b3522cf3f654d8e2f9419d376cdc071425d
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.9.1"
+ video_player_android:
+ dependency: transitive
+ description:
+ name: video_player_android
+ sha256: "38d8fe136c427abdce68b5e8c3c08ea29d7a794b453c7a51b12ecfad4aad9437"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.7.3"
+ video_player_avfoundation:
+ dependency: transitive
+ description:
+ name: video_player_avfoundation
+ sha256: d1e9a824f2b324000dc8fb2dcb2a3285b6c1c7c487521c63306cc5b394f68a7c
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.6.1"
+ video_player_platform_interface:
+ dependency: transitive
+ description:
+ name: video_player_platform_interface
+ sha256: "236454725fafcacf98f0f39af0d7c7ab2ce84762e3b63f2cbb3ef9a7e0550bc6"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.2.2"
+ video_player_web:
+ dependency: transitive
+ description:
+ name: video_player_web
+ sha256: "6dcdd298136523eaf7dfc31abaf0dfba9aa8a8dbc96670e87e9d42b6f2caf774"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
+ video_player_win:
+ dependency: "direct main"
+ description:
+ name: video_player_win
+ sha256: e7b92ae1050086f9be3787eba1fbecbea278b59453cb3589263daa0c62772a88
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.11"
vm_service:
dependency: transitive
description:
@@ -2138,14 +2114,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "14.2.5"
- volume_controller:
- dependency: transitive
- description:
- name: volume_controller
- sha256: c71d4c62631305df63b72da79089e078af2659649301807fa746088f365cb48e
- url: "https://pub.dev"
- source: hosted
- version: "2.0.8"
wakelock_plus:
dependency: "direct main"
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index 797b80c..7dc485e 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -2,7 +2,7 @@ name: solian
description: "The Solar Network App"
publish_to: "none"
-version: 1.2.1+28
+version: 1.2.1+29
environment:
sdk: ">=3.3.4 <4.0.0"
@@ -68,9 +68,6 @@ dependencies:
firebase_crashlytics: ^4.0.4
firebase_analytics: ^11.2.1
firebase_performance: ^0.10.0+4
- media_kit: ^1.1.10+1
- media_kit_video: ^1.2.4
- media_kit_libs_video: ^1.0.4
flutter_svg: ^2.0.10+1
cross_file: ^0.3.4+2
google_fonts: ^6.2.1
@@ -78,6 +75,12 @@ dependencies:
json_annotation: ^4.9.0
gap: ^3.0.1
fl_chart: ^0.69.0
+ video_player: ^2.9.1
+ video_player_win: ^2.3.11
+ chewie: ^1.8.4
+ just_audio: ^0.9.40
+ just_audio_windows: ^0.2.1
+ just_audio_mpv: ^0.1.7
dev_dependencies:
flutter_test:
diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc
index a0fca33..0a34134 100644
--- a/windows/flutter/generated_plugin_registrant.cc
+++ b/windows/flutter/generated_plugin_registrant.cc
@@ -14,15 +14,14 @@
#include
#include
#include
+#include
#include
-#include
-#include
#include
#include
#include
-#include
#include
#include
+#include
void RegisterPlugins(flutter::PluginRegistry* registry) {
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
@@ -41,22 +40,20 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("FlutterWebRTCPlugin"));
GalPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GalPluginCApi"));
+ JustAudioWindowsPluginRegisterWithRegistrar(
+ registry->GetRegistrarForPlugin("JustAudioWindowsPlugin"));
LiveKitPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("LiveKitPlugin"));
- MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar(
- registry->GetRegistrarForPlugin("MediaKitLibsWindowsVideoPluginCApi"));
- MediaKitVideoPluginCApiRegisterWithRegistrar(
- registry->GetRegistrarForPlugin("MediaKitVideoPluginCApi"));
PasteboardPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PasteboardPlugin"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
ProtocolHandlerWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ProtocolHandlerWindowsPluginCApi"));
- ScreenBrightnessWindowsPluginRegisterWithRegistrar(
- registry->GetRegistrarForPlugin("ScreenBrightnessWindowsPlugin"));
SharePlusWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
+ VideoPlayerWinPluginCApiRegisterWithRegistrar(
+ registry->GetRegistrarForPlugin("VideoPlayerWinPluginCApi"));
}
diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake
index b666aba..d8ad4e4 100644
--- a/windows/flutter/generated_plugins.cmake
+++ b/windows/flutter/generated_plugins.cmake
@@ -11,19 +11,17 @@ list(APPEND FLUTTER_PLUGIN_LIST
flutter_secure_storage_windows
flutter_webrtc
gal
+ just_audio_windows
livekit_client
- media_kit_libs_windows_video
- media_kit_video
pasteboard
permission_handler_windows
protocol_handler_windows
- screen_brightness_windows
share_plus
url_launcher_windows
+ video_player_win
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
- media_kit_native_event_loop
)
set(PLUGIN_BUNDLED_LIBRARIES)