Index: webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
diff --git a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
index c1347f2faad420f5bc68b5bf4bfb231cb117be68..cedc4bf1a47a7da6f14afb4839564e3c4ca5ab70 100644 |
--- a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
+++ b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
@@ -25,6 +25,7 @@ |
#import "WebRTC/RTCVideoTrack.h" |
#import "ARDAppEngineClient.h" |
+#import "ARDBitrateAllocationStrategy.h" |
#import "ARDJoinResponse.h" |
#import "ARDMessageResponse.h" |
#import "ARDSDPUtils.h" |
@@ -531,8 +532,14 @@ static int const kKbpsMultiplier = 1000; |
_peerConnection = [_factory peerConnectionWithConfiguration:config |
constraints:constraints |
delegate:self]; |
+ |
+ // Create bitrate allocation strategy |
+ [ARDBitrateAllocationStrategy setAudioPriorityStrategy:_peerConnection |
+ audioTrackId:kARDAudioTrackId]; |
+ |
// Create AV senders. |
[self createMediaSenders]; |
+ |
if (_isInitiator) { |
// Send offer. |
__weak ARDAppClient *weakSelf = self; |
@@ -686,7 +693,7 @@ static int const kKbpsMultiplier = 1000; |
RTCMediaStream *stream = [_factory mediaStreamWithStreamId:kARDMediaStreamId]; |
[stream addAudioTrack:track]; |
_localVideoTrack = [self createLocalVideoTrack]; |
- if(_localVideoTrack) { |
+ if (_localVideoTrack) { |
[stream addVideoTrack:_localVideoTrack]; |
} |
[_peerConnection addStream:stream]; |