diff --git a/flutter_vlc_player/android/build.gradle b/flutter_vlc_player/android/build.gradle index 03aa8f83..298cb9e0 100644 --- a/flutter_vlc_player/android/build.gradle +++ b/flutter_vlc_player/android/build.gradle @@ -41,7 +41,7 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'org.videolan.android:libvlc-all:3.6.0-eap9' + implementation 'org.videolan.android:libvlc-all:3.6.0-eap12' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.annotation:annotation:1.2.0' diff --git a/flutter_vlc_player/ios/flutter_vlc_player.podspec b/flutter_vlc_player/ios/flutter_vlc_player.podspec index 2e039790..eb2068ca 100644 --- a/flutter_vlc_player/ios/flutter_vlc_player.podspec +++ b/flutter_vlc_player/ios/flutter_vlc_player.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| s.source_files = 'Classes/**/*' s.dependency 'Flutter' s.platform = :ios, '11.0' - s.dependency 'MobileVLCKit', '~> 3.6.0b9' + s.dependency 'MobileVLCKit', '~> 3.6.0b12' s.static_framework = true # Flutter.framework does not contain a i386 slice. diff --git a/flutter_vlc_player/lib/src/vlc_player_controller.dart b/flutter_vlc_player/lib/src/vlc_player_controller.dart index a473bbe9..665f0e95 100644 --- a/flutter_vlc_player/lib/src/vlc_player_controller.dart +++ b/flutter_vlc_player/lib/src/vlc_player_controller.dart @@ -568,11 +568,11 @@ class VlcPlayerController extends ValueNotifier { } /// Returns current vlc volume level. - Future getVolume() async { + Future getVolume() async { _throwIfNotInitialized('getVolume'); - final volume = - await (vlcPlayerPlatform.getVolume(_viewId) as FutureOr); - value = value.copyWith(volume: volume.clamp(0, _maxVolume)); + final volume = await vlcPlayerPlatform.getVolume(_viewId); + value = value.copyWith( + volume: volume != null ? volume.clamp(0, _maxVolume) : null); return volume; }