зеркало из https://github.com/nextcloud/talk-ios.git
Add specific button to go back to call.
Add animation for showing/hiding call buttons. Show navigation bar in chats presented in calls (to allow room moderation or just showing room info). Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
f9b7421c24
Коммит
40b5910e3e
|
@ -43,6 +43,7 @@
|
|||
@property (nonatomic, strong) IBOutlet RTCCameraPreviewView *localVideoView;
|
||||
@property (nonatomic, strong) IBOutlet UIView *screensharingView;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *closeScreensharingButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *backToCallButton;
|
||||
@property (nonatomic, strong) IBOutlet UIView *waitingView;
|
||||
@property (nonatomic, strong) IBOutlet AvatarBackgroundImageView *avatarBackgroundImageView;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *waitingLabel;
|
||||
|
|
|
@ -57,7 +57,7 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
NSMutableDictionary *_videoRenderersDict;
|
||||
NSMutableDictionary *_screenRenderersDict;
|
||||
NCCallController *_callController;
|
||||
NCChatViewController *_chatViewController;
|
||||
UINavigationController *_chatNavigationController;
|
||||
ARDCaptureController *_captureController;
|
||||
UIView <RTCVideoRenderer> *_screenView;
|
||||
CGSize _screensharingSize;
|
||||
|
@ -150,8 +150,11 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
[self.hangUpButton.layer setCornerRadius:30.0f];
|
||||
[self.videoCallButton.layer setCornerRadius:30.0f];
|
||||
[self.chatButton.layer setCornerRadius:30.0f];
|
||||
[self.backToCallButton.layer setCornerRadius:30.0f];
|
||||
[self.closeScreensharingButton.layer setCornerRadius:16.0f];
|
||||
|
||||
[self.backToCallButton setHidden:YES];
|
||||
|
||||
self.audioMuteButton.accessibilityLabel = NSLocalizedString(@"Microphone", nil);
|
||||
self.audioMuteButton.accessibilityValue = NSLocalizedString(@"Microphone enabled", nil);
|
||||
self.audioMuteButton.accessibilityHint = NSLocalizedString(@"Double tap to enable or disable the microphone", nil);
|
||||
|
@ -167,6 +170,8 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
self.videoCallButton.accessibilityHint = NSLocalizedString(@"Double tap to upgrade this voice call to a video call", nil);
|
||||
self.chatButton.accessibilityLabel = NSLocalizedString(@"Chat", nil);
|
||||
self.chatButton.accessibilityHint = NSLocalizedString(@"Double tap to show call's chat", nil);
|
||||
self.backToCallButton.accessibilityLabel = NSLocalizedString(@"Back to call", nil);
|
||||
self.backToCallButton.accessibilityHint = NSLocalizedString(@"Double tap to go back to the call", nil);
|
||||
|
||||
[self adjustButtonsConainer];
|
||||
|
||||
|
@ -201,7 +206,7 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
}
|
||||
[self resizeScreensharingView];
|
||||
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
|
||||
[self setHaloToChatButton];
|
||||
[self setHaloToBackToCallButton];
|
||||
}];
|
||||
}
|
||||
|
||||
|
@ -235,7 +240,7 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
- (void)pressesBegan:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
|
||||
{
|
||||
// No push-to-talk while in chat
|
||||
if (!_chatViewController) {
|
||||
if (!_chatNavigationController) {
|
||||
for (UIPress* press in presses) {
|
||||
if (press.key.keyCode == UIKeyboardHIDUsageKeyboardSpacebar) {
|
||||
[self pushToTalkStart];
|
||||
|
@ -251,7 +256,7 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
- (void)pressesEnded:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
|
||||
{
|
||||
// No push-to-talk while in chat
|
||||
if (!_chatViewController) {
|
||||
if (!_chatNavigationController) {
|
||||
for (UIPress* press in presses) {
|
||||
if (press.key.keyCode == UIKeyboardHIDUsageKeyboardSpacebar) {
|
||||
[self pushToTalkEnd];
|
||||
|
@ -538,41 +543,38 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
|
||||
- (void)showButtonsContainer
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[UIView animateWithDuration:0.3f animations:^{
|
||||
[self.audioMuteButton setAlpha:1.0f];
|
||||
[self.hangUpButton setAlpha:1.0f];
|
||||
[self.speakerButton setAlpha:1.0f];
|
||||
[self.videoDisableButton setAlpha:1.0f];
|
||||
|
||||
[self.switchCameraButton setAlpha:1.0f];
|
||||
[self.videoCallButton setAlpha:1.0f];
|
||||
[self.closeScreensharingButton setAlpha:1.0f];
|
||||
[self.chatButton setAlpha:1.0f];
|
||||
[self.view layoutIfNeeded];
|
||||
}];
|
||||
});
|
||||
if (!CGRectContainsRect(self.view.bounds, self.buttonsContainerView.frame)) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
CGRect buttonsFrame = self.buttonsContainerView.frame;
|
||||
buttonsFrame.origin.y -= buttonsFrame.size.height + 20;
|
||||
self.buttonsContainerView.frame = buttonsFrame;
|
||||
}];
|
||||
[UIView animateWithDuration:0.3f animations:^{
|
||||
[self.switchCameraButton setAlpha:1.0f];
|
||||
[self.closeScreensharingButton setAlpha:1.0f];
|
||||
[self.view layoutIfNeeded];
|
||||
}];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
- (void)hideButtonsContainer
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[UIView animateWithDuration:0.3f animations:^{
|
||||
if (self->_callController && [self->_callController isAudioEnabled]) {
|
||||
[self.audioMuteButton setAlpha:0.0f];
|
||||
}
|
||||
|
||||
[self.hangUpButton setAlpha:0.0f];
|
||||
[self.speakerButton setAlpha:0.0f];
|
||||
[self.videoDisableButton setAlpha:0.0f];
|
||||
|
||||
[self.switchCameraButton setAlpha:0.0f];
|
||||
[self.videoCallButton setAlpha:0.0f];
|
||||
[self.closeScreensharingButton setAlpha:0.0f];
|
||||
[self.chatButton setAlpha:(self->_chatViewController) ? 1.0f : 0.0f];
|
||||
[self.view layoutIfNeeded];
|
||||
}];
|
||||
});
|
||||
if (CGRectContainsRect(self.view.bounds, self.buttonsContainerView.frame)) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
CGRect buttonsFrame = self.buttonsContainerView.frame;
|
||||
buttonsFrame.origin.y += buttonsFrame.size.height + 20;
|
||||
self.buttonsContainerView.frame = buttonsFrame;
|
||||
}];
|
||||
[UIView animateWithDuration:0.3f animations:^{
|
||||
[self.switchCameraButton setAlpha:0.0f];
|
||||
[self.closeScreensharingButton setAlpha:0.0f];
|
||||
[self.view layoutIfNeeded];
|
||||
}];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
- (void)adjustButtonsConainer
|
||||
|
@ -581,16 +583,19 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
_videoDisableButton.hidden = YES;
|
||||
_switchCameraButton.hidden = YES;
|
||||
_videoCallButton.hidden = NO;
|
||||
// Align audio - video - speaker buttons
|
||||
CGRect audioButtonFrame = _audioMuteButton.frame;
|
||||
audioButtonFrame.origin.y = 10;
|
||||
_audioMuteButton.frame = audioButtonFrame;
|
||||
CGRect speakerButtonFrame = _speakerButton.frame;
|
||||
speakerButtonFrame.origin.y = 10;
|
||||
_speakerButton.frame = speakerButtonFrame;
|
||||
} else {
|
||||
_speakerButton.hidden = YES;
|
||||
_videoCallButton.hidden = YES;
|
||||
// Center audio - video - chat buttons
|
||||
CGRect audioButtonFrame = _audioMuteButton.frame;
|
||||
audioButtonFrame.origin.x = 40;
|
||||
_audioMuteButton.frame = audioButtonFrame;
|
||||
CGRect videoButtonFrame = _videoDisableButton.frame;
|
||||
videoButtonFrame.origin.x = 130;
|
||||
_videoDisableButton.frame = videoButtonFrame;
|
||||
CGRect chatButtonFrame = _chatButton.frame;
|
||||
chatButtonFrame.origin.x = 220;
|
||||
_chatButton.frame = chatButtonFrame;
|
||||
}
|
||||
|
||||
// Enable speaker button for iPhones only
|
||||
|
@ -893,35 +898,40 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
[self toggleChatView];
|
||||
}
|
||||
|
||||
- (IBAction)backToChatButtonPressed:(id)sender
|
||||
{
|
||||
[self toggleChatView];
|
||||
}
|
||||
|
||||
- (void)toggleChatView
|
||||
{
|
||||
if (!_chatViewController) {
|
||||
_chatViewController = [[NCChatViewController alloc] initForRoom:_room];
|
||||
[self addChildViewController:_chatViewController];
|
||||
if (!_chatNavigationController) {
|
||||
NCChatViewController *chatViewController = [[NCChatViewController alloc] initForRoom:_room];
|
||||
chatViewController.presentedInCall = YES;
|
||||
_chatNavigationController = [[UINavigationController alloc] initWithRootViewController:chatViewController];
|
||||
[self addChildViewController:_chatNavigationController];
|
||||
|
||||
[self.view addSubview:_chatViewController.view];
|
||||
_chatViewController.view.frame = self.view.bounds;
|
||||
_chatViewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
[_chatViewController didMoveToParentViewController:self];
|
||||
[self.view addSubview:_chatNavigationController.view];
|
||||
_chatNavigationController.view.frame = self.view.bounds;
|
||||
_chatNavigationController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
[_chatNavigationController didMoveToParentViewController:self];
|
||||
|
||||
_chatButton.backgroundColor = [UIColor lightGrayColor];
|
||||
[_chatButton setImage:[UIImage imageNamed:@"phone"] forState:UIControlStateNormal];
|
||||
[self setHaloToBackToCallButton];
|
||||
|
||||
[self setHaloToChatButton];
|
||||
|
||||
[self.view bringSubviewToFront:_chatButton];
|
||||
[_backToCallButton setHidden:NO];
|
||||
[self.view bringSubviewToFront:_backToCallButton];
|
||||
if (!_isAudioOnly) {
|
||||
[self.view bringSubviewToFront:_localVideoView];
|
||||
}
|
||||
} else {
|
||||
_chatButton.backgroundColor = [UIColor colorWithRed:155/255.f green:155/255.f blue:155/255.f alpha:0.75];
|
||||
[_chatButton setImage:[UIImage imageNamed:@"chat"] forState:UIControlStateNormal];
|
||||
[_backToCallButton setHidden:YES];
|
||||
[_halo removeFromSuperlayer];
|
||||
|
||||
[_chatViewController willMoveToParentViewController:nil];
|
||||
[_chatViewController.view removeFromSuperview];
|
||||
[_chatViewController removeFromParentViewController];
|
||||
[_chatNavigationController willMoveToParentViewController:nil];
|
||||
[_chatNavigationController.view removeFromSuperview];
|
||||
[_chatNavigationController removeFromParentViewController];
|
||||
|
||||
_chatViewController = nil;
|
||||
_chatNavigationController = nil;
|
||||
|
||||
if ((!_isAudioOnly && _callState == CallStateInCall) || _screenView) {
|
||||
[self showDetailedViewWithTimer];
|
||||
|
@ -929,20 +939,20 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setHaloToChatButton
|
||||
- (void)setHaloToBackToCallButton
|
||||
{
|
||||
[_halo removeFromSuperlayer];
|
||||
|
||||
if (_chatViewController) {
|
||||
if (_chatNavigationController) {
|
||||
_halo = [PulsingHaloLayer layer];
|
||||
_halo.position = _chatButton.center;
|
||||
_halo.position = _backToCallButton.center;
|
||||
UIColor *color = [UIColor colorWithRed:118/255.f green:213/255.f blue:114/255.f alpha:1];
|
||||
_halo.backgroundColor = color.CGColor;
|
||||
_halo.radius = 40.0;
|
||||
_halo.haloLayerNumber = 2;
|
||||
_halo.keyTimeForHalfOpacity = 0.75;
|
||||
_halo.fromValueForRadius = 0.75;
|
||||
[_chatViewController.view.layer addSublayer:_halo];
|
||||
[_chatNavigationController.view.layer addSublayer:_halo];
|
||||
[_halo start];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
@ -14,6 +12,7 @@
|
|||
<connections>
|
||||
<outlet property="audioMuteButton" destination="kDR-Ds-I7B" id="9NJ-iO-JMY"/>
|
||||
<outlet property="avatarBackgroundImageView" destination="H1v-6g-V21" id="ASI-wy-zPa"/>
|
||||
<outlet property="backToCallButton" destination="vBI-Mz-P4p" id="6Qf-xN-Y54"/>
|
||||
<outlet property="buttonsContainerView" destination="ybF-7q-HlR" id="8Mk-fB-QML"/>
|
||||
<outlet property="chatButton" destination="iRE-oh-vZ4" id="EfP-bT-Oeo"/>
|
||||
<outlet property="closeScreensharingButton" destination="N0N-Ny-Aeg" id="NrD-JV-Hec"/>
|
||||
|
@ -50,20 +49,6 @@
|
|||
<outlet property="delegate" destination="-1" id="rTW-Ir-7cH"/>
|
||||
</connections>
|
||||
</collectionView>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TXj-7E-NAa" userLabel="localVideo" customClass="RTCCameraPreviewView">
|
||||
<rect key="frame" x="16" y="80" width="90" height="120"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mf3-yk-Olo">
|
||||
<rect key="frame" x="25" y="80" width="40" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<state key="normal" image="switch-camera"/>
|
||||
<connections>
|
||||
<action selector="switchCameraButtonPressed:" destination="-1" eventType="touchUpInside" id="SJb-T1-tkb"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zzc-Pq-hMC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
|
@ -78,53 +63,34 @@
|
|||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<viewLayoutGuide key="safeArea" id="j53-tu-e0T"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iRE-oh-vZ4">
|
||||
<rect key="frame" x="307" y="80" width="60" height="60"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vBI-Mz-P4p">
|
||||
<rect key="frame" x="305" y="80" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.60784313729999995" green="0.60784313729999995" blue="0.60784313729999995" alpha="0.74973244859999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" image="chat"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<state key="normal" image="phone"/>
|
||||
<connections>
|
||||
<action selector="chatButtonPressed:" destination="-1" eventType="touchUpInside" id="KhR-dg-Tez"/>
|
||||
<action selector="backToChatButtonPressed:" destination="-1" eventType="touchUpInside" id="SMR-Lb-o3n"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ybF-7q-HlR">
|
||||
<rect key="frame" x="37" y="477" width="300" height="170"/>
|
||||
<rect key="frame" x="27" y="489" width="320" height="170"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kDR-Ds-I7B">
|
||||
<rect key="frame" x="10" y="100" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<rect key="frame" x="10" y="10" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.60784313725490191" green="0.60784313725490191" blue="0.60784313725490191" alpha="0.74785958904109584" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" image="audio"/>
|
||||
<connections>
|
||||
<action selector="audioButtonPressed:" destination="-1" eventType="touchUpInside" id="pXz-DO-93v"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rl8-bS-FJ5">
|
||||
<rect key="frame" x="120" y="100" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" image="hang-up"/>
|
||||
<connections>
|
||||
<action selector="hangupButtonPressed:" destination="-1" eventType="touchUpInside" id="S0I-zJ-AFf"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5zQ-it-ujU">
|
||||
<rect key="frame" x="230" y="100" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" red="0.60784313725490191" green="0.60784313725490191" blue="0.60784313725490191" alpha="0.74973244863013699" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" image="video"/>
|
||||
<connections>
|
||||
<action selector="videoButtonPressed:" destination="-1" eventType="touchUpInside" id="5Q5-4w-o5q"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dgz-bL-PRr">
|
||||
<rect key="frame" x="231" y="100" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<rect key="frame" x="170" y="10" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.60784313725490191" green="0.60784313725490191" blue="0.60784313725490191" alpha="0.75141802224657539" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" image="speaker-off"/>
|
||||
<connections>
|
||||
|
@ -132,19 +98,61 @@
|
|||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YDj-MO-jIc">
|
||||
<rect key="frame" x="120" y="10" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="90" y="10" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.60784313725490191" green="0.60784313725490191" blue="0.60784313725490191" alpha="0.74973244859999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" image="video-off"/>
|
||||
<connections>
|
||||
<action selector="videoCallButtonPressed:" destination="-1" eventType="touchUpInside" id="YxF-Ew-WqM"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5zQ-it-ujU">
|
||||
<rect key="frame" x="90" y="10" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.60784313725490191" green="0.60784313725490191" blue="0.60784313725490191" alpha="0.74973244863013699" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" image="video"/>
|
||||
<connections>
|
||||
<action selector="videoButtonPressed:" destination="-1" eventType="touchUpInside" id="5Q5-4w-o5q"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iRE-oh-vZ4">
|
||||
<rect key="frame" x="250" y="10" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.60784313729999995" green="0.60784313729999995" blue="0.60784313729999995" alpha="0.74973244859999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" image="chat"/>
|
||||
<connections>
|
||||
<action selector="chatButtonPressed:" destination="-1" eventType="touchUpInside" id="KhR-dg-Tez"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rl8-bS-FJ5">
|
||||
<rect key="frame" x="130" y="100" width="60" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<state key="normal" image="hang-up"/>
|
||||
<connections>
|
||||
<action selector="hangupButtonPressed:" destination="-1" eventType="touchUpInside" id="S0I-zJ-AFf"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TXj-7E-NAa" userLabel="localVideo" customClass="RTCCameraPreviewView">
|
||||
<rect key="frame" x="16" y="80" width="90" height="120"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mf3-yk-Olo">
|
||||
<rect key="frame" x="25" y="80" width="40" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<state key="normal" image="switch-camera"/>
|
||||
<connections>
|
||||
<action selector="switchCameraButtonPressed:" destination="-1" eventType="touchUpInside" id="SJb-T1-tkb"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="bbs-K4-b33"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<point key="canvasLocation" x="34.399999999999999" y="52.623688155922046"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="BF4-kz-lxP">
|
||||
|
@ -172,6 +180,7 @@
|
|||
<image name="chat" width="24" height="24"/>
|
||||
<image name="close" width="24" height="24"/>
|
||||
<image name="hang-up" width="24" height="24"/>
|
||||
<image name="phone" width="24" height="24"/>
|
||||
<image name="speaker-off" width="24" height="24"/>
|
||||
<image name="switch-camera" width="24" height="24"/>
|
||||
<image name="video" width="24" height="24"/>
|
||||
|
|
|
@ -29,6 +29,7 @@ extern NSString * const NCChatViewControllerReplyPrivatelyNotification;
|
|||
@interface NCChatViewController : SLKTextViewController
|
||||
|
||||
@property (nonatomic, strong) NCRoom *room;
|
||||
@property (nonatomic, assign) BOOL presentedInCall;
|
||||
|
||||
- (instancetype)initForRoom:(NCRoom *)room;
|
||||
- (void)stopChat;
|
||||
|
|
|
@ -537,6 +537,11 @@ NSString * const NCChatViewControllerReplyPrivatelyNotification = @"NCChatViewCo
|
|||
// Show text input if it was hidden in a previous state
|
||||
[self setTextInputbarHidden:NO animated:YES];
|
||||
}
|
||||
|
||||
if (_presentedInCall) {
|
||||
// Remove call buttons
|
||||
self.navigationItem.rightBarButtonItems = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)checkLobbyState
|
||||
|
|
|
@ -253,7 +253,10 @@ typedef enum FileAction {
|
|||
// Participants section
|
||||
[sections addObject:[NSNumber numberWithInt:kRoomInfoSectionParticipants]];
|
||||
// Destructive actions section
|
||||
[sections addObject:[NSNumber numberWithInt:kRoomInfoSectionDestructive]];
|
||||
if (!_chatViewController || !_chatViewController.presentedInCall) {
|
||||
// Do not show destructive actions when chat is presented during a call
|
||||
[sections addObject:[NSNumber numberWithInt:kRoomInfoSectionDestructive]];
|
||||
}
|
||||
return [NSArray arrayWithArray:sections];
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче