Skip to content

Commit

Permalink
Cleanup unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken committed Dec 18, 2024
1 parent a0a5fc2 commit 496b5fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// src/EffectsDrawer.test.js
import React from 'react';
import { render } from '@testing-library/react';
import { ConferenceContext } from 'pages/AntMedia';
import CameraButton from 'Components/Footer/Components/CameraButton';
import EffectsDrawer from "../../../../Components/EffectsDrawer";

// Mock the props
Expand Down
48 changes: 12 additions & 36 deletions react/src/pages/AntMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -3014,30 +3014,6 @@ function AntMedia(props) {
webRTCAdaptor?.setVolumeLevel(audioLevel);
}

const handleMuteParticipant = React.useCallback((participant) => {
setParticipantIdMuted(participant);
}, []);

const handleTurnOnYourMicNotification = React.useCallback((participant) => {
turnOnYourMicNotification(participant);
}, []);

const handleTurnOffYourMicNotification = React.useCallback((participant) => {
turnOffYourMicNotification(participant);
}, []);

const handleTurnOffYourCamNotification = React.useCallback((participant) => {
turnOffYourCamNotification(participant);
}, []);

const handlePinVideo = React.useCallback((streamId) => {
pinVideo(streamId);
}, []);

const handleLocalVideoCreate = React.useCallback((tempLocalVideo) => {
localVideoCreate(tempLocalVideo);
}, []);

return (!initialized ? <>
<Grid
container
Expand Down Expand Up @@ -3290,11 +3266,11 @@ function AntMedia(props) {
isPublished={isPublished}
allParticipants={allParticipants}
setAudioLevelListener={(listener, period) => setAudioLevelListener(listener, period)}
setParticipantIdMuted={(participant) => handleMuteParticipant(participant)}
turnOnYourMicNotification={(streamId) => handleTurnOnYourMicNotification(streamId)}
turnOffYourMicNotification={(streamId) => handleTurnOffYourMicNotification(streamId)}
turnOffYourCamNotification={(streamId) => handleTurnOffYourCamNotification(streamId)}
pinVideo={(streamId) => handlePinVideo(streamId)}
setParticipantIdMuted={(participant) => setParticipantIdMuted(participant)}
turnOnYourMicNotification={(streamId) => turnOnYourMicNotification(streamId)}
turnOffYourMicNotification={(streamId) => turnOffYourMicNotification(streamId)}
turnOffYourCamNotification={(streamId) => turnOffYourCamNotification(streamId)}
pinVideo={(streamId) => pinVideo(streamId)}

Check warning on line 3273 in react/src/pages/AntMedia.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/AntMedia.js#L3268-L3273

Added lines #L3268 - L3273 were not covered by tests
isAdmin={isAdmin}
publishStreamId={publishStreamId}
/>
Expand All @@ -3314,7 +3290,7 @@ function AntMedia(props) {
isMuteParticipantDialogOpen={isMuteParticipantDialogOpen}
setMuteParticipantDialogOpen={(open) => setMuteParticipantDialogOpen(open)}

Check warning on line 3291 in react/src/pages/AntMedia.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/AntMedia.js#L3291

Added line #L3291 was not covered by tests
publishStreamId={publishStreamId}
pinVideo={(streamId) => handlePinVideo(streamId)}
pinVideo={(streamId) => pinVideo(streamId)}

Check warning on line 3293 in react/src/pages/AntMedia.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/AntMedia.js#L3293

Added line #L3293 was not covered by tests
allParticipants={allParticipants}
participantUpdated={participantUpdated}
videoTrackAssignments={videoTrackAssignments}
Expand All @@ -3326,10 +3302,10 @@ function AntMedia(props) {
isMyMicMuted={isMyMicMuted}
isMyCamTurnedOff={isMyCamTurnedOff}
setAudioLevelListener={(listener, period) => setAudioLevelListener(listener, period)}
setParticipantIdMuted={(participant) => handleMuteParticipant(participant)}
turnOnYourMicNotification={(streamId) => handleTurnOnYourMicNotification(streamId)}
turnOffYourMicNotification={(streamId) => handleTurnOffYourMicNotification(streamId)}
turnOffYourCamNotification={(streamId) => handleTurnOffYourCamNotification(streamId)}
setParticipantIdMuted={(participant) => setParticipantIdMuted(participant)}
turnOnYourMicNotification={(streamId) => turnOnYourMicNotification(streamId)}
turnOffYourMicNotification={(streamId) => turnOffYourMicNotification(streamId)}
turnOffYourCamNotification={(streamId) => turnOffYourCamNotification(streamId)}

Check warning on line 3308 in react/src/pages/AntMedia.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/AntMedia.js#L3304-L3308

Added lines #L3304 - L3308 were not covered by tests
isAdmin={isAdmin}
localVideo={localVideo}
localVideoCreate={(tempLocalVideo) => localVideoCreate(tempLocalVideo)}

Check warning on line 3311 in react/src/pages/AntMedia.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/AntMedia.js#L3311

Added line #L3311 was not covered by tests
Expand Down Expand Up @@ -3385,7 +3361,7 @@ function AntMedia(props) {
<ParticipantListDrawer
globals={globals}
isAdmin={isAdmin}
pinVideo={(streamId) => handlePinVideo(streamId)}
pinVideo={(streamId) => pinVideo(streamId)}
makeListenerAgain={(streamId) => {}}

Check warning on line 3365 in react/src/pages/AntMedia.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/AntMedia.js#L3364-L3365

Added lines #L3364 - L3365 were not covered by tests
videoTrackAssignments={videoTrackAssignments}
presenterButtonStreamIdInProcess={presenterButtonStreamIdInProcess}
Expand All @@ -3397,7 +3373,7 @@ function AntMedia(props) {
publishStreamId={publishStreamId}
muteLocalMic={()=>muteLocalMic()}
turnOffYourMicNotification={(streamId) => turnOffYourMicNotification(streamId)}
setParticipantIdMuted={(participant) => handleMuteParticipant(participant)}
setParticipantIdMuted={(participant) => setParticipantIdMuted(participant)}

Check warning on line 3376 in react/src/pages/AntMedia.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/AntMedia.js#L3374-L3376

Added lines #L3374 - L3376 were not covered by tests
pagedParticipants={pagedParticipants}
updateAllParticipantsPagination={(value) => updateAllParticipantsPagination(value)}

Check warning on line 3378 in react/src/pages/AntMedia.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/AntMedia.js#L3378

Added line #L3378 was not covered by tests
participantListDrawerOpen={participantListDrawerOpen}
Expand Down

0 comments on commit 496b5fe

Please sign in to comment.