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()
|
mediaProjectionManager.createScreenCaptureIntent()
|
||||||
) { resultCode, data ->
|
) { resultCode, data ->
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
|
|
||||||
ContextCompat.startForegroundService(context, Intent(context, ScreenShareService::class.java))
|
ContextCompat.startForegroundService(context, Intent(context, ScreenShareService::class.java))
|
||||||
|
|
||||||
val screenCapturerAndroid =
|
val screenCapturerAndroid =
|
||||||
ScreenCapturerAndroid(data, object : MediaProjection.Callback() {
|
ScreenCapturerAndroid(data, object : MediaProjection.Callback() {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
peerConnectionClient?.createPeerConnection(screenCapturerAndroid, localHandleId)
|
peerConnectionClient?.createPeerConnection(screenCapturerAndroid, localHandleId)
|
||||||
peerConnectionClient?.createOffer(localHandleId)
|
peerConnectionClient?.createOffer(localHandleId)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user