Conversation
* Install storybook and add basic files * Get storybook working * Get grid view working * Hook up menu button * Fix some issues * Fix index.html caching issue * Update publication component and tests * Update Room tests * Update constants * Upgrade typescript * Update menu tests * Update TS things for new version * Rename state variable * Add test for ParticipantAudioTracks * Remove unused passcode stuff from twilio mock * Automatically disable conversations in storybook * Fix tests and linting issues * Add tests for GridView * Fix participant issue in stories * Add comment for ParticipantAudioTracks * Remove unnecessary code
* Install storybook and add basic files * Get storybook working * Get grid view working * Hook up menu button * Fix some issues * Fix index.html caching issue * Update publication component and tests * Update Room tests * Update constants * Upgrade typescript * Update menu tests * Update TS things for new version * Rename state variable * Add test for ParticipantAudioTracks * Remove unused passcode stuff from twilio mock * Automatically disable conversations in storybook * Fix tests and linting issues * Add tests for GridView * Install mui pagination component * Fix issue with storybook controls * Add pagination controls to state * Create usePagination hook * Add pagination to GridView component * Add setting for MaxGridParticipants * Remove unused constant and fix a few glitches * Add tests for usePagination * Update tests for GridView component * Fix linting issue * Only render Pagination component when there is more than one page * Display participant count in menu * Fix tests * remove console log * Fix linter errors * Fix test language * Fix issue with chat window rendering incorrectly
manjeshbhargav
left a comment
There was a problem hiding this comment.
Apart from the suggested changes, we also need to handle audio tracks being switched off by disabling the audio level indicator and changing the mic icon.
| useEffect(() => { | ||
| setIsEnabled(track ? track.isEnabled : false); | ||
| // @ts-ignore | ||
| setIsEnabled(track?.mediaStreamTrack === null || track?.switchOffReason !== 'DisabledByPublisher'); |
There was a problem hiding this comment.
| setIsEnabled(track?.mediaStreamTrack === null || track?.switchOffReason !== 'DisabledByPublisher'); | |
| setIsEnabled(track?.switchOffReason !== Track.DISABLED_BY_PUBLISHER); |
| track.on('disabled', setDisabled); | ||
| const handleSwitchOff = (_track: TrackType) => { | ||
| // @ts-ignore | ||
| if (_track.switchOffReason === 'DisabledByPublisher') { |
There was a problem hiding this comment.
| if (_track.switchOffReason === 'DisabledByPublisher') { | |
| if (_track.switchOffReason === Track.DISABLED_BY_PUBLISHER) { |
|
Thanks @manjeshbhargav! I've updated the branch to use the correct string for Also, for this: I think this will already be handled by the changes to the |
@timmydoza We need to handle other switch off reasons as well. Either we can re-use the mic disabled icon, or we can use another icon to help us differentiate between disabled and switched off. |
manjeshbhargav
left a comment
There was a problem hiding this comment.
The changes look good. I think we still need to add UI notification for switched off audio tracks (apart from disabled by publisher).
| const handleSwitchOff = (_track: TrackType) => { | ||
| // @ts-ignore | ||
| if (_track.switchOffReason === 'disabled-by-publisher') { | ||
| setIsEnabled(false); | ||
| } | ||
| }; | ||
| const handleSwitchOn = () => setIsEnabled(true); |
There was a problem hiding this comment.
Can't this be:
| const handleSwitchOff = (_track: TrackType) => { | |
| // @ts-ignore | |
| if (_track.switchOffReason === 'disabled-by-publisher') { | |
| setIsEnabled(false); | |
| } | |
| }; | |
| const handleSwitchOn = () => setIsEnabled(true); | |
| const handleSwitchOff = (_track: TrackType) => { | |
| // @ts-ignore | |
| setIsEnabled(_track.switchOffReason !== 'disabled-by-publisher'); | |
| }; | |
| const handleSwitchOn = () => setIsEnabled(true); |
* Add useLocalStorageState hook * Fix mocked localStorage class * Add useLocalStorageState hook to app to persist settings * Add comment to useLocalStorageState hook * Update formatting
* Fix linter error * Update code formatting
* Update node version in app.yaml * Fix bug with usePresentationParticipants
Contributing to Twilio
Pull Request Details
JIRA link(s):
Description
A description of what this PR does.
Burndown
Before review
npm testBefore merge