Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ jobs:
android-compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Install node modules
run: npm install

- name: Install example node modules
run: npm install
working-directory: ./examples/GumTestApp/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 22
- run: npm install
- name: Check if the git repository is clean
run: $(exit $(git status --porcelain --untracked-files=no | head -255 | wc -l)) || (echo "Dirty git tree"; git diff; exit 1)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ios_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
ios-compile:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Cache cocoapods
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./examples/GumTestApp/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v22
5 changes: 3 additions & 2 deletions android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ public void transceiverSetDirection(int id, String senderId, String direction, P
}

@ReactMethod(isBlockingSynchronousMethod = true)
public void transceiverSetCodecPreferences(int id, String senderId, ReadableArray codecPreferences) {
public boolean transceiverSetCodecPreferences(int id, String senderId, ReadableArray codecPreferences) {
ThreadUtils.runOnExecutor(() -> {
WritableMap identifier = Arguments.createMap();
WritableMap params = Arguments.createMap();
Expand Down Expand Up @@ -774,6 +774,7 @@ public void transceiverSetCodecPreferences(int id, String senderId, ReadableArra
Log.d(TAG, "transceiverSetCodecPreferences(): " + e.getMessage());
}
});
return true;
}

@ReactMethod
Expand Down Expand Up @@ -1313,7 +1314,7 @@ public void peerConnectionAddICECandidate(int pcId, ReadableMap candidateMap, Pr
candidateMap.hasKey("sdpMid") && !candidateMap.isNull("sdpMid") ? candidateMap.getString("sdpMid") : "",
candidateMap.hasKey("sdpMLineIndex") && !candidateMap.isNull("sdpMLineIndex") ? candidateMap.getInt("sdpMLineIndex") : 0,
candidateMap.getString("candidate"));

peerConnection.addIceCandidate(candidate, new AddIceObserver() {
@Override
public void onAddSuccess() {
Expand Down
9 changes: 2 additions & 7 deletions examples/GumTestApp/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/

import React, {useState} from 'react';
import {
Button,
Expand All @@ -14,18 +12,15 @@ import {
View,
StatusBar,
} from 'react-native';
import { Colors } from 'react-native/Libraries/NewAppScreen';
import { mediaDevices, RTCView } from '@stream-io/react-native-webrtc';


const App = () => {
const [stream, setStream] = useState(null);
const start = async () => {
console.log('start');
if (!stream) {
try {
const s = await mediaDevices.getUserMedia({ video: true });

setStream(s);
} catch(e) {
console.error(e);
Expand Down Expand Up @@ -79,14 +74,14 @@ const App = () => {

const styles = StyleSheet.create({
body: {
backgroundColor: Colors.white,
backgroundColor: '#fff',
...StyleSheet.absoluteFill
},
stream: {
flex: 1
},
footer: {
backgroundColor: Colors.lighter,
backgroundColor: '#f8f8f8',
position: 'absolute',
bottom: 0,
left: 0,
Expand Down
6 changes: 3 additions & 3 deletions examples/GumTestApp/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ def enableProguardInReleaseBuilds = false
* The preferred build flavor of JavaScriptCore (JSC)
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
* `def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'

/**
* Private function to get the list of Native Architectures you want to build.
Expand Down Expand Up @@ -126,4 +126,4 @@ dependencies {
} else {
implementation jscFlavor
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import android.app.Application
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeApplicationEntryPoint
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader

class MainApplication : Application(), ReactApplication {

Expand All @@ -35,10 +33,6 @@ class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
ReactNativeApplicationEntryPoint.loadReactNative(this);
}
}
10 changes: 4 additions & 6 deletions examples/GumTestApp/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ buildscript {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34

ndkVersion = "26.1.10909125"
ndkVersion = "23.1.7779620"
kotlinVersion = "1.9.24"
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.1.20"
}
repositories {
google()
Expand All @@ -28,4 +26,4 @@ allprojects {
}
}

apply plugin: "com.facebook.react.rootproject"
apply plugin: "com.facebook.react.rootproject"
2 changes: 1 addition & 1 deletion examples/GumTestApp/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
newArchEnabled=true

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Dec 17 09:35:10 CET 2024
#Tue Jul 22 11:35:24 CEST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
56 changes: 56 additions & 0 deletions examples/GumTestApp/ios/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//
// AppDelegate.swift
// GumTestApp
//
// Created by Oliver Lazoroski on 22.7.25.
//


import UIKit
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

var reactNativeDelegate: ReactNativeDelegate?
var reactNativeFactory: RCTReactNativeFactory?

func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
let delegate = ReactNativeDelegate()
let factory = RCTReactNativeFactory(delegate: delegate)
delegate.dependencyProvider = RCTAppDependencyProvider()

reactNativeDelegate = delegate
reactNativeFactory = factory

window = UIWindow(frame: UIScreen.main.bounds)

factory.startReactNative(
withModuleName: "GumTestApp",
in: window,
launchOptions: launchOptions
)

return true
}
}

class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}

override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
}
4 changes: 4 additions & 0 deletions examples/GumTestApp/ios/GumTestApp-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

4 changes: 4 additions & 0 deletions examples/GumTestApp/ios/GumTestApp-tvOS-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

2 changes: 2 additions & 0 deletions examples/GumTestApp/ios/GumTestApp-tvOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>RCTNewArchEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
24 changes: 0 additions & 24 deletions examples/GumTestApp/ios/GumTestApp-tvOSTests/Info.plist

This file was deleted.

Loading
Loading