# VideoAspect Setting Being Overridden

**URL:** <https://devforum.zoom.us/t/videoaspect-setting-being-overridden/130248>\
**Category:** Flutter\
**Created:** [March 20, 2025, 9:43pm UTC](https://devforum.zoom.us/t/videoaspect-setting-being-overridden/130248 "2025-03-20T21:43:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonphamtrung17](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sonphamtrung17/32/68060_2.png) [@sonphamtrung17](https://devforum.zoom.us/u/sonphamtrung17)\
**Post date:** [March 20, 2025, 9:43pm UTC](https://devforum.zoom.us/t/videoaspect-setting-being-overridden/130248/1 "2025-03-20T21:43:13Z")

</div>

## Bug Report: VideoAspect Setting Being Overridden

### Issue Description

The `videoAspect` parameter passed to the FlutterZoomView is not being respected due to hardcoded overrides in the `setViewingCanvas` method. This prevents users from controlling the video aspect ratio through the API.

### Current Behavior

1. When initializing the view, `videoAspect` is properly set from external arguments:

```objc
if (dictionary[@"videoAspect"]) {
    [_view setVideoAspect: dictionary[@"videoAspect"]];
}

```

1. However, in `setViewingCanvas` method, this value is unconditionally overridden:

```objc
if (sharing) {
    if ([user getUserID] != [mySelf getUserID]) {
        currentCanvas = [user getShareCanvas];
        videoAspect = ZoomVideoSDKVideoAspect_Original; // Forced override
    }
} else {
    videoAspect = ZoomVideoSDKVideoAspect_LetterBox; // Forced override
}

```

### Expected Behavior

The `videoAspect` value provided through the initialization arguments should be respected and maintained throughout the view’s lifecycle, unless explicitly changed by the user through the API.

### Impact

This issue prevents developers from:

1. Customizing video aspect ratio according to their application needs
2. Maintaining consistent video display across different view states
3. Properly implementing custom video layouts

### Suggested Fix

Remove the hardcoded overrides in `setViewingCanvas` and only set default values when `videoAspect` is nil or not provided:

```objc
- (void)setViewingCanvas {
    // ... existing code ...
    
    if (sharing) {
        if ([user getUserID] != [mySelf getUserID]) {
            currentCanvas = [user getShareCanvas];
            if (!videoAspect) {
                videoAspect = ZoomVideoSDKVideoAspect_Original;
            }
        }
    } else {
        if (!videoAspect) {
            videoAspect = ZoomVideoSDKVideoAspect_LetterBox;
        }
    }
    
    // ... rest of the code ...
}

```

### Additional Context

- This issue affects both sharing and non-sharing modes
- The bug impacts any application trying to customize video display aspects
- The current implementation makes the external videoAspect parameter effectively useless

### Environment

- Platform: iOS
- Component: FlutterZoomView
- File: ios/Classes/FlutterZoomView.m

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [March 24, 2025, 10:12am UTC](https://devforum.zoom.us/t/videoaspect-setting-being-overridden/130248/2 "2025-03-24T10:12:48Z")

</div>

Hi @sonphamtrung17, thanks for reporting. I’ll work with our team to get this fixed soon!
