Index: talk/app/webrtc/java/src/org/webrtc/PeerConnection.java |
diff --git a/talk/app/webrtc/java/src/org/webrtc/PeerConnection.java b/talk/app/webrtc/java/src/org/webrtc/PeerConnection.java |
index 50023001d724b12b8da0b8d97704bd36020a6895..f235370b67915137d345c649f38b122e5eefa4b6 100644 |
--- a/talk/app/webrtc/java/src/org/webrtc/PeerConnection.java |
+++ b/talk/app/webrtc/java/src/org/webrtc/PeerConnection.java |
@@ -28,7 +28,6 @@ |
package org.webrtc; |
-import java.util.ArrayList; |
import java.util.Collections; |
import java.util.LinkedList; |
import java.util.List; |
@@ -223,6 +222,14 @@ public class PeerConnection { |
localStreams.remove(stream); |
} |
+ public RtpSender createSender(String kind) { |
pthatcher1
2015/12/02 19:17:06
Should we put a comment saying that it can return
|
+ RtpSender new_sender = nativeCreateSender(kind); |
pthatcher1
2015/12/02 19:17:06
Why not just "sender"?
|
+ if (new_sender != null) { |
+ senders.add(new_sender); |
+ } |
+ return new_sender; |
+ } |
+ |
// Note that calling getSenders will dispose of the senders previously |
// returned (and same goes for getReceivers). |
public List<RtpSender> getSenders() { |
@@ -288,6 +295,8 @@ public class PeerConnection { |
private native boolean nativeGetStats( |
StatsObserver observer, long nativeTrack); |
+ private native RtpSender nativeCreateSender(String kind); |
+ |
private native List<RtpSender> nativeGetSenders(); |
private native List<RtpReceiver> nativeGetReceivers(); |