getMethodFromName static method

HMSUpdateListenerMethod getMethodFromName(
  1. String name
)

Implementation

static HMSUpdateListenerMethod getMethodFromName(String name) {
  switch (name) {
    case 'on_join_room':
      return HMSUpdateListenerMethod.onJoinRoom;
    case 'on_room_update':
      return HMSUpdateListenerMethod.onUpdateRoom;
    case 'on_peer_update':
      return HMSUpdateListenerMethod.onPeerUpdate;
    case 'on_track_update':
      return HMSUpdateListenerMethod.onTrackUpdate;
    case 'on_error':
      return HMSUpdateListenerMethod.onError;
    case 'on_message':
      return HMSUpdateListenerMethod.onMessage;
    case 'on_update_speaker':
      return HMSUpdateListenerMethod.onUpdateSpeaker;
    case 'on_re_connecting':
      return HMSUpdateListenerMethod.onReconnecting;
    case 'on_re_connected':
      return HMSUpdateListenerMethod.onReconnected;
    case 'on_role_change_request':
      return HMSUpdateListenerMethod.onRoleChangeRequest;
    case 'on_change_track_state_request':
      return HMSUpdateListenerMethod.onChangeTrackStateRequest;
    case 'on_removed_from_room':
      return HMSUpdateListenerMethod.onRemovedFromRoom;
    case 'on_audio_device_changed':
      return HMSUpdateListenerMethod.onAudioDeviceChanged;
    case 'on_session_store_available':
      return HMSUpdateListenerMethod.onSessionStoreAvailable;
    case 'on_peer_list_update':
      return HMSUpdateListenerMethod.onPeerListUpdate;
    default:
      return HMSUpdateListenerMethod.unknown;
  }
}