# How I can get user video before connect session

**URL:** <https://devforum.zoom.us/t/how-i-can-get-user-video-before-connect-session/74554>\
**Category:** iOS\
**Created:** [August 19, 2022, 2:20pm UTC](https://devforum.zoom.us/t/how-i-can-get-user-video-before-connect-session/74554 "2022-08-19T14:20:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![emilrakh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/emilrakh/32/40654_2.png) [@emilrakh](https://devforum.zoom.us/u/emilrakh)\
**Post date:** [August 19, 2022, 2:20pm UTC](https://devforum.zoom.us/t/how-i-can-get-user-video-before-connect-session/74554/1 "2022-08-19T14:20:25Z")

</div>

**Description**  
Hi, there. I’m trying to get a video from the user’s camera before he joined the session. To do this, I am trying to:

> guard let userVideoCanvas = ZoomVideoSDK().getSession()?.getMySelf()?.getVideoCanvas() else { return }  
> let videoAspect = ZoomVideoSDKVideoAspect.panAndScan  
> userVideoCanvas.subscribe(with: previewVideoView, andAspectMode: videoAspect)

But I can’t do anything until I get into the session.  
Is there a way to get the user’s video before connecting to the session?

**Which iOS Video SDK version?**

- Version: 1.3.2

**Smartphone (please complete the following information):**

- OS: iOS 14

**Additional context**  
As far as I understand on android, it is possible to get the user video before connecting to session.

---

<div class="post-metadata">

**Author:** ![rokgregoric](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rokgregoric/32/40678_2.png) [@rokgregoric](https://devforum.zoom.us/u/rokgregoric)\
**Post date:** [August 21, 2022, 4:05am UTC](https://devforum.zoom.us/t/how-i-can-get-user-video-before-connect-session/74554/2 "2022-08-21T04:05:03Z")

</div>

What I did is to create a custom AVCaptureVideoDataOutputSampleBufferDelegate and use that.  
It’s a lot of work and would be really nice to have support to ☝.  
Other video SDKs support that.

---

<div class="post-metadata">

**Author:** ![emilrakh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/emilrakh/32/40654_2.png) [@emilrakh](https://devforum.zoom.us/u/emilrakh)\
**Post date:** [August 23, 2022, 7:12am UTC](https://devforum.zoom.us/t/how-i-can-get-user-video-before-connect-session/74554/3 "2022-08-23T07:12:08Z")

</div>

Thanks for the answer. I was hoping that zoom has implemented such functionality and I will be able to avoid a custom solution)

---

<div class="post-metadata">

**Author:** ![rokgregoric](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rokgregoric/32/40678_2.png) [@rokgregoric](https://devforum.zoom.us/u/rokgregoric)\
**Post date:** [August 23, 2022, 7:45am UTC](https://devforum.zoom.us/t/how-i-can-get-user-video-before-connect-session/74554/4 "2022-08-23T07:45:18Z")

</div>

@emilrakh I totally agree - I would also prefer to avoid having a custom implementation just because of this very simple feature.

---

<div class="post-metadata">

**Author:** ![jackie.chen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jackie.chen/32/19282_2.png) [@jackie.chen](https://devforum.zoom.us/u/jackie.chen)\
**Post date:** [September 8, 2022, 9:45am UTC](https://devforum.zoom.us/t/how-i-can-get-user-video-before-connect-session/74554/5 "2022-09-08T09:45:33Z")

</div>

@emilrakh @rokgregoric  
We have add those interfaces in version 1.3.1 already.

New interfaces in `ZoomVideoSDKVideoHelper.h`

```auto
- (ZoomVideoSDKError)startVideoPreview:(id<ZoomVideoSDKRawDataPipeDelegate>_Nullable)delegate;
- (ZoomVideoSDKError)stopVideoPreview:(id<ZoomVideoSDKRawDataPipeDelegate> _Nullable)delegate;
- (ZoomVideoSDKError)startVideoCanvasPreview:(UIView * _Nullable)view;
- (ZoomVideoSDKError)stopVideoCanvasPreview:(UIView * _Nullable)view;

```

Please enjoy it 🙂

---

<div class="post-metadata">

**Author:** ![rokgregoric](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rokgregoric/32/40678_2.png) [@rokgregoric](https://devforum.zoom.us/u/rokgregoric)\
**Post date:** [September 10, 2022, 2:31am UTC](https://devforum.zoom.us/t/how-i-can-get-user-video-before-connect-session/74554/6 "2022-09-10T02:31:18Z")

</div>

@jackie.chen nice - I tried it and it works, BUT it’s missing the VideoAspect options … I use `PanAndScan` so my video jumps from seeing black lines → fully expanded images after connecting ☹

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 10, 2022, 12:31pm UTC](https://devforum.zoom.us/t/how-i-can-get-user-video-before-connect-session/74554/7 "2022-10-10T12:31:39Z")

</div>

Closed on October 10, 2022, 12:31pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
