diff --git a/src/screens/multiview/MultiView.tsx b/src/screens/multiview/MultiView.tsx index 2e7c3a3..d996eae 100644 --- a/src/screens/multiview/MultiView.tsx +++ b/src/screens/multiview/MultiView.tsx @@ -122,11 +122,6 @@ export const MultiView = ({ navigation }) => { dispatch({ type: 'viewer/setPlaying', payload: false }); dispatch({ type: 'viewer/setIsMediaSet', payload: true }); dispatch({ type: 'viewer/resetRemoteTrackSources' }); - dispatch({ - type: 'viewer/setSelectedSource', - payload: null, - }); - dispatch({ type: 'viewer/setSourceIds', payload: [] }); }; const handleTrack = async (event: RTCTrackEvent) => { @@ -364,12 +359,6 @@ export const MultiView = ({ navigation }) => { useEffect(() => { if (netInfo.isConnected === false) { dispatch({ type: 'viewer/resetRemoteTrackSources' }); - dispatch({ - type: 'viewer/setSelectedSource', - payload: null, - }); - dispatch({ type: 'viewer/setSourceIds', payload: [] }); - // Set error when there is no network connection dispatch({ type: 'viewer/setError', payload: 'No internet connection' }); } diff --git a/src/store/reducers/viewer.js b/src/store/reducers/viewer.js index 57197e0..0789c4d 100644 --- a/src/store/reducers/viewer.js +++ b/src/store/reducers/viewer.js @@ -33,11 +33,6 @@ const viewerReducer = (state = initialState, action) => { ...state, accountId: action.payload, }; - case 'viewer/setSourceIds': - return { - ...state, - sourceIds: action.payload, - }; case 'viewer/setActiveLayers': return { ...state, @@ -96,6 +91,9 @@ const viewerReducer = (state = initialState, action) => { return { ...state, remoteTrackSources: [], + audioRemoteTrackSource: null, + selectedSource: null, + sourceIds: [], }; case 'viewer/addAudioRemoteTrackSource': return {