Closed monkeyttttt closed 5 months ago
private lazy var room: Room = { Room(delegate: self, connectOptions: ConnectOptions(), roomOptions: RoomOptions(defaultCameraCaptureOptions: CameraCaptureOptions())) }()
override func viewDidLoad() { super.viewDidLoad() room.connect(wsURL, token).then { room in // Publish camera & mic room.localParticipant?.setCamera(enabled: true) //room.localParticipant?.setMicrophone(enabled: true) }.catch { error in // failed to connect } }
func room(_ room: Room, localParticipant: LocalParticipant, didPublish publication: LocalTrackPublication) { print("====WDShareRoomViewController localParticipant didPublish... (room) (room.metadata)") guard let track = publication.track as? VideoTrack else { return } DispatchQueue.main.async { self.localVideoView.track = track localParticipant.setScreenShare(enabled: true) } }
Hi @monkeyttttt , can I get in touch with you? I have some question about screen sharing feature.
Hi @monkeyttttt , can I get in touch with you? I have some question about screen sharing feature.
thanks,the problem have been resolved
remove localParticipant.setScreenShare(enabled: true) to
room.connect(wsURL, token).then { room in room. localParticipant?.setScreenShare(enabled: true) }.catch { error in // failed to connect }
solved the problem
Describe the bug share screen,app became purpse
SDK Version SDK1.1.0
iOS/macOS Version xcode 15.0.1 IOS 17.1.1
Steps to Reproduce join room , then share screen
Expected behavior A clear and concise description of what you expected to happen. show UI normal Screenshots If applicable, add screenshots to help explain your problem.
https://github.com/livekit/client-sdk-swift/assets/4243863/b975d28e-5bb2-4396-99b5-2755aa3f65c7
Logs Please provide logs if you can.