Skip to content

feat(ios): ios audio setEngineAvailability support - #53

Merged
santhoshvai merged 7 commits into
masterfrom
iosAudioEngineDisable-support
Jul 28, 2026
Merged

feat(ios): ios audio setEngineAvailability support#53
santhoshvai merged 7 commits into
masterfrom
iosAudioEngineDisable-support

Conversation

@santhoshvai

@santhoshvai santhoshvai commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added controls for enabling or disabling audio engine availability.
    • Added status inspection so applications can check whether the audio engine is available.
    • Added standard presets for default and unavailable engine states.
  • Release Updates

    • Updated the package to version 145.1.0-alpha.1.
    • Improved iOS audio engine control compatibility for supported builds.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The iOS audio device module now exposes engine availability control and inspection, adds default and disabled availability presets, updates related TODO documentation, and advances the package and StreamWebRTC dependency versions.

Changes

Audio engine availability API

Layer / File(s) Summary
Engine availability contract and wrapper
ios/RCTWebRTC/Utils/AudioDeviceModule/RTCAudioDeviceModuleControlling.swift, ios/RCTWebRTC/Utils/AudioDeviceModule/AudioDeviceModule.swift, ios/RCTWebRTC/WebRTCModule+RTCAudioDeviceModule.m
The controlling protocol and Swift wrapper expose availability setters and state inspection, with default and none presets; the related Objective-C TODO now documents unavailable asynchronous observer resolution hooks.
Release dependency alignment
package.json, stream-react-native-webrtc.podspec
The package version changes to 145.1.0-alpha.1, and the StreamWebRTC dependency changes to 145.11.0.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main iOS audio change: adding setEngineAvailability support.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch iosAudioEngineDisable-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@santhoshvai
santhoshvai marked this pull request as ready for review July 28, 2026 08:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ios/RCTWebRTC/Utils/AudioDeviceModule/AudioDeviceModule.swift`:
- Around line 363-370: Expose engine availability through the React Native
bridge: add matching audioDeviceModule get/set exports in
WebRTCModule+RTCAudioDeviceModule.m, implement corresponding methods in
AudioDeviceModule.ts returning { isInputAvailable, isOutputAvailable }, and
remove the stale unsupported-method TODO while preserving the Swift wrapper
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ae77ce7f-854c-4d8f-ba68-a990c64e5f1b

📥 Commits

Reviewing files that changed from the base of the PR and between 8972b28 and c7a7c61.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • ios/RCTWebRTC/Utils/AudioDeviceModule/AudioDeviceModule.swift
  • ios/RCTWebRTC/Utils/AudioDeviceModule/RTCAudioDeviceModuleControlling.swift
  • ios/RCTWebRTC/WebRTCModule+RTCAudioDeviceModule.m
  • package.json
  • stream-react-native-webrtc.podspec
💤 Files with no reviewable changes (1)
  • ios/RCTWebRTC/WebRTCModule+RTCAudioDeviceModule.m

Comment thread ios/RCTWebRTC/Utils/AudioDeviceModule/AudioDeviceModule.swift
@santhoshvai
santhoshvai merged commit 7c971e1 into master Jul 28, 2026
5 of 6 checks passed
@santhoshvai
santhoshvai deleted the iosAudioEngineDisable-support branch July 28, 2026 12:12
oliverlaz added a commit that referenced this pull request Jul 28, 2026
…shing) (#46)

## What

Adds an automated, `workflow_dispatch`-triggered release for
`@stream-io/react-native-webrtc`, modeled on [`stream-chat-js`'s
`release.yml`](https://github.com/GetStream/stream-chat-js/blob/master/.github/workflows/release.yml).
Uses **semantic-release** for version computation, changelog, git tag,
and GitHub Release, and publishes to npm via **tokenless Trusted
Publishing (OIDC)** with automatic provenance.

Replaces the manual flow (`tools/release.sh` + hand-run `npm publish`).

## Files

| File | Purpose |
|------|---------|
| `.github/workflows/release.yml` | Dispatch release job: `dry_run`
input, OIDC + issue/PR token scopes, concurrency group, branch safety
guard, `npx semantic-release` |
| `.github/actions/setup-node/action.yml` | Composite action — Node from
`.nvmrc` (v24) + `npm ci` |
| `.releaserc.json` | semantic-release branches + plugin pipeline
(commit-analyzer → release-notes → changelog → npm → git → github) |
| `.github/workflows/{ci,android_ci,ios_ci}.yml` | Adopt the composite
action; bump `checkout@v6` / `setup-java@v5`; drop the now-redundant
root `npm install` |
| `.github/stale.yml` | Removed — config for the long-retired Probot
Stale app |
| `README.md` | Stream-specific rewrite of stale upstream sections + new
**Releasing** section documenting the branch↔channel mapping |
| `package.json` / `package-lock.json` | `semantic-release` script + 4
devDependencies, lockfile synced so `npm ci` succeeds |

## Release channels

There is **no channel input** — the branch you dispatch from selects the
channel, via the *"Use workflow from"* dropdown. Documented in the
README's Releasing section.

| Dispatch from | Version | npm dist-tag |
|---|---|---|
| `master` | `145.1.0` | `latest` |
| `beta` | `145.1.0-beta.1` | `beta` |
| `alpha` | `145.1.0-alpha.1` | `alpha` |
| `<major>.x` (e.g. `145.x`) | `145.0.1` | `145.x` |
| any, with `dry_run: true` | computed + printed only | — |

`alpha` is included deliberately: the `alpha` dist-tag currently points
at `145.1.0-alpha.1` and the 145 line has 10 published alphas, so
dropping that channel would have been a regression.

A branch only appears in the dispatch dropdown once it exists on the
remote **and** contains `release.yml`, so `alpha` / `beta` / `<major>.x`
need branching off `master` before first use.

## ⚠️ Remaining prerequisite

**Configure the npm Trusted Publisher** for
`@stream-io/react-native-webrtc` on npmjs.com (Settings → Trusted
Publisher → GitHub Actions → this repo + `release.yml`). Tokenless OIDC
publish fails without it.

This must happen **before any dispatch, including `dry_run: true`** —
`@semantic-release/npm` runs `verifyConditions` on every invocation, so
a dry run without a registered publisher falls back to looking for
`NPM_TOKEN` and fails with `ENONPMTOKEN`. That failure reads like a
broken release config but is only the missing registry setting.

The baseline-tag concern from the original description is **resolved**:
`v145.0.0` now exists on the remote and is an ancestor of `master`, and
it matches semantic-release's default `v${version}` tag format.

## Verification performed

On the merged tree, not just `tsc`:

- `npm ci` — clean; lockfile stays `lockfileVersion: 2` with no drift
- `npm run lint` (eslint + `tsc --noEmit`) — pass
- `git status --porcelain` after `npm ci` — clean, so `ci.yml`'s
dirty-tree gate still holds with `bob 0.43`
- `npm pack --dry-run` — `lib/` present (built by `prepare` at publish
time)
- Config load: all 15 plugin hooks resolve; branch guard correctly
refuses to publish from a feature branch
- **Version computation exercised end-to-end** (`--dry-run`,
`--branches` override, no publish/push): computes **145.1.0** from
`feat(ios): setEngineAvailability (#53)` + the stereo `fix:`, with
correctly rendered release notes
- `alpha` channel resolution checked against semantic-release's own
`lib/branches/normalize.js` → `channel="alpha"`, `prerelease="alpha"`,
matching the existing dist-tag
- `npm version --no-git-tag-version` confirmed to update all three
version fields in `package-lock.json`, so no `package.json`/lock drift
after a release commit (the lock is in the `git` plugin's `assets`)
- Trusted publishing confirmed supported in the installed
`@semantic-release/npm@13.1.5` (`lib/trusted-publishing/`); Node 24
bundles npm 11.16, above the 11.5.1 floor, so no `npm install -g
npm@latest` step is needed

## Fixed during review

- **`permissions` was missing `issues: write` / `pull-requests:
write`.** Declaring any scope sets all undeclared scopes to `none`, and
`@semantic-release/github`'s `success` step comments on / labels /
closes released issues and PRs, rethrowing failures. Since `7c971e1
feat(ios): … (#53)` is in range, the first release would have published
to npm, pushed the tag and release commit, created the GitHub Release —
and *then* failed the job with 403s. Dry runs cannot catch this; they
skip `publish`/`success` entirely.
- **Added a `concurrency` group** (`cancel-in-progress: false`). Two
overlapping dispatches would both compute the same version and race on
the tag, the branch push, and the publish. Cancellation is deliberately
disabled because the tag and release commit are pushed *before* publish,
so a cancelled run can leave the repo tagged with nothing on npm.
- **`GITHUB_TOKEN` now passed to the Release step** (was flagged in the
original description).
- **Merged `master`** — resolved conflicts in `ios_ci.yml` (kept
master's Xcode-versioned Pods cache + the composite action),
`package.json` (master's `bob ^0.43.0` + `semantic-release`), and
regenerated `package-lock.json`.

## Known follow-ups (not addressed here)

- The branch guard admits `release*` and non-numeric `*.x` names that
`.releaserc.json` doesn't handle, so a dispatch from e.g.
`release/145.2` produces a **green run that publishes nothing**.
- `{ "scope": "deps", "release": "patch" }` constrains only the scope,
so `feat(deps):` yields a patch instead of a minor. Adding `"type":
"chore"` would confine it to dependabot-style commits.
- `tools/release.sh` is still present alongside the new flow.
- The README rewrite dropped the Picture-in-Picture section, which is
Stream-authored content pointing users at
`@stream-io/video-react-native-sdk` — worth restoring if the removal was
unintentional.

## Lockfile note

The large diff is almost entirely the reshuffling of `lockfileVersion:
2`'s legacy nested `dependencies` block. Compared structurally against
`master`'s lockfile, the change is **398 packages added, 0 removed, 0
version changes** — a pure addition of semantic-release's tree.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added an automated Release workflow using semantic-release, including
a dry-run option.
* Enabled consistent Node provisioning in CI via a shared local setup
action across Android, iOS, and general CI.

* **Chores**
* Added semantic-release tooling and release scripts/configuration
(including changelog and package publishing).
  * Removed stale-issue automation configuration.

* **Documentation**
* Updated README to reflect the `@stream-io/react-native-webrtc` package
branding and streamlined related/example project sections.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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