0

We have an issue when we screenshare from iOS client. During screenshare, the invitees are unable to view other apps or screens when the publisher navigates to other application.

//Following is the code that we are using--

fileprivate func startScreenSharing() { self.isSharingScreen = true

    multipartyScreenSharer = OTMultiPartyCommunicator.init(view: UIApplication.shared.keyWindow)
    multipartyScreenSharer?.dataSource = self

    // publishOnly here is to avoid subscripting to those who already subscribed
    multipartyScreenSharer?.isPublishOnly = true

    publisherView?.isHidden = true
    multipartyScreenSharer?.connect {
        [unowned self](signal, remote, error) in
        self.isSharingScreen = true

        guard error == nil else {
            self.dismiss(animated: true) {
                SVProgressHUD.showError(withStatus: error!.localizedDescription)
            }
            return
        }

        if signal == .publisherCreated {
            self.multipartyScreenSharer?.isPublishAudio = true
        }
    }
}

multipartyScreenSharer = OTMultiPartyCommunicator.init(view:UIApplication.shared.keyWindow)

We only can share the application window. Can someone explain how we can share besides the application window.

Thanks.

1 Answers1

0

It is not straight forward to share other apps screens or home screen. You will need to implement screen sharing extension and implement OpenTok streaming in the extension.

Sridhar Bollam
  • 1,194
  • 1
  • 13
  • 19