mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 22:55:52 +08:00
桌面推流ok
This commit is contained in:
parent
ff8769f4ac
commit
bebeee07d3
@ -163,17 +163,13 @@ class ZLMRTCPusherImpl(val context: FragmentActivity) : ZLMRTCPusher(),
|
||||
mediaProjectionManager.createScreenCaptureIntent()
|
||||
) { resultCode, data ->
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
|
||||
ContextCompat.startForegroundService(context, Intent(context, ScreenShareService::class.java))
|
||||
|
||||
val screenCapturerAndroid =
|
||||
ScreenCapturerAndroid(data, object : MediaProjection.Callback() {
|
||||
|
||||
})
|
||||
|
||||
peerConnectionClient?.createPeerConnection(screenCapturerAndroid, localHandleId)
|
||||
peerConnectionClient?.createOffer(localHandleId)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user