- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.5k
 
[video_player] Add audio track management support to platform interface #10171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[video_player] Add audio track management support to platform interface #10171
Conversation
| 
           It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces audio track management capabilities to the video_player platform interface. It adds a new VideoAudioTrack model to represent audio track metadata, and new methods getAudioTracks(), selectAudioTrack(), and isAudioTrackSupportAvailable() to the VideoPlayerPlatform abstract class. The changes are well-structured and additive. My review includes a suggestion to add tests for the new platform interface methods and a minor improvement to the changelog entry for completeness.
        
          
                packages/video_player/video_player_platform_interface/CHANGELOG.md
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart
          
            Show resolved
            Hide resolved
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gemini's comments are good this time. Would implement them.
…G.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…eshmbhat/flutter_packages into 4-oct-video-player-interface-updates
| 
           have updated PR as per gemini's suggestions @tarrinneal  | 
    
        
          
                packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart
          
            Show resolved
            Hide resolved
        
              
          
                packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart
          
            Show resolved
            Hide resolved
        
              
          
                packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …oTrack and update audio track support check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits.
        
          
                packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart
          
            Show resolved
            Hide resolved
        
              
          
                packages/video_player/video_player_platform_interface/CHANGELOG.md
              
                Outdated
          
            Show resolved
            Hide resolved
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm once @stuartmorgan-g 's comments are addressed?
- Added detailed documentation comments for VideoAudioTrack properties explaining null cases - Updated CHANGELOG.md to use more concise language for audio track management features - Improved code readability by adding spacing between property documentation blocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/packages@bbf96a0...c8ba0cc 2025-10-27 [email protected] Fix Namespace Assignment Test (flutter/packages#10289) 2025-10-27 [email protected] [video_player] Add audio track management support to platform interface (flutter/packages#10171) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#177672) flutter/packages@bbf96a0...c8ba0cc 2025-10-27 [email protected] Fix Namespace Assignment Test (flutter/packages#10289) 2025-10-27 [email protected] [video_player] Add audio track management support to platform interface (flutter/packages#10171) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Description
platform interface pr for #9925
Core Features
VideoAudioTrackmodel with comprehensive metadata fields:id,label,language,isSelected,bitrate,sampleRate,channelCount,codecBreaking Changes
None - all changes are additive and backward compatible.
Pre-Review Checklist
[video_player]pubspec.yamlwith an appropriate new version according to the [pub versioning philosophy], or I have commented below to indicate which [version change exemption] this PR falls under[^1].CHANGELOG.mdto add a description of the change, [following repository CHANGELOG style], or I have commented below to indicate which [CHANGELOG exemption] this PR falls under[^1].///).