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

fix(ios): set type attribute for captured audio #197

Merged
merged 2 commits into from Aug 7, 2023

Conversation

ath0mas
Copy link
Contributor

@ath0mas ath0mas commented Oct 19, 2020

Platforms affected

iOS

Motivation and Context

Capturing audio is returning a mediaDictionary without its type attribute.

Description

  1. getMediaDictionaryFromPath should always set type for returned fileDict, either using "type" param or determined from file
  2. audio type should not be forced to "audio/wav"

Testing

If "type" param is forced, returned fileDict uses it too.
And then, do capture audio on iOS to have an object with filled mimeType determined from file, usually "audio/x-wav".

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

@ath0mas ath0mas closed this Oct 31, 2020
@ath0mas ath0mas reopened this Oct 31, 2020
@breautek breautek added this to the 4.0.0 milestone Apr 12, 2022
@breautek breautek added this to In progress in 4.x via automation Apr 12, 2022
@erisu erisu changed the title iOS: Fix type for captured audio fix(ios): set type attribute for captured audio Jul 20, 2023
…ined from file

If the 'type' param was provided, the fileDict was missing its mimeType value.
…d value

Previously forced "audio/wav" but not always correct: from file can be "audio/x-wav" or other.
Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes LGTM.
Also tested the code changes in a sample project.

@erisu erisu merged commit 7d1701d into apache:master Aug 7, 2023
5 of 10 checks passed
4.x automation moved this from In progress to Done Aug 7, 2023
@ath0mas ath0mas deleted the fix/ios-audio-type branch August 7, 2023 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
4.x
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants