bigbluebutton-Github/bigbluebutton-html5/.eslintrc.js

33 lines
635 B
JavaScript
Raw Normal View History

2017-06-03 02:55:23 +08:00
module.exports = {
2021-04-10 02:02:18 +08:00
extends: 'airbnb',
parserOptions: {
ecmaVersion: 2020,
},
plugins: [
'react',
'jsx-a11y',
'import',
],
env: {
es6: true,
node: true,
browser: true,
meteor: true,
jasmine: true,
},
rules: {
'no-underscore-dangle': 0,
'import/extensions': [2, 'never'],
'import/no-absolute-path': 0,
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': 1,
'react/prop-types': 1,
'jsx-a11y/no-access-key': 0,
'react/jsx-props-no-spreading': 'off',
fix: mic selection (firefox/all browsers) and muted alert when mic is changed This commit contains three fixes: one already reported and two detected during the investigation of the solution. This started as a fix for firefox (#12023), but i also fixed the muted alert/banner when device changes: the banner wasn't detecting device changes, unless audio was deactived/actived. There's another fix for the microphone stream: we now keep sender's track disabled if it was already disabled for the sender's track of the previous selected device. Also did small refactor for eslint checking. Some technical information: in sip bridge (bridge/sip.js), setInputStream and liveChangeInputDevice function were both fully turned into promises, which guarantees we have everything ready when it resolves to the respective values. This helps AudioManager (audio-manager/index.js) to sequentially sets and tracks the state of the current microphone stream (inputStream), when calling liveChangeInputDevice function: we first set the current stream to null, creats a new one and then set it to the newly created value - this is needed because MutedAlert (muted-alert/component.jsx) can then gracefully allocate/deallocate the cloned stream when it is set to a non-null/null value (the cloned stream is used for speech detection with hark). In MutedAlert we also make sure to enable the cloned stream's audio tracks, just in case the user change the device when muted (audio track is disabled in this case), which also leaves the cloned stream muted (we then enable the track to allow speech detection). Closes #12023
2021-04-16 21:45:40 +08:00
'max-classes-per-file': ['error', 2],
2021-04-10 02:02:18 +08:00
},
globals: {
browser: 'writable',
},
2017-06-03 02:55:23 +08:00
};