Comments (21)
Please, when you have questions or problems use the community forum before opening new issues, thank you.
from jitsi-meet.
The external key needs to be set using the iframe API, it's not designed for direct user access.
What problem did you have with the automatic key management?
from jitsi-meet.
Here is an example of setting the key via iframe API and toggling e2ee in the meeting:
jitsi-meet/doc/jaas/index-jaas.html
Line 14 in 62d0d25
from jitsi-meet.
I follow the problem @VeshRaazThapa has reported. Specifically, it seems the config.js
file is not considered at all. I decommented the e2ee section but when I access e2ee.externallyManagedKey
it is undefined.
from jitsi-meet.
Can you share the full piece of code of what you're trying to do?
from jitsi-meet.
The app is running on local through make dev
. I just modified the UI of E2EESection.tsx. The following is the code snippet.
const E2EESection = ({
_descriptionResource,
_enabled,
_e2eeLabels,
_everyoneSupportE2EE,
_toggled,
dispatch
}: IProps) => {
const { classes } = useStyles();
const { t } = useTranslation();
const [ toggled, setToggled ] = useState(_toggled ?? false);
useEffect(() => {
setToggled(_toggled);
}, [ _toggled ]);
/**
* Callback to be invoked when the user toggles E2EE on or off.
*
* @private
* @returns {void}
*/
const _onToggle = useCallback(() => {
const newValue = !toggled;
setToggled(newValue);
sendAnalytics(createE2EEEvent(`enabled.${String(newValue)}`));
dispatch(toggleE2EE(newValue));
}, [ toggled ]);
const description = _e2eeLabels?.description || t(_descriptionResource ?? '');
const label = _e2eeLabels?.label || t('dialog.e2eeLabel');
const warning = _e2eeLabels?.warning || t('dialog.e2eeWarning');
return (
<div
className = { classes.e2eeSection }
id = 'e2ee-section'>
<p
aria-live = 'polite'
className = { classes.description }
id = 'e2ee-section-description'>
{description}
{!_everyoneSupportE2EE && <br />}
{!_everyoneSupportE2EE && warning}
</p>
<div className = { classes.controlRow }>
<label htmlFor = 'e2ee-section-switch'>
{label}
</label>
<Switch
checked = { toggled }
disabled = { !_enabled }
id = 'e2ee-section-switch'
onChange = { _onToggle } />
</div>
<div className={classes.indicatorRow}>
<div className={e2ee.externallyManagedKey ? classes.successIndicator : classes.errorIndicator}></div>
<label>
{e2ee.externallyManagedKey ? 'Externally Enabled in config file' : 'Externally Disabled in config file'}
</label>
</div>
</div>
);
};
In config.js
the e2ee section is uncommented.
e2ee: {
labels: {
description: 'Description',
label: 'E2EE',
tooltip: 'Tooltip',
warning: 'Warning',
},
externallyManagedKey: false
}
Nontheless the externallyManagedKey is undefined.
from jitsi-meet.
Nontheless the externallyManagedKey is undefined.
I don't understand. You are configuring externallyManagedKey: false
which means the internal mode is going to be used, aka the default.
In addition, you can't just change config.js, since that file is served by the deployment. You should either have your own deployment or use the iframe API and use config overrides to change the settings you want.
from jitsi-meet.
Ok I got it. Where can I find an example of iframe API? Or maybe another way for reading a config file.
from jitsi-meet.
Check damencho's comment above.
from jitsi-meet.
I've tried to include iframe api has below (in my custom component QKDSection.ts
)
import React, { useCallback, useEffect, useState, useRef } from 'react';
import { connect } from 'react-redux';
import { makeStyles } from 'tss-react/mui';
import { IReduxState, IStore } from '../../app/types';
import Switch from '../../base/ui/components/web/Switch';
import { toggleQKD } from '../actions';
import JitsiMeetExternalAPI from '../../../../modules/API/external/external_api';
interface IProps {
_enabled: boolean;
_toggled: boolean;
dispatch: IStore['dispatch'];
}
const useStyles = makeStyles()(theme => {
return {
qkdSection: {
display: 'flex',
flexDirection: 'column'
},
description: {
fontSize: '13px',
margin: '15px 0'
},
controlRow: {
display: 'flex',
justifyContent: 'space-between',
marginTop: '15px',
'& label': {
fontSize: '14px',
fontWeight: 'bold'
}
}
};
});
const QKDSection = ({
_enabled,
_toggled,
dispatch
}: IProps) => {
const { classes } = useStyles();
const [ toggled, setToggled ] = useState(_toggled ?? false);
useEffect(() => {
setToggled(_toggled);
}, [_toggled]);
useEffect(() => {
const domain = "alpha.jitsi.net";
const options = {
configOverwrite: {
e2ee: {
labels: {
description: 'End to End Encryption',
label: 'E2EE',
tooltip: '',
warning: 'All users must use E2EE',
},
externallyManagedKey: true,
}
}
};
console.log("DEBUG " + options.configOverwrite.e2ee.externallyManagedKey);
const api = new JitsiMeetExternalAPI(domain, options);
return () => api.dispose(); // Cleanup on unmount
}, []);
const _onToggle = useCallback(() => {
const newValue = !toggled;
setToggled(newValue);
dispatch(toggleQKD(newValue));
}, [ toggled ]);
return (
<div
className = { classes.qkdSection }
id = 'qkd-section'>
<p
aria-live = 'polite'
className = { classes.description }
id = 'qkd-section-description'>
{"Implementazione di QKD"}
</p>
<div className = { classes.controlRow }>
<label htmlFor = 'qkd-section-switch'>
{"QKD Toggle"}
</label>
<Switch
checked = { toggled }
disabled = { false }
id = 'qkd-section-switch'
onChange = { _onToggle } />
</div>
</div>
);
};
/**
* Maps (parts of) the Redux state to the associated props for this component.
*
* @param {Object} state - The Redux state.
* @private
* @returns {IProps}
*/
function mapStateToProps(state: IReduxState) {
const { enabled: e2eeEnabled } = state['features/e2ee'];
const { toggled: qkdToggled } = state['features/qkd'];
const { e2ee = {} } = state['features/base/config'];
console.log("DEBUG " + e2ee.externallyManagedKey);
return {
_enabled: e2eeEnabled,
_toggled: e2ee.externallyManagedKey ?? qkdToggled
};
}
export default connect(mapStateToProps)(QKDSection);
However, this create a new instance of the conference which is not what I need. Is there an alternative to iframe api?
from jitsi-meet.
Sorry, I have trouble understanding what exactly it is you are trying to do. How are you integrating Jitsi onto your app? Where does the external key come from?
from jitsi-meet.
Sorry I'll try to be more clear. We are not integrating jitsi onto our app, our app is jitsi. We only want to customize the encryption key. Thus, we're modifing jitsi itself. What we want for now is the possibility to read from a confing file the externallyManagedKey
in order to activate something.
from jitsi-meet.
Ok, it's clearer now! Then you'll want to enable the external key, yes, and then dispatch this action:
/**
* Dispatches an action to set media encryption key.
*
* @param {Object} keyInfo - Json containing key information.
* @param {string} [keyInfo.encryptionKey] - The exported encryption key.
* @param {number} [keyInfo.index] - The index of the encryption key.
* @returns {{
* type: SET_MEDIA_ENCRYPTION_KEY,
* keyInfo: Object
* }}
*/
export function setMediaEncryptionKey(keyInfo: Object) {
return {
type: SET_MEDIA_ENCRYPTION_KEY,
keyInfo
};
}
from jitsi-meet.
Yes but first thing we want to do at the starting of jitsi app is to read in some config file if externallyManagedKey
is true or false. How can we do this?
from jitsi-meet.
The config is set to a global in window
. Do you can read it from wherever you want.
from jitsi-meet.
Here window.confing.e2ee.externallyManagedKey
is undefined.
from jitsi-meet.
Is it set to something in your config.js ?
from jitsi-meet.
In config.js
EDIT:
We are not in deploy mode. @saghul
from jitsi-meet.
I'm not sure what you mean by "deploy mode", but config.js is ONLY read when you deploy your code onto a server. It's not added to the JS bundle, it's included in the index.html by a server side include.
from jitsi-meet.
@saghul we are following this guide https://community.jitsi.org/t/how-to-how-to-build-jitsi-meet-from-source-a-developers-guide/75422
When we modify the ngix file as reported, we get 403 Forbidden. Any advice?
from jitsi-meet.
DId you make sure to use correct root folder for your changes? Alternatively you can keep the config as is, and just override the modified files in /usr/share/jitsi-meet
from jitsi-meet.
Related Issues (20)
- Chrome: Permission prompts missing in web if desktop deeplinking is enabled, but not used HOT 5
- Meeting with more than two people will automatically disconnect HOT 1
- User tiles turn black after a user with share screen leaves the meet HOT 9
- Make Libravatar the default instead of Gravatar HOT 1
- Feature Request: Enhancements to Polling Functionality in Jitsi HOT 1
- Can't disable the join sound
- Android microphone doesn`t work HOT 5
- After upgrading to react-native-sdk version 2.2.1 , video not visible in video call and audio call dont have sound. in Video call shows like 'video of fellow jitser has been turned off to save bandwith' HOT 51
- App crashes when using Jitsi with Hermes enabled HOT 3
- The heading in a component on the landing page is overflowing. HOT 1
- dyld[324]: Symbol not found: _JSGlobalContextSetInspectable HOT 3
- 为什么不能单独出一下Android jar?????而且winodw不能编译 HOT 2
- Polish language detection does not work properly on Google Chrome. HOT 10
- How to switch between the front and rear cameras on a mobile device: HOT 1
- How to switch between the front and rear cameras on a mobile device: HOT 5
- when joining 3 more people,they are evicted HOT 4
- Jitsi join session unattended in kiosk mode HOT 1
- WebRTCModule java.langNoClassDefFoundError: Lorg/webrtc/EglBase and java.lang.NoSuchMethodError: Lorg/webrtc/audio/JavaAudioDeviceModule$Builder HOT 11
- Add input sensitivity / microphone threshold feature
- The same network quality, after switching VLAN, can not display the video after attending the meeting. You can send text at the meeting and the connection signal display is poor.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jitsi-meet.