MediaSFU React Native
    Preparing search index...

    Function compareScreenStates

    • Compares the current screen states with the previous screen states and triggers actions based on changes.

      Parameters

      Returns Promise<void>

      A promise that resolves when the comparison and any triggered actions are complete.

      Will log an error message if an error occurs during the comparison process.

      const options = {
      restart: false,
      parameters: {
      getUpdatedAllParams: getUpdatedAllParamsFunction,
      recordingDisplayType: 'video',
      recordingVideoOptimized: true,
      screenStates: [{ key1: 'value1' }, { key2: 'value2' }],
      prevScreenStates: [{ key1: 'value1' }, { key2: 'value2' }],
      activeNames: ['name1', 'name2'],
      trigger: triggerFunction,
      },
      };

      compareScreenStates(options)
      .then(() => {
      console.log('Screen states compared successfully');
      });