Skip to content

Commit

Permalink
Not showing preview view for simulator per review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
piyushtank committed Sep 17, 2016
1 parent bd3596d commit bb3be0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
5 changes: 2 additions & 3 deletions VideoQuickStart/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -146,22 +145,22 @@
<constraints>
<constraint firstItem="jgR-Qy-dC6" firstAttribute="top" secondItem="Zud-AS-DEE" secondAttribute="bottom" constant="21" id="0Am-2H-kE1"/>
<constraint firstItem="3if-kg-Wlo" firstAttribute="top" secondItem="8oD-ke-cGW" secondAttribute="bottom" id="0r4-Df-8Yo"/>
<constraint firstItem="krA-sT-Z3g" firstAttribute="bottom" secondItem="EzF-II-Eia" secondAttribute="bottom" id="1E1-8d-LeR"/>
<constraint firstItem="krA-sT-Z3g" firstAttribute="leading" secondItem="3Bh-pO-6uY" secondAttribute="leadingMargin" constant="-5" id="4jO-qh-yH2"/>
<constraint firstItem="7dZ-Ur-uSj" firstAttribute="top" secondItem="Zud-AS-DEE" secondAttribute="bottom" id="AaN-mH-AYD"/>
<constraint firstItem="rwp-9E-VzS" firstAttribute="bottom" secondItem="EzF-II-Eia" secondAttribute="baseline" id="CP6-bn-3PP"/>
<constraint firstItem="jgR-Qy-dC6" firstAttribute="top" secondItem="EkL-i8-cDP" secondAttribute="bottom" constant="16" id="FAy-WH-Wvc"/>
<constraint firstAttribute="leadingMargin" secondItem="7dZ-Ur-uSj" secondAttribute="leading" id="OQz-Cn-mbU"/>
<constraint firstItem="ebq-ja-6iU" firstAttribute="leading" secondItem="3Bh-pO-6uY" secondAttribute="leading" id="OWm-Gg-PVO"/>
<constraint firstItem="rwp-9E-VzS" firstAttribute="leading" secondItem="krA-sT-Z3g" secondAttribute="trailing" constant="10" id="Sxy-CE-DSM"/>
<constraint firstItem="Zud-AS-DEE" firstAttribute="centerY" secondItem="3Bh-pO-6uY" secondAttribute="centerY" constant="-40" id="W6X-SU-S4S"/>
<constraint firstItem="EkL-i8-cDP" firstAttribute="leading" secondItem="Zud-AS-DEE" secondAttribute="trailing" constant="21" id="Xef-61-OpD"/>
<constraint firstItem="rwp-9E-VzS" firstAttribute="baseline" secondItem="krA-sT-Z3g" secondAttribute="baseline" id="Ys0-ne-Y8P"/>
<constraint firstAttribute="leadingMargin" secondItem="jgR-Qy-dC6" secondAttribute="leading" id="bOl-NA-2zy"/>
<constraint firstAttribute="trailingMargin" secondItem="jgR-Qy-dC6" secondAttribute="trailing" id="dqW-B2-5zF"/>
<constraint firstAttribute="trailing" secondItem="ebq-ja-6iU" secondAttribute="trailing" id="eiL-ob-cD1"/>
<constraint firstItem="tZu-uw-hgi" firstAttribute="top" secondItem="3if-kg-Wlo" secondAttribute="bottom" id="elL-tm-a5C"/>
<constraint firstItem="tZu-uw-hgi" firstAttribute="top" secondItem="EzF-II-Eia" secondAttribute="bottom" constant="10" id="ig1-ch-peS"/>
<constraint firstAttribute="trailingMargin" secondItem="EkL-i8-cDP" secondAttribute="trailing" id="lhs-bL-0xl"/>
<constraint firstItem="tZu-uw-hgi" firstAttribute="top" secondItem="krA-sT-Z3g" secondAttribute="bottom" constant="10" id="mOt-mS-dXh"/>
<constraint firstAttribute="trailingMargin" secondItem="7dZ-Ur-uSj" secondAttribute="trailing" id="nNa-6o-3I1"/>
<constraint firstAttribute="trailing" secondItem="3if-kg-Wlo" secondAttribute="trailing" id="nQ3-6a-K8r"/>
<constraint firstItem="ebq-ja-6iU" firstAttribute="top" secondItem="8oD-ke-cGW" secondAttribute="bottom" id="sqw-S7-DJO"/>
Expand Down
13 changes: 8 additions & 5 deletions VideoQuickStart/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ class ViewController: UIViewController, UITextFieldDelegate {
// LocalMedia represents the collection of tracks that we are sending to other Participants from our VideoClient.
localMedia = TVILocalMedia()

// Preview our local camera track in the local video preview view.
self.startPreview()
if PlatformUtils.isSimulator {
self.previewView.removeFromSuperview()
} else {
// Preview our local camera track in the local video preview view.
self.startPreview()
}

// Disconnect and mic button will be displayed when client is connected to a room.
self.disconnectButton.isHidden = true
Expand Down Expand Up @@ -129,9 +133,8 @@ class ViewController: UIViewController, UITextFieldDelegate {
// We will set the prepared local media in connect options.
builder.localMedia = self.localMedia;

// Room where where client will attempt to connect to. Please note that if you pass an empty room `name`,
// client will create a room for you. You can get room's name/sid by quierrying name property on Room
// `connect` API returns.
// The name of the Room where the Client will attempt to connect to. Please note that if you pass an empty
// Room `name`, the Client will create one for you. You can get the name or sid from any connected Room.
builder.name = self.roomTextField.text
}

Expand Down

0 comments on commit bb3be0c

Please sign in to comment.