mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
Switch back to using the legacy screen capturing API
The new API is buggy and inconsistent, so I think we should move on for now.
This commit is contained in:
parent
bac3dc1ccd
commit
78969d0938
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ public func LKRoomVideoTracksForRemoteParticipant(room: UnsafeRawPointer, partic
|
|||
@_cdecl("LKCreateScreenShareTrackForDisplay")
|
||||
public func LKCreateScreenShareTrackForDisplay(display: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer {
|
||||
let display = Unmanaged<MacOSDisplay>.fromOpaque(display).takeUnretainedValue()
|
||||
let track = LocalVideoTrack.createMacOSScreenShareTrack(source: display)
|
||||
let track = LocalVideoTrack.createMacOSScreenShareTrack(source: display, preferredMethod: .legacy)
|
||||
return Unmanaged.passRetained(track).toOpaque()
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ public func LKRemoteVideoTrackGetSid(track: UnsafeRawPointer) -> CFString {
|
|||
|
||||
@_cdecl("LKDisplaySources")
|
||||
public func LKDisplaySources(data: UnsafeRawPointer, callback: @escaping @convention(c) (UnsafeRawPointer, CFArray?, CFString?) -> Void) {
|
||||
MacOSScreenCapturer.displaySources().then { displaySources in
|
||||
MacOSScreenCapturer.sources(for: .display, includeCurrentApplication: false, preferredMethod: .legacy).then { displaySources in
|
||||
callback(data, displaySources as CFArray, nil)
|
||||
}.catch { error in
|
||||
callback(data, nil, error.localizedDescription as CFString)
|
||||
|
|
Loading…
Reference in a new issue