I try this
peerConnection.createOffer({offerToReceiveAudio: 1, offerToReceiveVideo: 1});
But if camera not found or not allowed i get errors in my code. Now i can't get this offer on another computer.
Can you help me please? Thanks.
I think in this case you should check the availability of devices first by using javascript code.
If the user doesn't allow video or doesn't have a webcam/camera then the media-devices type will have the attribute with "null" value. FYI, you can also check it by typing "DetectRTC.MediaDevices" in developer tool of browser.
I found a demo for this : https://www.webrtc-experiment.com/DetectRTC/
You can read more in MDN web doc: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia