AppRTCDemo(iOS): now works in the iOS Simulator!
...which has no camera device emulation or pass-through, so no local video view. R=noahric@google.com Review URL: https://webrtc-codereview.appspot.com/10919004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5815 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
61e78fca6c
commit
49c5ba32bb
@ -142,6 +142,8 @@ class CallbackConverter : public webrtc::VideoRendererInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)stop {
|
- (void)stop {
|
||||||
|
[_activityIndicator stopAnimating];
|
||||||
|
[_activityIndicator removeFromSuperview];
|
||||||
_iosRenderer->StopRender();
|
_iosRenderer->StopRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,6 +247,11 @@
|
|||||||
RTCMediaStream* lms =
|
RTCMediaStream* lms =
|
||||||
[self.peerConnectionFactory mediaStreamWithLabel:@"ARDAMS"];
|
[self.peerConnectionFactory mediaStreamWithLabel:@"ARDAMS"];
|
||||||
|
|
||||||
|
// The iOS simulator doesn't provide any sort of camera capture
|
||||||
|
// support or emulation (http://goo.gl/rHAnC1) so don't bother
|
||||||
|
// trying to open a local stream.
|
||||||
|
RTCVideoTrack* localVideoTrack;
|
||||||
|
#if !TARGET_IPHONE_SIMULATOR
|
||||||
NSString* cameraID = nil;
|
NSString* cameraID = nil;
|
||||||
for (AVCaptureDevice* captureDevice in
|
for (AVCaptureDevice* captureDevice in
|
||||||
[AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]) {
|
[AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]) {
|
||||||
@ -262,12 +267,13 @@
|
|||||||
self.videoSource = [self.peerConnectionFactory
|
self.videoSource = [self.peerConnectionFactory
|
||||||
videoSourceWithCapturer:capturer
|
videoSourceWithCapturer:capturer
|
||||||
constraints:self.client.videoConstraints];
|
constraints:self.client.videoConstraints];
|
||||||
RTCVideoTrack* localVideoTrack =
|
localVideoTrack =
|
||||||
[self.peerConnectionFactory videoTrackWithID:@"ARDAMSv0"
|
[self.peerConnectionFactory videoTrackWithID:@"ARDAMSv0"
|
||||||
source:self.videoSource];
|
source:self.videoSource];
|
||||||
if (localVideoTrack) {
|
if (localVideoTrack) {
|
||||||
[lms addVideoTrack:localVideoTrack];
|
[lms addVideoTrack:localVideoTrack];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
[self.viewController.localVideoView
|
[self.viewController.localVideoView
|
||||||
renderVideoTrackInterface:localVideoTrack];
|
renderVideoTrackInterface:localVideoTrack];
|
||||||
|
Loading…
Reference in New Issue
Block a user