shivamag00
shivamag00

Reputation: 481

WebXR and WebRTC don't work simultaneously

I am new to WebXR. I was trying to use webRTC with WebXR. The user will first enter into AR session and then create a WebRTC peer connection but ice candidates are not generated in Chrome for Android of the user is in AR session. As soon as the user gets out of AR session, ice candidates are transferred. Is this a bug in Chrome??

Upvotes: 0

Views: 696

Answers (3)

kektus10000
kektus10000

Reputation: 1

As far as I know, it is not possible to use canvas.captureStream() because WebXR doesn't render to the canvas directly. I am also looking for a way to stream a webXR-Session via WebRTC. So I would be highly interested in your solution shivamag00! Hope to hear from you!

Upvotes: 0

Harshwardhan
Harshwardhan

Reputation: 147

Although I haven't tried it myself. But you can in theory use the canvas captureStream API to stream webXR canvas. Can you post your code here. You might want to tweak how you pass stream to the webrtc connection.

Upvotes: 0

shivamag00
shivamag00

Reputation: 481

The problem is Hardware related. Some devices allow the use of both Front and back camera simultaneously. In such devices, the code worked properly. In other devices, both front and back camera cannot be accessed simultaneously. Hence, code does not work in these devices. Also, the WebXR Device API does not allow access to camera feed at the moment, however it is a proposed feature.

Upvotes: 1

Related Questions