hark running now on producers and consumers directly instead on PeerView component, now we can send audiolevel events into more places ...
This commit is contained in:
@@ -35,6 +35,15 @@ const consumers = (state = initialState, action) =>
|
||||
return { ...state, [consumerId]: newConsumer };
|
||||
}
|
||||
|
||||
case 'SET_CONSUMER_VOLUME':
|
||||
{
|
||||
const { consumerId, volume } = action.payload;
|
||||
const consumer = state[consumerId];
|
||||
const newConsumer = { ...consumer, volume };
|
||||
|
||||
return { ...state, [consumerId]: newConsumer };
|
||||
}
|
||||
|
||||
case 'SET_CONSUMER_RESUMED':
|
||||
{
|
||||
const { consumerId, originator } = action.payload;
|
||||
|
||||
@@ -35,6 +35,15 @@ const producers = (state = initialState, action) =>
|
||||
return { ...state, [producerId]: newProducer };
|
||||
}
|
||||
|
||||
case 'SET_PRODUCER_VOLUME':
|
||||
{
|
||||
const { producerId, volume } = action.payload;
|
||||
const producer = state[producerId];
|
||||
const newProducer = { ...producer, volume };
|
||||
|
||||
return { ...state, [producerId]: newProducer };
|
||||
}
|
||||
|
||||
case 'SET_PRODUCER_RESUMED':
|
||||
{
|
||||
const { producerId, originator } = action.payload;
|
||||
|
||||
@@ -331,6 +331,22 @@ export const setConsumerTrack = (consumerId, track) =>
|
||||
};
|
||||
};
|
||||
|
||||
export const setConsumerVolume = (consumerId, volume) =>
|
||||
{
|
||||
return {
|
||||
type : 'SET_CONSUMER_VOLUME',
|
||||
payload : { consumerId, volume }
|
||||
};
|
||||
};
|
||||
|
||||
export const setProducerVolume = (producerId, volume) =>
|
||||
{
|
||||
return {
|
||||
type : 'SET_PRODUCER_VOLUME',
|
||||
payload : { producerId, volume }
|
||||
};
|
||||
};
|
||||
|
||||
export const addNotification = (notification) =>
|
||||
{
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user