apivideo / api.video-flutter-player

The official Flutter player for api.video
https://api.video
MIT License
24 stars 4 forks source link

[Bug](android): `setIsMuted` is not working in android. #56

Open DhruvinUnikon opened 3 months ago

DhruvinUnikon commented 3 months ago

Version

1.2.1

Environment that reproduces the issue

Device: [SM-G990E, GALAXY S21 FE, Android 14]

Is it reproducible in the example application?

Yes

Reproduction steps

  1. Run the example with the provided video id.
  2. Try to set isMuted to true and false.

Expected result

  1. On tap mute it should mute the sound of the video player.
  2. On un-mute it should unmute the player.

Actual result

Player is not responding at all in case of setIsMuted.

Additional context

Output of flutter doctor -v ``` [!] Flutter (Channel [user-branch], 3.19.1, on macOS 14.3 23D56 darwin-arm64, locale en-IN) ! Flutter version 3.19.1 on channel [user-branch] at /opt/homebrew/Caskroom/flutter/3.19.6/flutter Currently on an unknown channel. Run `flutter channel` to switch to an official channel. If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install. ! Upstream repository unknown source is not a standard remote. Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error. • Framework revision abb292a07e (4 months ago), 2024-02-20 14:35:05 -0800 • Engine revision 04817c99c9 • Dart version 3.3.0 • DevTools version 2.31.1 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/dhruvinvainsh/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15C500b • CocoaPods version 1.13.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) [✓] VS Code (version 1.89.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.90.0 [✓] Connected device (5 available) • SM G990E (mobile) • RZCW1262PWP • android-arm64 • Android 14 (API 34) • Shashi Unikon (mobile) • 00008030-00014CC82298402E • ios • iOS 17.4.1 21E236 • iPhone 15 Pro (mobile) • 1EE14A52-E24C-4551-BE47-F825965EB507 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-2 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.3 23D56 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.114 ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources • All expected network resources are available. ! Doctor found issues in 1 category. ```

Relevant logs output

No response

Additional resource:

https://github.com/apivideo/api.video-flutter-player/assets/168629358/0921ab2e-04e1-46e6-a196-dde287d24949

ThibaultBee commented 3 months ago

Hi,

Thanks for reporting. Indeed muted on Android has not effect (same for setVolume).

Just a question before I fix this. Do you expect this API to be the video volume or the device volume?

DhruvinUnikon commented 3 months ago

Thanks, @ThibaultBee for being prompt.

It would be better to change the volume level of the of the video instead of the device volume level on this!.

ThibaultBee commented 3 months ago

Fixed in the Android library https://github.com/apivideo/api.video-android-player/commit/9082a21a41eb14b7bcfbf83a3862ce28c48bfcdc

ThibaultBee commented 1 month ago

I have made a fix in the main branch. Could you test it?