Skip to content
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

Video Call Crash #608

Open
413278730 opened this issue Feb 25, 2025 · 5 comments
Open

Video Call Crash #608

413278730 opened this issue Feb 25, 2025 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@413278730
Copy link

When the second person joins the room, the first person crash.
What causes this? How do I solve this problem?
And VideoView shows some debug messages, how to remove it?

iOS 17.2.1

Image
Image

@413278730 413278730 added the bug Something isn't working label Feb 25, 2025
@413278730
Copy link
Author

Crash Video

RPReplay_Final1740565622.MP4

@hiroshihorie
Copy link
Member

hiroshihorie commented Feb 26, 2025

I think the Metal renderer doesn't like what you are publishing.

May I know:

  • What are you publishing from ?
  • Dimensions of the video you are publishing ?
  • If VideoView with renderMode = .sampleBuffer works ?

@413278730
Copy link
Author

I didn't set any video related parameters, everything is default.

After I set renderMode =.sampleBuffer, it did not crash, but the size of the video was compressed (originally rectangular, now it is square), what is going on?

What does changing renderMode =.sampleBuffer change?

lazy var room = Room(delegate: self)

        try await room.connect(url: url, token: token)
        try await room.localParticipant.setCamera(enabled: true)
        try await room.localParticipant.setMicrophone(enabled: true)

func room(_ room: Room, participant: RemoteParticipant, didSubscribeTrack publication: RemoteTrackPublication) {
DispatchQueue.main.async {
if let track = publication.track as? VideoTrack {
self.remoteVideoTrackSubject.send(track)
}
}
}

func update(track: VideoTrack?) {
self.videoView.track = track
}

@hiroshihorie
Copy link
Member

Is Metal debugging off in your Xcode scheme settings?

@413278730
Copy link
Author

1.What is the difference between .metal and .sampleBuffer in RenderMode?

When I set videoView.renderMode = .auto, the video layer is full screen.
Image

But when I set videoView.renderMode = .sampleBuffer is half-screen. how do I make it full screen as well?
Image

I just set renderMode, no other properties.
private lazy var videoView: VideoView = {
let videoView = VideoView()
videoView.add(delegate: self)
videoView.renderMode = .sampleBuffer
return videoView
}()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants