【问题标题】:Unable to Screenshare in Tokbox for iOS Mobile Client无法在 Tokbox for iOS 移动客户端中进行屏幕共享
【发布时间】:2017-10-13 06:59:25
【问题描述】:

当我们从 iOS 客户端进行屏幕共享时,我们遇到了问题。在屏幕共享期间,当发布者导航到其他应用程序时,受邀者无法查看其他应用程序或屏幕。

//下面是我们正在使用的代码--

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)

我们只能共享应用程序窗口。谁能解释一下我们如何在应用程序窗口之外进行共享。

谢谢。

【问题讨论】:

    标签: opentok tokbox


    【解决方案1】:

    共享其他应用程序屏幕或主屏幕并不简单。您需要实现屏幕共享扩展并在扩展中实现 OpenTok 流。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多