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
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,15 @@ void setVideoEffects(String trackId, ReadableArray names) {
}
}

void registerTrack(AudioTrack track, AudioSource source) {
tracks.put(track.id(), new TrackPrivate(track, source, null, null));
}

void registerTrack(VideoTrack track, VideoSource source, AbstractVideoCaptureController controller,
SurfaceTextureHelper surfaceTextureHelper) {
tracks.put(track.id(), new TrackPrivate(track, source, controller, surfaceTextureHelper));
}

/**
* Application/library-specific private members of local
* {@code MediaStreamTrack}s created by {@code GetUserMediaImpl}.
Expand Down
9 changes: 9 additions & 0 deletions android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,15 @@ public VideoTrack createVideoTrack(AbstractVideoCaptureController videoCaptureCo
return getUserMediaImpl.createVideoTrack(videoCaptureController);
}

public void registerTrack(AudioTrack track, AudioSource source) {
getUserMediaImpl.registerTrack(track, source);
}

public void registerTrack(VideoTrack track, VideoSource source, AbstractVideoCaptureController controller,
SurfaceTextureHelper surfaceTextureHelper) {
getUserMediaImpl.registerTrack(track, source, controller, surfaceTextureHelper);
}

public void createStream(
MediaStreamTrack[] tracks, GetUserMediaImpl.BiConsumer<String, ArrayList<WritableMap>> successCallback) {
getUserMediaImpl.createStream(tracks, successCallback);
Expand Down
5 changes: 4 additions & 1 deletion examples/GumTestApp/ios/GumTestApp/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>

#import "WebRTCModuleOptions.h"
@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Expand All @@ -10,6 +10,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = @{};

WebRTCModuleOptions* options = [WebRTCModuleOptions sharedInstance];
options.enableMultitaskingCameraAccess = true;

return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
Expand Down
1 change: 1 addition & 0 deletions examples/GumTestApp/ios/GumTestApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>voip</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
Expand Down
Loading