react-native-webrtc / react-native-webrtc/react-native-incall-manager
IOS 26 is freezing
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 597
- Forks
- 201
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 1
Description
FIX.
SpeakerModule.swift
import Foundation
import AVFoundation
@objc(SpeakerModule)
class SpeakerModule: NSObject {
@objc(setSpeaker:)
func setSpeaker(_ enable: Bool) {
let session = AVAudioSession.sharedInstance()
do {
try session.setCategory(.playAndRecord,
mode: .voiceChat,
options: [.allowBluetooth, .defaultToSpeaker])
try session.setActive(true)
if enable {
try session.overrideOutputAudioPort(.speaker)
} else {
try session.overrideOutputAudioPort(.none)
}
} catch {
print("Error setting speaker: \(error)")
}
}
}
SpeakerModule.m
#import <React/RCTBridgeModule.h>
@interface RCT_EXTERN_MODULE(SpeakerModule, NSObject)
RCT_EXTERN_METHOD(setSpeaker:(BOOL)enable)
@end
add this native files , import in files
Simply use SpeakerModule.setSpeaker(true);
it works. Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the proposed SpeakerModule.swift and SpeakerModule.m files and determine where they should be added and imported in the React Native project. Reproduce the iOS 26 freezing behavior, then verify that the native setSpeaker method is exposed and that speaker routing works without freezing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c, react-native, swift
- Domain
- audio-video-rtc, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100