fix: video streatched when changing resolution in stream
This commit is contained in:
@@ -710,6 +710,11 @@
|
||||
name:@"OscLayoutCloseNotification"
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleStreamAspectRatioChanged:)
|
||||
name:@"StreamAspectRatioChanged"
|
||||
object:nil];
|
||||
|
||||
#if 0
|
||||
// FIXME: This doesn't work reliably on iPad for some reason. Showing and hiding the keyboard
|
||||
// several times in a row will not correctly restore the state of the UIScrollView.
|
||||
@@ -812,6 +817,15 @@
|
||||
[self->_streamView reloadOnScreenWidgetViews:true]; //update keyboard buttons here
|
||||
}
|
||||
|
||||
- (void)handleStreamAspectRatioChanged:(NSNotification *)notification {
|
||||
NSNumber *aspectRatioNum = notification.userInfo[@"aspectRatio"];
|
||||
if (aspectRatioNum && _streamView) {
|
||||
CGFloat aspectRatio = [aspectRatioNum doubleValue];
|
||||
Log(LOG_I, @"Updating StreamView aspect ratio to %.4f", aspectRatio);
|
||||
_streamView.streamAspectRatio = aspectRatio;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setUserInteractionEnabledForStreamView:(bool)enabled{
|
||||
_streamView.userInteractionEnabled = enabled;
|
||||
for(UIView* view in self.view.subviews){
|
||||
|
||||
Reference in New Issue
Block a user