-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[video_player] Adding support for preferred audio language #8980
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
base: main
Are you sure you want to change the base?
Conversation
…style.
Hi, thank you for your contribution! This looks like a great feature to support, but it looks like the tests are failing. Before we review the PR, please see what you can do to resolve the test failures. If you are unsure how to proceed, please reach out for help on the #hackers-new channel. |
@camsim99 sorry about that, my first packages PR, still wrapping my head around it. I've updated the code and fixed the tests, |
Please see step 1 of the instructions for multi-package PRs for the instructions on how to make this PR something that the CI can run tests on without failing all of the checks. |
…d-audio-language
@stuartmorgan-g followed the instructions and updated pubspecs to use local path dependencies. |
Thanks; it looks like CI is now flagging a number of real failures caused by the PR (analysis, Android lint, macOS native tests). The "View details" links for the failing tests will lead to the |
Added support for preferred audio language to video_player on Android. If underlaying stream/video supports it this will communicate to exoplayer that audio stream for sepcific language should be used if available.
To use this feature developer should pass preferredAudioLanguage as a 2 character ISO langauge code to VideoPlayerOptions when initializing VideoPlayerController. This code should match one of the language specified in the stream, for example (HLS):
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Italian",LANGUAGE="it",DEFAULT=NO,AUTOSELECT=YES,URI="audio/italian.m3u8"
Platforms that don't have implementation yet will silently ignore this.
This PR implements flutter/flutter#166411
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3