mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Call: do not resize video, properly done
This commit is contained in:
parent
3165ea36c8
commit
83379b7098
3 changed files with 33 additions and 30 deletions
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CallView">
|
||||
|
|
@ -118,45 +118,45 @@
|
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="9" userLabel="callView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="499"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="625"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" tag="7" contentMode="scaleAspectFit" image="avatar.png" id="fZy-K5-yQp" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<rect key="frame" x="62" y="140" width="250" height="250"/>
|
||||
<rect key="frame" x="62" y="210" width="250" height="250"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Contact avatar">
|
||||
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
|
||||
<accessibilityTraits key="traits" image="YES" notEnabled="YES"/>
|
||||
<bool key="isElement" value="YES"/>
|
||||
</accessibility>
|
||||
</imageView>
|
||||
<view alpha="0.0" contentMode="scaleToFill" id="126" userLabel="video">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="499"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="625"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" id="173" userLabel="background">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="499"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="625"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="132" userLabel="display">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="499"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="625"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration">
|
||||
<accessibilityTraits key="traits" none="YES" notEnabled="YES"/>
|
||||
<accessibilityTraits key="traits" notEnabled="YES"/>
|
||||
</accessibility>
|
||||
</view>
|
||||
<view contentMode="scaleAspectFit" id="127" userLabel="preview">
|
||||
<rect key="frame" x="254" y="352" width="113" height="139"/>
|
||||
<rect key="frame" x="254" y="442" width="113" height="175"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" animating="YES" style="whiteLarge" id="144" userLabel="waitIndicator">
|
||||
<rect key="frame" x="168" y="231" width="37" height="37"/>
|
||||
<rect key="frame" x="168" y="294" width="37" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
</activityIndicatorView>
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view hidden="YES" alpha="0.80000000000000004" contentMode="scaleToFill" id="0MR-ml-8RY" userLabel="pausedByRemoteView">
|
||||
<rect key="frame" x="0.0" y="66" width="375" height="433"/>
|
||||
<rect key="frame" x="0.0" y="66" width="375" height="559"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="waiting_time.png" id="DH6-pH-W9j" userLabel="pausedImage">
|
||||
|
|
@ -779,9 +779,4 @@
|
|||
<image name="speaker_selected.png" width="27" height="25"/>
|
||||
<image name="waiting_time.png" width="59" height="71"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
NSTimer *videoDismissTimer;
|
||||
BOOL videoShown;
|
||||
VideoZoomHandler *videoZoomHandler;
|
||||
UIView *blackVideoStatusBar;
|
||||
}
|
||||
|
||||
@property(nonatomic, strong) IBOutlet CallPausedTableView *pausedCallsTable;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ const NSInteger SECURE_BUTTON_TAG = 5;
|
|||
if (self != nil) {
|
||||
singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)];
|
||||
videoZoomHandler = [[VideoZoomHandler alloc] init];
|
||||
blackVideoStatusBar = [[UIView alloc] init];
|
||||
blackVideoStatusBar.backgroundColor = [UIColor blackColor];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -86,6 +88,9 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
[self showStatusBar:true];
|
||||
|
||||
if (hideControlsTimer != nil) {
|
||||
[hideControlsTimer invalidate];
|
||||
hideControlsTimer = nil;
|
||||
|
|
@ -299,14 +304,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
_routesView.alpha = _optionsView.alpha = _numpadView.alpha = _bottomBar.alpha = 1.0;
|
||||
_nameLabel.alpha = _durationLabel.alpha = .8;
|
||||
|
||||
CGRect newFrame = self.view.frame;
|
||||
newFrame.size.height -= _bottomBar.frame.size.height;
|
||||
_callView.frame = newFrame;
|
||||
|
||||
[UIView commitAnimations];
|
||||
|
||||
[PhoneMainView.instance showTabBar:true];
|
||||
[PhoneMainView.instance showStatusBar:true];
|
||||
[self showStatusBar:true];
|
||||
|
||||
// hide controls in 5 sec
|
||||
hideControlsTimer = [NSTimer scheduledTimerWithTimeInterval:5.0
|
||||
|
|
@ -324,21 +325,16 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
if ([[PhoneMainView.instance currentView] equal:CallView.compositeViewDescription]) {
|
||||
|
||||
[PhoneMainView.instance showTabBar:false];
|
||||
[PhoneMainView.instance showStatusBar:false];
|
||||
[self showStatusBar:false];
|
||||
|
||||
[UIView beginAnimations:nil context:nil];
|
||||
[UIView setAnimationDuration:0.3];
|
||||
_pausedCallsTable.tableView.alpha = _videoCameraSwitch.alpha = _nameLabel.alpha = _durationLabel.alpha =
|
||||
_callPauseButton.alpha = 0.0;
|
||||
_routesView.alpha = _optionsView.alpha = _numpadView.alpha = _bottomBar.alpha = 0.0;
|
||||
CGRect newFrame = self.view.frame;
|
||||
_callView.frame = newFrame;
|
||||
|
||||
[UIView commitAnimations];
|
||||
|
||||
// UICompositeView *cvc = PhoneMainView.instance.mainViewController;
|
||||
// [cvc hideSideMenu:YES];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -372,7 +368,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
[PhoneMainView.instance fullScreen:true];
|
||||
[PhoneMainView.instance showTabBar:false];
|
||||
[PhoneMainView.instance showStatusBar:false];
|
||||
[self showStatusBar:false];
|
||||
|
||||
#ifdef TEST_VIDEO_VIEW_CHANGE
|
||||
[NSTimer scheduledTimerWithTimeInterval:5.0
|
||||
|
|
@ -430,6 +426,17 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[self disableVideoDisplay:animated];
|
||||
}
|
||||
|
||||
- (void)showStatusBar:(BOOL)show {
|
||||
/* we cannot use showStatusBar because it will resize current view and we do not want
|
||||
video to be resized, so hacking status bar instead*/
|
||||
if (!show) {
|
||||
UIView *statusView = PhoneMainView.instance.mainViewController.statusBarView;
|
||||
blackVideoStatusBar.frame = statusView.frame;
|
||||
[statusView addSubview:blackVideoStatusBar];
|
||||
} else {
|
||||
[blackVideoStatusBar removeFromSuperview];
|
||||
}
|
||||
}
|
||||
#pragma mark - Spinner Functions
|
||||
|
||||
- (void)hideSpinnerIndicator:(LinphoneCall *)call {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue