Skip to content

Commit

Permalink
Update consumer pause state properly
Browse files Browse the repository at this point in the history
  • Loading branch information
havfo committed Mar 15, 2024
1 parent 037eeac commit 56665b1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/store/middlewares/mediaMiddleware.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,13 @@ const createMediaMiddleware = ({

pausedConsumersList.forEach(({ id: consumerId, peerId }) => {
if (peerId !== removedPeerId && consumerId !== removedConsumerId) {
mediaService.changeConsumer(consumerId, 'pause');
dispatch(consumersActions.setConsumerPaused({ consumerId }));
dispatch(consumersActions.setConsumerPaused({ consumerId, local: true }));
}
});

resumedConsumersList.forEach(({ id: consumerId, peerId }) => {
if (peerId !== removedPeerId && consumerId !== removedConsumerId) {
mediaService.changeConsumer(consumerId, 'resume');
dispatch(consumersActions.setConsumerResumed({ consumerId }));
dispatch(consumersActions.setConsumerResumed({ consumerId, local: true }));
}
});

Expand Down

0 comments on commit 56665b1

Please sign in to comment.