Skip to content

Commit

Permalink
Merge pull request #486 from pinpong/master
Browse files Browse the repository at this point in the history
fixed getVolume
  • Loading branch information
illia-romanenko authored Jun 11, 2024
2 parents 4bb85a9 + 48027c2 commit 16d8d71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion flutter_vlc_player/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion flutter_vlc_player/ios/flutter_vlc_player.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions flutter_vlc_player/lib/src/vlc_player_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,11 @@ class VlcPlayerController extends ValueNotifier<VlcPlayerValue> {
}

/// Returns current vlc volume level.
Future<int> getVolume() async {
Future<int?> getVolume() async {
_throwIfNotInitialized('getVolume');
final volume =
await (vlcPlayerPlatform.getVolume(_viewId) as FutureOr<int>);
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;
}
Expand Down

0 comments on commit 16d8d71

Please sign in to comment.