feat(stun-turn): add parameter to receive stun/turn servers (code format)
This commit is contained in:
parent
651d8cfa88
commit
913c68182a
@ -20,7 +20,9 @@ function createFullAudioOffer(instanceId: Number, stunTurnJson: String) {
|
|||||||
resolve = res;
|
resolve = res;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log(`[${instanceId}] - >nativeCreateFullAudioOffer (${stunTurnJson})`);
|
console.log(
|
||||||
|
`[${instanceId}] - >nativeCreateFullAudioOffer (${stunTurnJson})`
|
||||||
|
);
|
||||||
// call native swift method that triggers the broadcast popup
|
// call native swift method that triggers the broadcast popup
|
||||||
nativeCreateFullAudioOffer(stunTurnJson);
|
nativeCreateFullAudioOffer(stunTurnJson);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -20,7 +20,9 @@ function createScreenShareOffer(instanceId: Number, stunTurnJson: String) {
|
|||||||
resolve = res;
|
resolve = res;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log(`[${instanceId}] - >nativeCreateScreenShareOffer (${stunTurnJson})`);
|
console.log(
|
||||||
|
`[${instanceId}] - >nativeCreateScreenShareOffer (${stunTurnJson})`
|
||||||
|
);
|
||||||
// call native swift method that triggers the broadcast popup
|
// call native swift method that triggers the broadcast popup
|
||||||
nativeCreateScreenShareOffer(stunTurnJson);
|
nativeCreateScreenShareOffer(stunTurnJson);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -6,7 +6,7 @@ const FullAudioService = NativeModules.BBBN_FullAudioService;
|
|||||||
// FullAudioService.initializeFullAudio();
|
// FullAudioService.initializeFullAudio();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
export function createFullAudioOffer(stunTurnJson:String) {
|
export function createFullAudioOffer(stunTurnJson: String) {
|
||||||
FullAudioService.createFullAudioOffer(stunTurnJson);
|
FullAudioService.createFullAudioOffer(stunTurnJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ export function initializeScreenShare() {
|
|||||||
ScreenShareService.initializeScreenShare();
|
ScreenShareService.initializeScreenShare();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createScreenShareOffer(stunTurnJson:String) {
|
export function createScreenShareOffer(stunTurnJson: String) {
|
||||||
ScreenShareService.createScreenShareOffer(stunTurnJson);
|
ScreenShareService.createScreenShareOffer(stunTurnJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,10 +50,16 @@ export function handleWebviewMessage(
|
|||||||
promise = initializeScreenShare(instanceId);
|
promise = initializeScreenShare(instanceId);
|
||||||
break;
|
break;
|
||||||
case 'createFullAudioOffer':
|
case 'createFullAudioOffer':
|
||||||
promise = createFullAudioOffer(instanceId, JSON.stringify(data?.arguments[0]));
|
promise = createFullAudioOffer(
|
||||||
|
instanceId,
|
||||||
|
JSON.stringify(data?.arguments[0])
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'createScreenShareOffer':
|
case 'createScreenShareOffer':
|
||||||
promise = createScreenShareOffer(instanceId, JSON.stringify(data?.arguments[0]));
|
promise = createScreenShareOffer(
|
||||||
|
instanceId,
|
||||||
|
JSON.stringify(data?.arguments[0])
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'setScreenShareRemoteSDP':
|
case 'setScreenShareRemoteSDP':
|
||||||
promise = setScreenShareRemoteSDP(instanceId, data?.arguments[0].sdp);
|
promise = setScreenShareRemoteSDP(instanceId, data?.arguments[0].sdp);
|
||||||
|
Loading…
Reference in New Issue
Block a user