Skip to content

Commit

Permalink
0.17.2 to main (#510)
Browse files Browse the repository at this point in the history
* fix: incorrect audio bitrate sanitization

* fix: audio crash on teardown

* kick off co

* Update OTCustomAudioDriver.swift

* ignore: CI

* ignore: CI

* update package and changelog

Co-authored-by: Micha Hanselmann <micha.hanselmann@gmail.com>
Co-authored-by: Mario Scheliga <mscheliga@linkando.com>
  • Loading branch information
3 people committed May 28, 2021
1 parent 771fb6f commit fcbf1c2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.17.2 (May 27, 2021)
- **[Fix]**: Fixed incorrect audio bitrate sanitization [#473](https://github.com/opentok/opentok-react-native/pull/473)
- **[Fix]**: Fix audio crash on teardown [#495](https://github.com/opentok/opentok-react-native/pull/495)

# 0.17.1 (May 25, 2021)

- **[Fix]**: Fixed @opentok/types (merged from [PR505](https://github.com/opentok/opentok-react-native/pull/505))
Expand Down
10 changes: 6 additions & 4 deletions ios/OpenTokReactNative/OTCustomAudioDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,12 @@ extension OTCustomAudioDriver: OTAudioDevice {

playing = false

let result = AudioOutputUnitStop(playoutVoiceUnit!)
if result != noErr {
print("Error creaing playout unit")
return false
if playoutVoiceUnit != nil {
let result = AudioOutputUnitStop(playoutVoiceUnit!)
if result != noErr {
print("Error creaing playout unit")
return false
}
}

if !recording && !isPlayerInterrupted && !isResetting {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opentok-react-native",
"version": "0.17.1",
"version": "0.17.2",
"description": "React Native components for OpenTok iOS and Android SDKs",
"main": "src/index.js",
"homepage": "https://www.tokbox.com",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/OTPublisherHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const sanitizeCameraPosition = (cameraPosition = 'front') => (cameraPosition ===
const sanitizeVideoSource = (videoSource = 'camera') => (videoSource === 'camera' ? 'camera' : 'screen');

const sanitizeAudioBitrate = (audioBitrate = 40000) =>
(audioBitrate < 80000 || audioBitrate > 128000 ? 40000 : audioBitrate);
(audioBitrate < 6000 || audioBitrate > 510000 ? 40000 : audioBitrate);

const sanitizeProperties = (properties) => {
if (typeof properties !== 'object') {
Expand Down

0 comments on commit fcbf1c2

Please sign in to comment.