Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
f1b8ff0
android, ios: remove track from remoteTracks in onRemoveTrack (#6)
davidliu Mar 28, 2024
644c46d
Merge upstream from 118.0.4
davidliu Apr 7, 2024
fed67a4
android, ios: update webrtc to m114
davidliu Nov 23, 2023
8718032
release 114.1.0-beta.0
davidliu Apr 8, 2024
2652c6b
release 114.1.0
davidliu Apr 8, 2024
c497217
Merge remote-tracking branch 'upstream/master'
davidliu Apr 8, 2024
3de7f5b
release 114.1.1
davidliu Apr 8, 2024
f1bc9ff
Update AndroidInstallation.md
davidliu Apr 9, 2024
dab657f
Merge remote-tracking branch 'upstream/master'
davidliu May 3, 2024
157729c
ios: update webrtc to 114.5735.10 (#7)
davidliu May 3, 2024
5abdfbe
release 114.1.2
davidliu May 3, 2024
4e442f1
Update android webrtc to 114.5735.11
davidliu May 22, 2024
03ab65b
release 114.1.3
davidliu May 22, 2024
651373e
android: only change capture format for screen if dimen actually chan…
davidliu May 25, 2024
c8829cb
release 114.1.4
davidliu May 26, 2024
29210ac
android: release audio device module after creating factory
davidliu Jun 21, 2024
cde6b51
release 114.1.5
davidliu Jun 21, 2024
2d153e1
Merge upstream and update webrtc to M125 (#9)
davidliu Jun 24, 2024
3e72c4a
release 125.0.0
davidliu Jun 24, 2024
e0740f0
Update README.md to avoid confusion with the original
davidliu Jun 24, 2024
6986a6e
Update README.md
davidliu Jun 24, 2024
774f39e
android: declare a dependency on androidx.core 1.7.0
davidliu Jun 25, 2024
49af0ad
ios: Add audioProcessingModule to WebRTCModuleOptions (#13)
davidliu Jul 26, 2024
4d19ccd
release 125.0.1
davidliu Jul 26, 2024
25d7f19
Merge commit '09f609bbf093af780ff87f8b44232a445a79d1de'
davidliu Aug 4, 2024
ffd5936
android,ios: update webrtc to 125.0.4
davidliu Aug 4, 2024
7472d2d
release 125.0.2
davidliu Aug 4, 2024
1121257
ci: fix ios compile (#14)
davidliu Aug 5, 2024
c10087e
Merge upstream 124.0.4 into master (#16)
davidliu Aug 19, 2024
0eb4be1
release 125.0.3
davidliu Aug 19, 2024
c571bfc
android: don't use rootProject's minSdkVersion (#17)
davidliu Sep 16, 2024
b3e537b
release 125.0.4
davidliu Sep 16, 2024
11bf531
Fix multi-cam support (#18)
davidliu Oct 15, 2024
4f58cb2
ios: update webrtc-sdk pod to 125.6422.05 (#19)
davidliu Oct 15, 2024
a8e2c3b
release 125.0.5
davidliu Oct 15, 2024
4f337cd
doc: remove duplicate / confusing information about screen-sharing (#…
saghul Nov 4, 2024
b62727a
ios: add background camera access option
davidliu Dec 2, 2024
996c128
ios: picture in picture implementation
davidliu Dec 13, 2024
fe2a043
e2ee ios implementation and other final fixes (#23)
davidliu Dec 16, 2024
f132492
Merge upstream from commit 996c128 (#24)
davidliu Dec 16, 2024
338139e
release 125.0.6
davidliu Dec 16, 2024
a26ca45
fix: fix event-target-shim throwing error in RTCFrameCrypto (#25)
davidliu Dec 20, 2024
546ba4f
release 125.0.7
davidliu Dec 20, 2024
036e374
android: add libwebrtc consumer proguard rules
davidliu Dec 20, 2024
359caea
android: document how to set audio category to media
msabaeian Jan 4, 2025
803e720
release 124.0.5
saghul Jan 7, 2025
4c5d0f9
audit: update dependencies
saghul Jan 7, 2025
918866a
tools: tweak release message
saghul Jan 7, 2025
7a0b713
ci: update GHA versions
saghul Jan 7, 2025
1c11daf
android,ios: expose needed apis for audio processing (#27)
davidliu Feb 3, 2025
19ca31d
ci: fix boost checksum error preventing builds (#1672)
davidliu Feb 3, 2025
8a21408
ios: update webrtc-sdk pod to 125.6422.07 (#28)
davidliu Feb 4, 2025
ba7a2a3
release 125.0.8
davidliu Feb 4, 2025
76bc08a
tools: delete tools/build-webrtc.py
saghul Feb 20, 2025
dc83025
pc: don't throw when applyConstraints on audio tracks (#29)
davidliu Feb 24, 2025
0c70bee
release 125.0.9
davidliu Feb 24, 2025
8035eb5
Update build.gradle
Dimon70007 Apr 1, 2025
90c1815
refactor: improve type safety in RTCPeerConnection's getSenders and g…
yoohaso Apr 11, 2025
a388aba
fix: improve RTCPIPView component forwardRef type definition to remov…
yoohaso Apr 28, 2025
d7dfbae
android,ios: disallow changing cameras through apply constraints (#34)
davidliu Jun 24, 2025
7f79824
android,ios: add defaultTrackVolume control to WebRTCModuleOptions (#33)
davidliu Jun 24, 2025
c77ff12
release 125.0.10 (#35)
davidliu Jun 24, 2025
94175ed
Multiple video frame processors + implementation for ios (#1681)
8BallBomBom Jun 27, 2025
1a5f3d6
ios: pin WebRTC-SDK to 125.6422.07 due to api compatibility (#37)
davidliu Jul 8, 2025
a6f476b
release 125.0.11 (#38)
davidliu Jul 8, 2025
f515ee5
fix(android): Compatibility with RN 0.80+
oliverlaz Jul 23, 2025
c1ac950
ts: remove mandatory from sessionConstraints in docs, add createOffer…
mrakesh0608 Jul 25, 2025
cadefa5
Feature/video dimensions (#1724)
hmeerlo Jul 25, 2025
2f09f2d
misc: format
saghul Jul 28, 2025
0f1a265
release: 124.0.6
saghul Jul 28, 2025
8f93426
Merge from upstream 124.0.6 (#42)
davidliu Jul 28, 2025
92892bf
release: 125.0.12 (#43)
davidliu Jul 28, 2025
23dd763
ios,android: update libwebrtc to m137 (#44)
davidliu Jul 29, 2025
6ad4692
release: 137.0.0 (#45)
davidliu Jul 29, 2025
de82ad3
android: fix NPE in gUM
saghul Aug 6, 2025
6b07d2f
android: add jni_zero to consumer rules (#47)
davidliu Aug 9, 2025
9623b9e
ios,android: handle internal audio media constraints (#46)
davidliu Aug 9, 2025
cea75c4
ci: formatting check (#48)
davidliu Aug 9, 2025
a2e2dcd
release: 137.0.1 (#49)
davidliu Aug 9, 2025
bf0c944
pc: handle null when normalizing options
saghul Aug 13, 2025
0ab26cb
fix: typo in _validatePermissionDescriptor method name
yoohaso Sep 5, 2025
337677d
ios,android: DataPacketCryptor implementation (#57)
davidliu Sep 18, 2025
28da631
release: 137.0.2 (#58)
davidliu Sep 18, 2025
ea08b32
Update building WebRTC docs
kota-yata Sep 20, 2025
1ff4ef3
ios: update webrtc-sdk pod v137.7151.09 (#59)
hiroshihorie Oct 3, 2025
503ec7f
ios: fix crash in iOS 26 simulator
saghul Oct 7, 2025
5ecc861
release: 124.0.7
saghul Oct 9, 2025
5ba65ce
android: fix ANR in getVideoTrackForStreamURL
saghul Oct 27, 2025
72f9dfd
pc: add minBitrate to encoding parameters
martinxsliu Feb 19, 2026
5771fbd
api: throw error in addIceCandidate when peer connection is closed
naveenkirugulige Mar 4, 2026
d2aa171
refactor: update event-target-shim imports to remove '/index'
Mar 1, 2026
c43189a
refactor: replace defineEventAttribute with getter/setter methods for…
Mar 2, 2026
495b416
refactor: update event-target-shim imports to use local vendor path
Mar 13, 2026
d6c7a40
chore: remove event-target-shim dependency from package-lock.json
Mar 13, 2026
66e61ba
chore: ignore src/vendor in eslint
Mar 13, 2026
43c665d
style: make eslint happy
Mar 13, 2026
e36ddec
build(deps-dev): bump flatted from 3.2.7 to 3.4.2
dependabot[bot] Mar 19, 2026
5c77013
android: update libwebrtc to 137.1751.05 (#72)
davidliu Mar 24, 2026
c4c3a6c
Merge upstream (#73)
davidliu Mar 25, 2026
4260d54
release: 137.0.3 (#74)
davidliu Mar 25, 2026
fe4ce0f
m144 (#68)
hiroshihorie Mar 25, 2026
7beff6a
release: 144.0.0 (#75)
davidliu Mar 25, 2026
a243f5e
build(deps-dev): bump picomatch from 2.3.1 to 2.3.2
dependabot[bot] Mar 25, 2026
134ca86
Expose audio engine APIs (#62)
hiroshihorie Mar 31, 2026
88dc410
release: 144.1.0-beta.0 (#76)
davidliu Mar 31, 2026
d3a6f04
android: add registerTrack methods for 3rd party track registration (…
davidliu Apr 6, 2026
c145d88
release: 144.1.0-beta.1 (#79)
davidliu Apr 6, 2026
643067f
pc: add mediaConstraints on getDisplayMedia
FredLuart Apr 9, 2026
68ca776
pc: add RTCCertificate support
jiyeyuran Apr 13, 2026
f7b6382
ios: use runtime camera checks on simulator for camera availability
kmagiera Apr 14, 2026
0b4faeb
ts: remove mandatory from sessionConstraints in docs, add createOffer…
mrakesh0608 Jul 25, 2025
84404a2
pc: handle null when normalizing options
saghul Aug 13, 2025
aaab704
refactor: improve type safety in RTCPeerConnection's getSenders and g…
yoohaso Apr 11, 2025
928492b
api: throw error in addIceCandidate when peer connection is closed
naveenkirugulige Mar 4, 2026
ca5ca2c
android: fix ANR in getVideoTrackForStreamURL
saghul Oct 27, 2025
9ee27cf
pc: add minBitrate to encoding parameters
martinxsliu Feb 19, 2026
8c9fa12
refactor: update event-target-shim imports to remove '/index'
Mar 1, 2026
66b1762
refactor: replace defineEventAttribute with getter/setter methods for…
Mar 2, 2026
28050b4
refactor: update event-target-shim imports to use local vendor path
Mar 13, 2026
5c0d797
style: make eslint happy
Mar 13, 2026
3b59496
chore: ignore src/vendor in eslint
Mar 13, 2026
19fd46d
pc: add mediaConstraints on getDisplayMedia
FredLuart Apr 9, 2026
93693d6
pc: add RTCCertificate support
jiyeyuran Apr 13, 2026
9e116f0
ios: use runtime camera checks on simulator for camera availability
santhoshvai Apr 16, 2026
4fcd94c
android: document how to set audio category to media
msabaeian Jan 4, 2025
04d869e
docs: add PIP note to README
santhoshvai Apr 16, 2026
816a17a
merge: sync merge-base with rn-webrtc/master
santhoshvai Apr 16, 2026
e6b0b41
pc: don't throw when applyConstraints on audio tracks (#29)
davidliu Feb 24, 2025
dffe368
android, ios: remove track from remoteTracks in onRemoveTrack (#6)
davidliu Mar 28, 2024
71992b5
android: only change capture format for screen if dimen actually chan…
davidliu May 25, 2024
75161dc
android,ios: add defaultTrackVolume control to WebRTCModuleOptions (#33)
davidliu Jun 24, 2025
89fd9e1
android,ios: disallow changing cameras through apply constraints (#34)
davidliu Jun 24, 2025
675536b
android,ios: expose needed apis for audio processing (#27)
davidliu Feb 3, 2025
de1875c
android: add registerTrack methods for 3rd party track registration (…
davidliu Apr 6, 2026
fec73db
e2ee ios implementation and other final fixes (#23)
davidliu Dec 16, 2024
d34c032
fix: fix event-target-shim throwing error in RTCFrameCrypto (#25)
davidliu Dec 20, 2024
f0b1961
fix: update RTCFrameCryptor to use vendored event-target-shim
santhoshvai Apr 16, 2026
8d42cd2
ios,android: DataPacketCryptor implementation (#57)
davidliu Sep 18, 2025
46decf0
merge: sync merge-base with livekit/master
santhoshvai Apr 16, 2026
17f2e29
fix: correct import order in RTCFrameCryptor.ts
santhoshvai Apr 16, 2026
51b1298
fix: resolve Android build errors from livekit cherry-picks
santhoshvai Apr 16, 2026
6e40e45
fix: use RTCFrameCryptorState enum names for StreamWebRTC M137
santhoshvai Apr 16, 2026
7b2b3b1
style: run clang-format on all native files
santhoshvai Apr 16, 2026
cfa6824
chore: update package-lock.json after event-target-shim removal
santhoshvai Apr 16, 2026
cb5f26f
chore: add claude skill
santhoshvai Apr 16, 2026
45c9d11
137.1.4-alpha.9
santhoshvai Apr 16, 2026
01c7fbe
revert: remove track cleanup from onRemoveTrack
santhoshvai Apr 16, 2026
819adc0
fix: align RTCFrameCryptor event name with livekit/master
santhoshvai Apr 16, 2026
13d81c7
update skill
santhoshvai Apr 16, 2026
14c182c
137.1.4-alpha.10
santhoshvai Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions .claude/skills/upstream-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Upstream Sync Skill

Sync fork with one or more upstream remotes via cherry-pick + merge-base advance.

## When to use

User says: "sync with upstream", "cherry-pick from X", "merge upstream", or similar.

## Workflow

### Phase 1: Explore divergence

```bash
git fetch <remote>
git log --oneline --right-only <branch>...<remote>/master --no-merges
```

For each upstream-only commit, get files changed:

```bash
git log --right-only <branch>...<remote>/master --no-merges --format="%h %s" | while read hash msg; do
echo "=== $hash $msg ==="; git diff-tree --no-commit-id --name-only -r $hash; echo
done
```

### Phase 2: Triage commits

| Category | Action |
|----------|--------|
| Already in fork | SKIP |
| Release/version bumps | SKIP |
| Lock file only | SKIP |
| Native WebRTC lib version changes | SKIP (fork uses StreamWebRTC) |
| Merge commits | SKIP |
| Cosmetic formatting | SKIP (run formatters separately) |
| Bug fixes | CHERRY-PICK |
| New features | CHERRY-PICK (ask user) |
| Refactoring | CHERRY-PICK (evaluate risk) |
| Docs/CI/tools | Ask user |

Check for equivalents: `git log --oneline --left-only <branch>...<remote>/master | grep -i "<keyword>"`

### Phase 3: Ask user

Present triage. Ask about large/risky features, optional items, anything ambiguous.

### Phase 4: Cherry-pick in order

```bash
git checkout -b sync/upstream-cherry-picks <base-branch>
```

Order: TS fixes → Android fixes → iOS fixes → small features → large features → docs.

If conflict: resolve, `git add`, `git cherry-pick --continue --no-edit`.
If empty after resolution: `git cherry-pick --skip`.

### Phase 5: Merge to advance merge-base

Without this, future merges replay ALL upstream commits including skipped ones.

```bash
git merge <remote>/master --no-commit

# Conflicted files — keep ours
git diff --name-only --diff-filter=U | xargs git checkout --ours
# Files deleted in our branch — remove
git rm <deleted-files>
# Auto-merged files — reset to our version
git diff --cached --name-only --diff-filter=M | xargs git checkout HEAD --
# Unwanted new files from upstream — remove
git diff --cached --name-only --diff-filter=A # review, then:
git rm -f <unwanted-files>

git add -A
git diff --cached --stat HEAD # should be empty or near-empty
git commit -m "merge: sync merge-base with <remote>/master"
```

Verify: `git log --oneline --right-only <branch>...<remote>/master | wc -l` should be `0`.

### Phase 6: Verify

Run ALL of these. Do not skip any.

```bash
npm run lint
cd examples/GumTestApp/android && ./gradlew assembleDebug
cd examples/GumTestApp/ios && pod install && \
xcodebuild -workspace GumTestApp.xcworkspace -scheme GumTestApp \
-sdk iphonesimulator -configuration Debug build
```

### Phase 7: Format native files

```bash
git ls-files | grep -e "\(\.java\|\.h\|\.m\)$" | grep -v examples | xargs npx clang-format -i
```

Rebuild Android + iOS to confirm, then commit.

### Phase 8: Update package-lock.json

If `package.json` dependencies changed, lock file will be stale.

```bash
npm install
git add package-lock.json && git commit -m "chore: update package-lock.json"
```

## Preservation rules

These MUST NOT change during sync:

| File | Guard |
|------|-------|
| `android/build.gradle` | Must keep `io.getstream:stream-video-webrtc-android:*` |
| `stream-react-native-webrtc.podspec` | Must keep `StreamWebRTC` dependency |
| `ios/RCTWebRTC/Utils/AudioDeviceModule/` | Fork's custom audio engine — untouched |
| `SpeechActivityDetector.java` | Fork's custom VAD — untouched |
| `AudioDeviceModule.ts`, `AudioDeviceModuleEvents.ts` | Fork's custom TS APIs — untouched |

Post-sync: `grep -r "org.webrtc:google-webrtc\|webrtc-ios" --include="*.gradle" --include="*.podspec" .` must return nothing.

## Pitfalls

1. **Always run native builds, not just tsc.** Cherry-picks can pass tsc but fail gradlew/xcodebuild.

2. **Native API names differ across WebRTC versions.** Enum values, type names, and method signatures may not exist in our WebRTC SDK. After cherry-picking from a fork on a different WebRTC version, verify types exist before building.

3. **`git add -A` re-adds files you removed.** Use `git rm -f` (not `--cached`) to remove from both index and disk.

4. **Auto-merged files need `git checkout HEAD --`, not `--ours`.** `--ours` only works on conflicted files. For auto-merged files with unwanted changes, use `git checkout HEAD -- <file>`.

5. **Watch for duplicates after conflict resolution.** Duplicate variable declarations, closing braces, or imports when keeping both sides of a conflict.

6. **Advance merge-base for EVERY upstream remote.** If syncing with multiple upstreams, merge each one separately. Otherwise the un-advanced remote replays all its history on the next merge.

7. **Upstream podspec/build files leak into cherry-picks.** Other forks have their own podspec (e.g., `livekit-react-native-webrtc.podspec`). Always `git rm` them when they appear.

8. **Cross-check cherry-picks against all upstreams for reverts.** Before cherry-picking a commit from one upstream, search the other upstreams for the same change — it may have been tried and reverted. Run: `git log --all --oneline -S "<key code snippet>"` to find if the same change exists elsewhere in history with a subsequent revert.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
examples
lib
src/vendor
tools

metro.*.js
Expand Down
49 changes: 49 additions & 0 deletions Documentation/AndroidInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,55 @@ In `android/app/proguard-rules.pro` add the following on a new line.
-keep class org.webrtc.** { *; }
```

## Set audio category (output) to media

The audio is considered calls by default. If you don't want your audio to be treated as a call stream you need to change the category. To set the category:

if your Android files are written in Java, modify `MainApplication.java`:
```java
// add imports
import com.oney.WebRTCModule.WebRTCModuleOptions;
import android.media.AudioAttributes;
import org.webrtc.audio.JavaAudioDeviceModule;

public class MainApplication extends Application implements ReactApplication {
@Override
public void onCreate() {
// append this before WebRTCModule initializes
WebRTCModuleOptions options = WebRTCModuleOptions.getInstance();
AudioAttributes audioAttributes = AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_MEDIA)
.setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
.build();
options.audioDeviceModule = JavaAudioDeviceModule.builder(this)
.setAudioAttributes(audioAttributes)
.createAudioDeviceModule();
}
}
```

if your Android files are written in Kotlin, modify `MainApplication.kt`:
```kt
// add imports
import com.oney.WebRTCModule.WebRTCModuleOptions;
import android.media.AudioAttributes
import org.webrtc.audio.JavaAudioDeviceModule;

class MainApplication : Application(), ReactApplication {
override fun onCreate() {
// append this before WebRTCModule initializes
val options = WebRTCModuleOptions.getInstance()
val audioAttributes = AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_MEDIA)
.setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
.build()
options.audioDeviceModule = JavaAudioDeviceModule.builder(this)
.setAudioAttributes(audioAttributes)
.createAudioDeviceModule()
}
}
```

## Fatal Exception: java.lang.UnsatisfiedLinkError

```
Expand Down
24 changes: 19 additions & 5 deletions Documentation/BasicUsage.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,22 @@ try {
};
```

### Using Media Constraints on getDisplayMedia (Android Only)

It is possible to use mediaConstraints on getDisplayMedia to restricts the user to capturing the default display using the custom boolean parameter `createConfigForDefaultDisplay`.
A resolution scale can also be applied using `resolutionScale` parameter. Value is a number between 0 and 1.

This configuration in only available for android, so will you have to add the 'android' key in constraints.

```javascript
const displayMediaStreamConstraints = {
android: {
createConfigForDefaultDisplay: true,
resolutionScale: 0.5,
},
};
```

## Destroying the Media Stream

Cycling all of the tracks and stopping them is more than enough to clean up after a call has finished.
Expand Down Expand Up @@ -232,11 +248,9 @@ That will allow you to enable and disable video streams on demand while a call i

```javascript
let sessionConstraints = {
mandatory: {
OfferToReceiveAudio: true,
OfferToReceiveVideo: true,
VoiceActivityDetection: true
}
offerToReceiveAudio: true,
offerToReceiveVideo: true,
voiceActivityDetection: true
};
```

Expand Down
8 changes: 3 additions & 5 deletions Documentation/CallGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,9 @@ So you can now start creating an offer which then needs sending send off to the

```javascript
let sessionConstraints = {
mandatory: {
OfferToReceiveAudio: true,
OfferToReceiveVideo: true,
VoiceActivityDetection: true
}
offerToReceiveAudio: true,
offerToReceiveVideo: true,
voiceActivityDetection: true
};

try {
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ Don't worry, there are plans to include a much more broader example with backend
Come join our [Discourse Community](https://react-native-webrtc.discourse.group/) if you want to discuss any React Native and WebRTC related topics.
Everyone is welcome and every little helps.

## Picture-in-Picture (PIP)

This package does not include a built-in PIP implementation. PIP support is available via [`@stream-io/video-react-native-sdk`](https://github.com/GetStream/stream-video-js).

## Related Projects

Looking for extra functionality coverage?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public boolean stopCapture() {

public void applyConstraints(ReadableMap constraints, @Nullable Consumer<Exception> onFinishedCallback) {
if (onFinishedCallback != null) {
onFinishedCallback.accept(new UnsupportedOperationException("This video track does not support applyConstraints."));
onFinishedCallback.accept(
new UnsupportedOperationException("This video track does not support applyConstraints."));
}
}

Expand Down
Loading
Loading