-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I exclude my custom lock screen layer when sharing a screen? #561
Comments
I'm not sure what you want to do. Do you want to exclude an app from being shared from the screen share? If it helps, you can write your response in Chinese, I can understand a bit. |
好的兄弟,我说一下我的思路。 我在做的是手机群控系统,但是手机托管在第三方的机房中,我需要这一个自定义的app来锁定这个屏幕,让第三方机房无法看到我手机的界面,但是我在屏幕共享的时候没有排除这个锁屏界面的显示,我之前的方案是要修改 framework层达到目的,但是毕竟手机系统不是我们的,所以 VisualDisplay 加上修改底层 framework 的方案不行。按理说通过 VisualDisplay 可以让虚拟显示器不显示这个自定义锁屏activity,然后推流这个虚拟显示器的内容即可达到需要的效果。但是 livekitsdk for android 将 visualdisplay 封装在内部了吧,不知道我要的这个方式如何能实现。 谢谢你。 |
Do you know my mean? @davidliu |
Hmm, I don't think that's something we can support? We go through MediaProjection, which just captures what's on screen and doesn't have any ability to exclude apps. What you can do is if you have a solution, you can write your own custom Here's the original ScreenCapturer code you can copy and modify for your own purposes. Once you have the video capturer, you can create a track out of it and publish it directly:
Hope that helps. |
Yes, I need create a custom VirtualDiaplay object transmitted to room.localParticipant.publishVideoTrack(track)? |
Yes. You can reference the code I linked above to make your own implementation. |
I created a custom VideoCapturer. But what the remote video is seeing is not what my video is about. How to make this video replace the screen recorded video stream? My code: private fun startScreenCapture(intentData: Intent) {
val localParticipant = room.localParticipant
GlobalScope.launch {
val resolution = VideoResolution.H240
val frameRate = 6
val captureParams = getCaptureParams(context, resolution, frameRate)
val excludedPackages = setOf("com.xxx.remote")
val screenShareVideoCapturer = ScreenShareVideoCapturer(context, intentData, captureParams, excludedPackages)
val track = localParticipant.createVideoTrack(
capturer = screenShareVideoCapturer,
name = "screenshare"
)
localParticipant.publishVideoTrack(
track = track,
options = VideoTrackPublishOptions(
simulcast = false,
videoEncoding = createCustomVideoEncoding(context, resolution, frameRate)
)
)
screenShareVideoCapturer.startCapture(captureParams.width, captureParams.height, frameRate)
}
} |
Your custom video capturer needs to pass the frames to the |
Yes, it's can capture video, now! but, I want shared screen. How to create ScreencastTrack? Because the receiver is using the interface for watch screen sharing. |
My custom VideoCapturer can capture android screen video publish to livekit server. but, the video have big black background. why? I use room.localParticipant.setScreenShareEnabled(true, intentData) not black background. |
It doesn't need to be a
If you mean the receiver is getting the track through
You may be setting the wrong dimensions when capturing the screen share. |
I have a mobile workstation.
I want to see it run and operate remotely.
But my app has a lock screen that hides the phone's screen.
How do I filter out this mask when I look at it remotely?
livekit sdk has an API same this code?
The text was updated successfully, but these errors were encountered: