Communication icon indicating copy to clipboard operation
Communication copied to clipboard

[iOS] Resizing issue for animating streams

Open terrychen1122 opened this issue 3 years ago • 8 comments

Summary When animating the size & position of a stream, the size change doesn't respect the animation. It just becomes the end size immediately. It happens to both local and remote streams. We don't see the same issue on Android, iOS only.

Steps to reproduce the behavior:

  1. Have a container view to hosting the stream as its subview (probably set the background color of the container a different color than the screen)
  2. Use either manual layout or auto layout for the stream view
  3. Animate size change of the container view
  4. When making it bigger, the stream immediately becomes the end size and it can see it not animate along with the container. It's just like the container is becoming bigger and revealing the stream. When making it smaller, same thing happens. Now, the stream becomes small immediately and the container is shrinking.

Expected The stream should be animated along with the container.

Video https://user-images.githubusercontent.com/5403473/115479005-49633100-a1fc-11eb-8a3f-3f5fd7fd7f2f.mov [You can scrub the video by looking at it frame by frame]

Configuration

  • Version of the release: beta 9
  • iOS: 14+
  • Device: iPhone 11 Pro

Additional context Not a hard blocker on video calling experience, but it really makes our UX not delightful and we should address it soon.

terrychen1122 avatar Apr 21 '21 00:04 terrychen1122

Thanks for reporting. I've opened AB#2428827 to track it.

sankum-msft avatar Apr 21 '21 20:04 sankum-msft

This is fixed in latest release.

mariusu-msft avatar Jul 19 '21 15:07 mariusu-msft

Thanks @mariusu-msft! What is the release version you are referring too. I'm still experiencing the issue on 1.1.0-beta.1, however it looks like from the bug fix notes this should have been resolved in this version. Note, I haven't had the chance to verify things on the newest release (2.0.0-beta.1) yet because of this build issue. Thanks

ryanespiritu avatar Jul 22 '21 16:07 ryanespiritu

Reopening issue.

mariusu-msft avatar Jul 22 '21 17:07 mariusu-msft

@ryanespiritu I have replied with a solution to the build issue in the other GitHub issue, please verify with the latest beta version and we will investigate if issue is still reproducible in that.

raosanat avatar Jul 22 '21 18:07 raosanat

Hi @raosanat Just verified that this is still happening for me on 2.0.1.-beta.1

https://user-images.githubusercontent.com/71148942/135899977-89134165-2005-45ed-b217-98b5048a62ad.mov

ryanespiritu avatar Oct 04 '21 17:10 ryanespiritu

@ryanespiritu can you share your application side changes ?

raosanat avatar Oct 11 '21 19:10 raosanat

Sure it's similar to the following:

[self.constraints addObjectsFromArray:@[
    [streamView.topAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.topAnchor constant:0],
    [streamView.leadingAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.leadingAnchor constant:self.bounds.width - streamView.bounds.width],
    [streamView.trailingAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.trailingAnchor constant:trailingPadding]
]];
[NSLayoutConstraint activateConstraints:self.constraints];
UIViewPropertyAnimator *propertyAnimator = [[UIViewPropertyAnimator alloc] initWithDuration:duration timingParameters:timingParameters];
[propertyAnimator addAnimations:^{
    [self layoutIfNeeded];
}];

where streamView has ACSVideoStreamRendererView as a subview

ryanespiritu avatar Oct 11 '21 20:10 ryanespiritu