diff --git a/custom/shared/components/Audio/AudioTrack.js b/custom/shared/components/Audio/AudioTrack.js index e8e53ce..82b22db 100644 --- a/custom/shared/components/Audio/AudioTrack.js +++ b/custom/shared/components/Audio/AudioTrack.js @@ -1,42 +1,39 @@ import React, { useRef, useEffect } from 'react'; import PropTypes from 'prop-types'; -const AudioTrack = React.memo( - ({ track }) => { - const audioRef = useRef(null); +const AudioTrack = ({ track }) => { + const audioRef = useRef(null); - useEffect(() => { - if (!audioRef.current) return false; - let playTimeout; + useEffect(() => { + if (!audioRef.current) return false; + let playTimeout; - const handleCanPlay = () => { - playTimeout = setTimeout(() => { - console.log('Unable to autoplay audio element'); - }, 1500); - }; - const handlePlay = () => { - clearTimeout(playTimeout); - }; - audioRef.current.addEventListener('canplay', handleCanPlay); - audioRef.current.addEventListener('play', handlePlay); - audioRef.current.srcObject = new MediaStream([track]); + const handleCanPlay = () => { + playTimeout = setTimeout(() => { + console.log('Unable to autoplay audio element'); + }, 1500); + }; + const handlePlay = () => { + clearTimeout(playTimeout); + }; + audioRef.current.addEventListener('canplay', handleCanPlay); + audioRef.current.addEventListener('play', handlePlay); + audioRef.current.srcObject = new MediaStream([track]); - const audioEl = audioRef.current; + const audioEl = audioRef.current; - return () => { - audioEl?.removeEventListener('canplay', handleCanPlay); - audioEl?.removeEventListener('play', handlePlay); - }; - }, [track]); + return () => { + audioEl?.removeEventListener('canplay', handleCanPlay); + audioEl?.removeEventListener('play', handlePlay); + }; + }, [track]); - return track ? ( - - ) : null; - }, - () => true -); + return track ? ( + + ) : null; +}; AudioTrack.propTypes = { track: PropTypes.object, diff --git a/custom/shared/components/DeviceSelectModal/DeviceSelectModal.js b/custom/shared/components/DeviceSelectModal/DeviceSelectModal.js index 4ec976b..f208dc8 100644 --- a/custom/shared/components/DeviceSelectModal/DeviceSelectModal.js +++ b/custom/shared/components/DeviceSelectModal/DeviceSelectModal.js @@ -15,10 +15,12 @@ export const DeviceSelectModal = () => { isOpen={currentModals[DEVICE_MODAL]} onClose={() => closeModal(DEVICE_MODAL)} actions={[ - , - , + , ]} > diff --git a/custom/shared/components/MuteButton/MuteButton.js b/custom/shared/components/MuteButton/MuteButton.js index 5d1a420..3004ce7 100644 --- a/custom/shared/components/MuteButton/MuteButton.js +++ b/custom/shared/components/MuteButton/MuteButton.js @@ -23,8 +23,8 @@ export const MuteButton = ({ isMuted, mic = false, className, ...props }) => { }; const Icon = mic - ? [, ] - : [, ]; + ? [, ] + : [, ]; if (!callObject) return null; diff --git a/custom/shared/components/Tile/Video.js b/custom/shared/components/Tile/Video.js index 7b0008c..660c8cc 100644 --- a/custom/shared/components/Tile/Video.js +++ b/custom/shared/components/Tile/Video.js @@ -50,6 +50,8 @@ export const Video = memo( (p, n) => shallowEqualObjects(p, n) ); +Video.displayName = 'Video'; + Video.propTypes = { videoTrack: PropTypes.any, mirrored: PropTypes.bool, diff --git a/custom/shared/components/WaitingRoom/WaitingRoomModal.js b/custom/shared/components/WaitingRoom/WaitingRoomModal.js index bdf42f2..f77f2b5 100644 --- a/custom/shared/components/WaitingRoom/WaitingRoomModal.js +++ b/custom/shared/components/WaitingRoom/WaitingRoomModal.js @@ -23,10 +23,20 @@ export const WaitingRoomModal = ({ onClose }) => { isOpen onClose={() => onClose()} actions={[ - , - , ]} diff --git a/package.json b/package.json index f09ac5a..185400a 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,9 @@ "babel-eslint": "^10.1.0", "babel-plugin-inline-react-svg": "^2.0.1", "eslint": "^7.25.0", - "eslint-config-airbnb": "^18.2.1", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-react": "^7.23.2", - "eslint-plugin-react-hooks": "^4.2.0", + "eslint-plugin-import": "^2.22.1", "eslint-config-next": "^11.0.1" } } diff --git a/yarn.lock b/yarn.lock index f66f64d..ffc3f53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -934,11 +934,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -confusing-browser-globals@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" - integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== - console-browserify@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" @@ -1364,24 +1359,6 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-airbnb-base@^14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" - integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== - dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.2" - -eslint-config-airbnb@^18.2.1: - version "18.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz#b7fe2b42f9f8173e825b73c8014b592e449c98d9" - integrity sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg== - dependencies: - eslint-config-airbnb-base "^14.2.1" - object.assign "^4.1.2" - object.entries "^1.1.2" - eslint-config-next@^11.0.1: version "11.0.1" resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-11.0.1.tgz#abdd2565a6fa5841556a89ba935f044bec173d0b" @@ -1495,24 +1472,6 @@ eslint-plugin-react@^7.23.1: resolve "^2.0.0-next.3" string.prototype.matchall "^4.0.5" -eslint-plugin-react@^7.23.2: - version "7.23.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.23.2.tgz#2d2291b0f95c03728b55869f01102290e792d494" - integrity sha512-AfjgFQB+nYszudkxRkTFu0UR1zEQig0ArVMPloKhxwlwkzaw/fBiH0QWcBBhZONlXqQC51+nfqFrkn4EzHcGBw== - dependencies: - array-includes "^3.1.3" - array.prototype.flatmap "^1.2.4" - doctrine "^2.1.0" - has "^1.0.3" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.0.4" - object.entries "^1.1.3" - object.fromentries "^2.0.4" - object.values "^1.1.3" - prop-types "^15.7.2" - resolve "^2.0.0-next.3" - string.prototype.matchall "^4.0.4" - eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -2670,16 +2629,6 @@ object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.entries@^1.1.2, object.entries@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.3.tgz#c601c7f168b62374541a07ddbd3e2d5e4f7711a6" - integrity sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - has "^1.0.3" - object.entries@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.4.tgz#43ccf9a50bc5fd5b649d45ab1a579f24e088cafd" @@ -2699,7 +2648,7 @@ object.fromentries@^2.0.4: es-abstract "^1.18.0-next.2" has "^1.0.3" -object.values@^1.1.1, object.values@^1.1.3: +object.values@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.3.tgz#eaa8b1e17589f02f698db093f7c62ee1699742ee" integrity sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw== @@ -3460,19 +3409,6 @@ string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string.prototype.matchall@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.4.tgz#608f255e93e072107f5de066f81a2dfb78cf6b29" - integrity sha512-pknFIWVachNcyqRfaQSeu/FUfpvJTe4uskUSZ9Wc1RijsPuzbZ8TyYT8WCNnntCjUEqQ3vUHMAfVj2+wLAisPQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - has-symbols "^1.0.1" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.3.1" - side-channel "^1.0.4" - string.prototype.matchall@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.5.tgz#59370644e1db7e4c0c045277690cf7b01203c4da"