"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7329/react/features/base/audio-only/reducer.ts" (9 Jun 2023, 523 Bytes) of package /linux/misc/jitsi-meet-7329.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 import ReducerRegistry from '../redux/ReducerRegistry';
    2 
    3 import { SET_AUDIO_ONLY } from './actionTypes';
    4 
    5 export interface IAudioOnlyState {
    6     enabled: boolean;
    7 }
    8 
    9 const DEFAULT_STATE = {
   10     enabled: false
   11 };
   12 
   13 
   14 ReducerRegistry.register<IAudioOnlyState>('features/base/audio-only',
   15 (state = DEFAULT_STATE, action): IAudioOnlyState => {
   16     switch (action.type) {
   17     case SET_AUDIO_ONLY:
   18         return {
   19             ...state,
   20             enabled: action.audioOnly
   21         };
   22     default:
   23         return state;
   24     }
   25 });