# Zoom iOS SDK issue with screen sharing videos

**URL:** <https://devforum.zoom.us/t/zoom-ios-sdk-issue-with-screen-sharing-videos/30315>\
**Category:** Meeting SDK\
**Created:** [September 15, 2020, 3:10pm UTC](https://devforum.zoom.us/t/zoom-ios-sdk-issue-with-screen-sharing-videos/30315 "2020-09-15T15:10:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugene-explorer](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/eugene-explorer/32/15352_2.png) [@eugene-explorer](https://devforum.zoom.us/u/eugene-explorer)\
**Post date:** [September 15, 2020, 3:10pm UTC](https://devforum.zoom.us/t/zoom-ios-sdk-issue-with-screen-sharing-videos/30315/1 "2020-09-15T15:10:13Z")

</div>

**Description**  
We are using Zoom iOS SDK to integrate Zoom functionality into our application.  
Screen-sharing works well until you start to share a video (YouTube or even video from browser).  
In this case application disables audio, and only audio from a video is active. Mobile app uloades from the background apps, because without audio in background iOS unload application.  
We checked this behevour in zoom application and it works fine.  
Is there any way to fix it for custom UI?

**Which version?**  
SDK version [v5.0.24433.0616](https://github.com/zoom/zoom-sdk-ios/releases/tag/v5.0.24433.0616)

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

- Device: iPhoneX, iPadPro (11-inch)
- OS: 13.7

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [September 15, 2020, 5:47pm UTC](https://devforum.zoom.us/t/zoom-ios-sdk-issue-with-screen-sharing-videos/30315/2 "2020-09-15T17:47:07Z")

</div>

Hey @eugene-explorer

Thanks for using the dev forum!

Are you using appShareWithView for this?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![eugene-explorer](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/eugene-explorer/32/15352_2.png) [@eugene-explorer](https://devforum.zoom.us/u/eugene-explorer)\
**Post date:** [September 16, 2020, 3:24am UTC](https://devforum.zoom.us/t/zoom-ios-sdk-issue-with-screen-sharing-videos/30315/3 "2020-09-16T03:24:22Z")

</div>

hi @Michael_Condon

Thank you for your response!

No, we are using **ReplayKit**.

Thank you,  
Eugene

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [September 17, 2020, 6:53pm UTC](https://devforum.zoom.us/t/zoom-ios-sdk-issue-with-screen-sharing-videos/30315/4 "2020-09-17T18:53:57Z")

</div>

Hey @eugene-explorer

Oh interesting. Sorry that is happening, that does not sound like a pleasant experience!  
Would you mind providing your ReplayHandler code and any other relevant code so I can investigate? Omit anything you would not want the public to see please.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![eugene-explorer](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/eugene-explorer/32/15352_2.png) [@eugene-explorer](https://devforum.zoom.us/u/eugene-explorer)\
**Post date:** [September 18, 2020, 2:01pm UTC](https://devforum.zoom.us/t/zoom-ios-sdk-issue-with-screen-sharing-videos/30315/5 "2020-09-18T14:01:58Z")

</div>

Hello @Michael_Condon

We use code from example app:

```
//
// SampleHandler.m
// ExtensionReplayKit
//
// Created by Chao Bai on 2018/5/11.
// Copyright © 2018 Zoom Video Communications, Inc. All rights reserved.
//
#import "SampleHandler.h"
#import <MobileRTCScreenShare/MobileRTCScreenShareService.h>
@interface SampleHandler () <MobileRTCScreenShareServiceDelegate>
@property (strong, nonatomic) MobileRTCScreenShareService * screenShareService;
@end
@implementation SampleHandler
- (instancetype)init
{
    self = [super init];
    if (self)
    {
        MobileRTCScreenShareService * service = [[MobileRTCScreenShareService alloc]init];
        self.screenShareService = service;
        self.screenShareService.appGroup = %ourGroupId%;
        self.screenShareService.delegate = self;
    }
    return self;
}
- (void)dealloc
{
    self.screenShareService = nil;
}
- (void)broadcastStartedWithSetupInfo:(NSDictionary<NSString *,NSObject *> *)setupInfo {
    // User has requested to start the broadcast. Setup info from the UI extension can be supplied but optional.
    [self.screenShareService broadcastStartedWithSetupInfo:setupInfo];
}
- (void)broadcastPaused {
    [self.screenShareService broadcastPaused];
    // User has requested to pause the broadcast. Samples will stop being delivered.
}
- (void)broadcastResumed {
    [self.screenShareService broadcastResumed];
    // User has requested to resume the broadcast. Samples delivery will resume.
}
- (void)broadcastFinished {
    // User has requested to finish the broadcast.
    [self.screenShareService broadcastFinished];
}
- (void)processSampleBuffer:(CMSampleBufferRef)sampleBuffer withType:(RPSampleBufferType)sampleBufferType {
    [self.screenShareService processSampleBuffer:sampleBuffer withType:sampleBufferType];
}
- (void)MobileRTCScreenShareServiceFinishBroadcastWithError:(NSError *)error
{
    [self finishBroadcastWithError:error];
}
@end

```

App background permissions:

```
<key>UIBackgroundModes</key>
	<array>
		<string>audio</string>
	</array>

```

Everything is working fine, except for the video. After a few sec it freezes.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [October 12, 2020, 6:16pm UTC](https://devforum.zoom.us/t/zoom-ios-sdk-issue-with-screen-sharing-videos/30315/6 "2020-10-12T18:16:59Z")

</div>

Hey @eugene-explorer

There is an updated version of the SDK. This update has ScreenSharing changes that may help to resolve your issue. [https://github.com/zoom/zoom-sdk-ios/releases/tag/v5.2.41735.0928](https://github.com/zoom/zoom-sdk-ios/releases/tag/v5.2.41735.0928)

When updating there will be some changes to your project that will need to be made. Those instructions are here: [Zoom crshes/stops working after few mins in the call after the update to iOS 14 on iphone XR](https://devforum.zoom.us/t/zoom-crshes-stops-working-after-few-mins-in-the-call-after-the-update-to-ios-14-on-iphone-xr/30688/22)

Please update and let me know if you run into further issues.  
Thanks!  
Michael
