Skip to content
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

(android) added ability set usage type #303

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RSATom
Copy link

@RSATom RSATom commented Apr 19, 2021

Platforms affected

Android

Motivation and Context

Sometimes it's required change audio usage type for audio playback. In my case it's required to use AudioAttributes.USAGE_VOICE_COMMUNICATION usage to be able play audio through earpiece.

Description

Patch just adds additional options object to Media constructor with the single possible option usage.

Testing

To test it, it's required pass { usage: Media.ANDROID_USAGE_VOICE_COMMUNICATION } object to Media constructor as last parameter. After that audio playback should go through earpiece.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@RSATom RSATom changed the title [android] added ability set usage type (android) added ability set usage type Apr 19, 2021
@stefankatic
Copy link

Looks ok to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants