Index: webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
diff --git a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
index 0492733b8726e8420a45cb53f393c43361896abe..2b6ccad8e15c8d80ec9fd82e1dcc25baf94995af 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" |
@@ -532,8 +533,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; |
@@ -687,7 +694,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]; |