hi,
I try to build a mobile app with react-native , on server side everything works perfectly i can create router and send routerRtpCapabilities but on mobile side when i try to create device i receive this error i already google it but there is nothing i can found , i ask here maybe someone can say what is it
before advices what i done =>
mediasoupClient.detectDevice()
Performs current browser/device detection and returns the corresponding mediasoup-client WebRTC handler name (or nothing if the browser/device is not supported).
@async
@returns
BuiltinHandlerName | undefined
const handlerName = mediasoupClient.detectDevice();
if (handlerName) {
console.log("detected handler: %s", handlerName);
} else {
console.warn("no suitable handler found for current browser/device");
}
when i run code above to check browser result === // no suitable handler found for current browser/device
so what am i gonna do reinstall Chrome or Edge11 ?
and also
react-native-webrtc globalRegistiry is done with all build.gradle and java etc
reasen can be Browsers ===>>
if i use // const device = new Device({handlerName: âEdge11â})
i can create device but can not load it gives this error
error log is // ReferenceError:Canât find variable: RTCRtpReceiver
and if i use // const device = new Device({handlerName: âChrome55â})
i ca not even create device and error log
// ReferenceError: Canât find variable: MediaStream
here is the code =>
import * as mediasoup from âmediasoup-clientâ
let device = null
export async function main() {
try {
device = new mediasoup.Device({handlerName: "Chrome55"})
console.log(device.handlerName)
return device
} catch (e) {
if (e.name === 'UnsupportedError') {
console.error('browser not supported')
return;
} else {
console.error('new Device',e);
}
}
}
export async function joinRoom(routerRtpCapabilities) {
console.log('join room')
await device.load({routerRtpCapabilities});
return routerRtpCapabilities;
and react-native logs
socket.io message: {âidâ: âFaRP230022-46l2GAABRâ, âtypeâ: âwelcomeâ}
LOG connected to server. clientId=FaRP230022-46l2GAABR
LOG getRouterRtpCapabilities: {âcodecsâ: [{âchannelsâ: 2, âclockRateâ: 48000, âkindâ: âaudioâ, âmimeTypeâ: âaudio/opusâ, âparametersâ: [Object], âpreferredPayloadTypeâ: 100, ârtcpFeedbackâ: [Array]}], âheaderExtensionsâ: [{âdirectionâ: âsendrecvâ, âkindâ: âaudioâ, âpreferredEncryptâ: false, âpreferredIdâ: 1, âuriâ: âurn:ietf:params:rtp-hdrext:sdes:midâ}, {âdirectionâ: âsendrecvâ, âkindâ: âvideoâ, âpreferredEncryptâ: false, âpreferredIdâ: 1, âuriâ: âurn:ietf:params:rtp-hdrext:sdes:midâ}, {âdirectionâ: ârecvonlyâ, âkindâ: âvideoâ, âpreferredEncryptâ: false, âpreferredIdâ: 2, âuriâ: âurn:ietf:params:rtp-hdrext:sdes:rtp-stream-idâ}, {âdirectionâ: ârecvonlyâ, âkindâ: âvideoâ, âpreferredEncryptâ: false, âpreferredIdâ: 3, âuriâ: âurn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-idâ}, {âdirectionâ: âsendrecvâ, âkindâ: âaudioâ, âpreferredEncryptâ: false, âpreferredIdâ: 4, âuriâ: âdocs/native-code/rtp-hdrext/abs-send-time - src - Git at Googleâ}, {âdirectionâ: âsendrecvâ, âkindâ: âvideoâ, âpreferredEncryptâ: false, âpreferredIdâ: 4, âuriâ: âdocs/native-code/rtp-hdrext/abs-send-time - src - Git at Googleâ}, {âdirectionâ: ârecvonlyâ, âkindâ: âaudioâ, âpreferredEncryptâ: false, âpreferredIdâ: 5, âuriâ: âhttp://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01â}, {âdirectionâ: âsendrecvâ, âkindâ: âvideoâ, âpreferredEncryptâ: false, âpreferredIdâ: 5, âuriâ: âhttp://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01â}, {âdirectionâ: âsendrecvâ, âkindâ: âvideoâ, âpreferredEncryptâ: false, âpreferredIdâ: 6, âuriâ: âdraft-ietf-avtext-framemarking-07â}, {âdirectionâ: âsendrecvâ, âkindâ: âvideoâ, âpreferredEncryptâ: false, âpreferredIdâ: 7, âuriâ: âurn:ietf:params:rtp-hdrext:framemarkingâ}, {âdirectionâ: âsendrecvâ, âkindâ: âaudioâ, âpreferredEncryptâ: false, âpreferredIdâ: 10, âuriâ: âurn:ietf:params:rtp-hdrext:ssrc-audio-levelâ}, {âdirectionâ: âsendrecvâ, âkindâ: âvideoâ, âpreferredEncryptâ: false, âpreferredIdâ: 11, âuriâ: âurn:3gpp:video-orientationâ}, {âdirectionâ: âsendrecvâ, âkindâ: âvideoâ, âpreferredEncryptâ: false, âpreferredIdâ: 12, âuriâ: âurn:ietf:params:rtp-hdrext:toffsetâ}]}
ERROR new Device [ReferenceError: Canât find variable: MediaStream]
LOG join room
WARN Possible Unhandled Promise Rejection (id: 0):
TypeError: null is not an object (evaluating 'device.load()
If anyone need some other logs or want to test other things just ask me
Thanks