Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/react/features/mobile/call-integration/ConnectionService.js

33 lines
1.2 KiB

import { NativeEventEmitter, NativeModules } from 'react-native';
let ConnectionService = NativeModules.ConnectionService;
// XXX Rather than wrapping ConnectionService in a new class and forwarding
// the many methods of the latter to the former, add the one additional
// method that we need to ConnectionService.
if (ConnectionService) {
const eventEmitter = new NativeEventEmitter(ConnectionService);
ConnectionService = {
...ConnectionService,
addListener: eventEmitter.addListener.bind(eventEmitter),
registerSubscriptions(context, delegate) {
return [
ConnectionService.addListener(
'org.jitsi.meet:features/connection_service#disconnect',
delegate._onPerformEndCallAction,
context),
ConnectionService.addListener(
'org.jitsi.meet:features/connection_service#abort',
delegate._onPerformEndCallAction,
context)
];
},
setMuted() {
// Currently no-op, but remember to remove when implemented on
// the native side
}
};
}
export default ConnectionService;