Why my ios only share my own app screen, not share other app screen

Hi guan_bj,

Thanks for the reply and the log. Really appreciate it. We are able to see the crash in the log and we are trying to reproduce it to understand more about this crash. Could you provide more details on the steps of how to reproduce this issue?

We have followed the steps you mentioned above:

But we are not able to reproduce this crash. Any additional info would be helpful:

  1. What the exact steps to reproduce this issue?
  2. Is this only happening on certain version or MacOS? Xcode?

Looking forward to hearing from you. Thanks!

I have tried ios sdk v4.6.21666.0427, but the screen share issue is still exists.
same with this video: https://sy-tools.oss-cn-beijing.aliyuncs.com/shareissue.mp4

I have another question:
I use [RPScreenRecorder sharedRecorder].available; to check whether system supports screen recording or not. In some devices which are ios 13.4 version, this function returns NO. According to apple’s document, all devices should support this feature from ios 12.

Hey @guan_bj,

Are you still experiencing this issue?

Thanks,
Tommy

yes,I still struggle with screen share. With 4.6.21666.0427 screen sharing always break out. 4.4.57220.1211 is perfect. I can’t find out the root cause.
BTW, from your declaration the old sdk won’t work from June 01, right?

image

1 Like

Hi guan_bj,

Regarding the screen sharing issue you are mentioning, thank you very much for providing so much information, unfortunately, we are still not able to reproduce it on our side(everything is working as expected) and we have not received any other customers/users reporting this. We will continue monitoring this and we will keep investigating this. Once we are able to reproduce this issue, we will be able to identify the root cause and fix it.

Regarding your 2nd question, yes, all of the meetings will enable GCM encryption on June 01. The previous SDK does not support GCM encryption so it will not work after the encryption is enabled.

Thanks!

hi Carson
I have more information about this issue. in new sdk, I always get this log and sharing video will stop after about 10s once this log print out.

2020-05-19 21:32:07.669911+0800 symeet[11315:515980] audioSessionDidInterruptNotification 1

[4.4.57220.1211] it’s ok
2020-05-19 21:24:51.593105+0800 symeet[11278:513101] enter onClickShareScreen >>
2020-05-19 21:24:51.596169+0800 symeet[11278:513101] RPScreenRecorder.available return NO
2020-05-19 21:24:51.612507+0800 symeet[11278:513101] 开始共享屏幕
2020-05-19 21:24:52.113608+0800 symeet[11278:513101] trigger button
2020-05-19 21:27:50.485975+0800 symeet[11278:513101] WF: === Starting WebFilter logging for process symeet
2020-05-19 21:27:50.486073+0800 symeet[11278:513101] WF: _userSettingsForUser mobile: {
filterBlacklist = (
);
filterWhitelist = (
);
restrictWeb = 1;
useContentFilter = 0;
useContentFilterOverrides = 0;
whitelistEnabled = 0;
}
2020-05-19 21:27:50.486212+0800 symeet[11278:513101] WF: _WebFilterIsActive returning: NO

[4.6.21666.0428] always breakout
2020-05-19 21:31:17.142106+0800 symeet[11315:515980] enter onClickShareScreen >>
2020-05-19 21:31:17.142886+0800 symeet[11315:515980] RPScreenRecorder.available return NO
2020-05-19 21:31:17.153410+0800 symeet[11315:515980] 开始共享屏幕
2020-05-19 21:31:17.654527+0800 symeet[11315:515980] trigger button
2020-05-19 21:32:07.669911+0800 symeet[11315:515980] audioSessionDidInterruptNotification 1

Hi guan_bj,

Thanks for the information. Let me forward this to the engineering team for further investigation and get back to you shortly.

Thanks!

Hi Carson
I find other apps have same issue, example,google, tencent. maybe it’s an extensive issue.
this error is only existing in ipad, iphone is perfect. So I guess the resolution is error reason.
I replace MobileRTCScreenShare.framework and MobileRTCResources.bundle with 4.4.57220.1211 sdk, the error is still. so I guess the reason is in MobileRTC.framework.

https://support.google.com/meet/thread/32657556?hl=en
https://cloud.tencent.com/document/product/454/7883
系统录屏采用的是扩展方式,扩展程序有单独的进程,iOS 系统为了保证系统流畅,给扩展程序的资源相对较少,扩展程序内存占用过大也会被 Kill 掉。腾讯云 LiteAV SDK 在原有直播的高质量、低延迟的基础上,进一步降低系统消耗,保证了扩展程序稳定。

采集推流过程中有时屏幕录制会自动停止问题?
通常是因为设置的推流分辨率过高时在做横竖屏切换过程中容易出现。ReplayKit2 的直播扩展目前是有50M的内存使用限制,超过此限制系统会直接杀死扩展进程,因此 ReplayKit2 上建议推流分辨率不高于720P。另外不建议使用 autoSampleBufferSize 时做横竖屏切换,因为 Plus 的手机的分辨率可达1080 * 1920,容易触发系统内存限制而被强制停止。

你好,英文水平有限,担心讲不清楚问题,所以就用中文来描述了。是这样的,我看到你的视频里已经调起了 屏幕分享 的界面,请问你是怎么做到的。我添加了onClickShareScreen方法,却不知道在方法内实现什么,才能调起和zoom app一样的界面,就是你视频内的界面。

如何才能调起左边这个页面。谢谢~

Hi @guan_bj,

Thanks for the reply and the info. The SDK does use the information returned from the system interface AVAudioSessionInterruptionNotification.

What you are mentioning regarding the resolution make sense to me, let me forward this to the engineering team for further investigation. Will provide update shortly.

Thanks!

Hi suzzzz,

你好,你可以根据以下的教程来开发屏幕共享功能(use Broadcast extension + ReplayKit):

希望有所帮助,谢谢

哇…你好,谢谢你的回答。通过上面两个链接,确实实现了屏幕屏幕。操作如下图:

只是这个共享并不是仅在App内操作就可以实现的。我下载了zoom app,操作了一遍屏幕共享,发现在本App内就可以完成屏幕共享,非常棒的体验。操作如下图:

zoom sdk 可以实现这个效果吗?期待您的回复~

你好,你所指的是唤起第二张图左边那个画面的操作吧?你可以使用系统自带的方法来唤起这个功能,比如https://developer.apple.com/documentation/replaykit/rpsystembroadcastpickerview?language=objc(SDK本身不带有这个功能),通过这个你就可以在App里完成所有事情了。

你好,谢谢你的回复,我去看一下。 :slightly_smiling_face:

@Carson_Chen
关于新版sdk共享屏幕后播放音频和视频卡顿问题,我写了个例子工程,你们可以下载下来改为相应的参数后复现。http://sy-tools.oss-cn-beijing.aliyuncs.com/symeet20200527.zip
我的环境是:
iPad Air 2, 系统版本:13.5(17F75)
步骤为:共享屏幕后切到后台,打开 QQ音乐HD app,播放里面的视频。我们试了别的app,卡顿之前正常播放的时间更长,QQ音乐HD 很快,大概10s就卡死了。
/**

用4.6.21666.0428发布的sdk,共享屏幕后打开 QQ音乐HD app播放视频,音频,其他的参会者很快就会看到界面卡住,共享端也很容易收到共享终止的提示

把sdk换成4.4.57220.1211就可以,该问题首次出现在 4.6.15084.0206 版本

*/
image

@suzzzz
关于你的问题,请下载我的例子工程拷贝代码就行,我当初也摸索了很久,里面有趟过的路,有注释;希望能帮到你。