Working fullscreen view

This commit is contained in:
Håvar Aambø Fosstveit
2018-06-22 11:45:02 +02:00
parent fa94a62d9d
commit 3b03b24cc4
13 changed files with 311 additions and 23 deletions
+14 -5
View File
@@ -1,10 +1,11 @@
const initialState =
{
url : null,
state : 'new', // new/connecting/connected/disconnected/closed,
activeSpeakerName : null,
showSettings : false,
advancedMode : false
url : null,
state : 'new', // new/connecting/connected/disconnected/closed,
activeSpeakerName : null,
showSettings : false,
advancedMode : false,
fullScreenConsumer : null // ConsumerID
};
const room = (state = initialState, action) =>
@@ -49,6 +50,14 @@ const room = (state = initialState, action) =>
return { ...state, advancedMode };
}
case 'TOGGLE_FULLSCREEN_CONSUMER':
{
const { consumerId } = action.payload;
const currentConsumer = state.fullScreenConsumer;
return { ...state, fullScreenConsumer: currentConsumer ? null : consumerId };
}
default:
return state;
}