getMethodFromName static method
Implementation
static PlatformMethod getMethodFromName(String name) {
switch (name) {
case 'join':
return PlatformMethod.join;
case 'leave':
return PlatformMethod.leave;
case 'on_leave':
return PlatformMethod.onLeave;
case 'on_join_room':
return PlatformMethod.onJoinRoom;
case 'on_update_room':
return PlatformMethod.onUpdateRoom;
case 'on_peer_update':
return PlatformMethod.onPeerUpdate;
case 'on_track_update':
return PlatformMethod.onTrackUpdate;
case 'on_error':
return PlatformMethod.onError;
case 'on_message':
return PlatformMethod.onMessage;
case 'on_update_speaker':
return PlatformMethod.onUpdateSpeaker;
case 'on_re_connecting':
return PlatformMethod.onReconnecting;
case 'on_re_connected':
return PlatformMethod.onReconnected;
case 'switch_audio':
return PlatformMethod.switchAudio;
case 'switch_video':
return PlatformMethod.switchVideo;
case 'switch_camera':
return PlatformMethod.switchCamera;
case 'is_audio_mute':
return PlatformMethod.isAudioMute;
case 'is_video_mute':
return PlatformMethod.isVideoMute;
case 'send_broadcast_message':
return PlatformMethod.sendBroadcastMessage;
case 'send_direct_message':
return PlatformMethod.sendDirectMessage;
case 'send_group_message':
return PlatformMethod.sendGroupMessage;
case 'preview':
return PlatformMethod.preview;
case 'preview_for_role':
return PlatformMethod.previewForRole;
case "cancel_preview":
return PlatformMethod.cancelPreview;
case 'accept_change_role':
return PlatformMethod.acceptChangeRole;
case 'change_role':
return PlatformMethod.changeRole;
case 'change_role_of_peer':
return PlatformMethod.changeRoleOfPeer;
case 'get_roles':
return PlatformMethod.getRoles;
case 'on_change_track_state_request':
return PlatformMethod.changeTrackState;
case 'end_room':
return PlatformMethod.endRoom;
case 'remove_peer':
return PlatformMethod.removePeer;
case 'mute_room_audio_locally':
return PlatformMethod.muteRoomAudioLocally;
case 'un_mute_room_audio_locally':
return PlatformMethod.unMuteRoomAudioLocally;
case 'mute_room_video_locally':
return PlatformMethod.muteRoomVideoLocally;
case 'un_mute_room_video_locally':
return PlatformMethod.unMuteRoomVideoLocally;
case 'get_local_peer':
return PlatformMethod.getLocalPeer;
case 'get_remote_peers':
return PlatformMethod.getRemotePeers;
case 'get_peers':
return PlatformMethod.getPeers;
case 'start_hms_logger':
return PlatformMethod.startHMSLogger;
case 'remove_hms_logger':
return PlatformMethod.removeHMSLogger;
case 'change_track_state_for_role':
return PlatformMethod.changeTrackStateForRole;
case 'start_rtmp_or_recording':
return PlatformMethod.startRtmpOrRecording;
case 'stop_rtmp_and_recording':
return PlatformMethod.stopRtmpAndRecording;
case 'build':
return PlatformMethod.build;
case "get_room":
return PlatformMethod.getRoom;
case "change_metadata":
return PlatformMethod.changeMetadata;
case "set_volume":
return PlatformMethod.setVolume;
case "change_name":
return PlatformMethod.changeName;
case "hls_stop_streaming":
return PlatformMethod.stopHlsStreaming;
case "hls_start_streaming":
return PlatformMethod.startHlsStreaming;
case "start_screen_share":
return PlatformMethod.startScreenShare;
case "stop_screen_share":
return PlatformMethod.stopScreenShare;
case 'is_screen_share_active':
return PlatformMethod.isScreenShareActive;
case "get_track_by_id":
return PlatformMethod.getTrackById;
case "get_all_tracks":
return PlatformMethod.getAllTracks;
case "start_stats_listener":
return PlatformMethod.startStatsListener;
case "remove_stats_listener":
return PlatformMethod.removeStatsListener;
case "get_audio_devices_list":
return PlatformMethod.getAudioDevicesList;
case "get_current_audio_device":
return PlatformMethod.getCurrentAudioDevice;
case "switch_audio_output":
return PlatformMethod.switchAudioOutput;
case "start_audio_share":
return PlatformMethod.startAudioShare;
case "stop_audio_share":
return PlatformMethod.stopAudioShare;
case "set_audio_mixing_mode":
return PlatformMethod.setAudioMixingMode;
case "pause_audio_share":
return PlatformMethod.pauseAudioShare;
case "play_audio_share":
return PlatformMethod.playAudioShare;
case "resume_audio_share":
return PlatformMethod.resumeAudioShare;
case "set_audio_share_volume":
return PlatformMethod.setAudioShareVolume;
case "audio_share_playing":
return PlatformMethod.audioSharePlaying;
case "audio_share_current_time":
return PlatformMethod.audioShareCurrentTime;
case "audio_share_duration":
return PlatformMethod.audioShareDuration;
case "get_track_settings":
return PlatformMethod.getTrackSettings;
case "destroy":
return PlatformMethod.destroy;
case "set_playback_allowed_for_track":
return PlatformMethod.setPlaybackAllowedForTrack;
case "enter_pip_mode":
return PlatformMethod.enterPipMode;
case "is_pip_active":
return PlatformMethod.isPipActive;
case "is_pip_available":
return PlatformMethod.isPipAvailable;
case "set_simulcast_layer":
return PlatformMethod.setSimulcastLayer;
case "change_role_of_peers_with_roles":
return PlatformMethod.changeRoleOfPeersWithRoles;
case "get_layer":
return PlatformMethod.getLayer;
case "get_layer_definition":
return PlatformMethod.getLayerDefinition;
case "setup_pip":
return PlatformMethod.setupPIP;
case "change_track_pip":
return PlatformMethod.changeTrackPIP;
case "change_text_pip":
return PlatformMethod.changeTextPIP;
case "destroy_pip":
return PlatformMethod.destroyPIP;
case "toggle_mic_mute_state":
return PlatformMethod.toggleMicMuteState;
case "toggle_camera_mute_state":
return PlatformMethod.toggleCameraMuteState;
case "capture_snapshot":
return PlatformMethod.captureSnapshot;
case "get_all_logs":
return PlatformMethod.getAllLogs;
case "get_auth_token_by_room_code":
return PlatformMethod.getAuthTokenByRoomCode;
case "capture_image_at_max_supported_resolution":
return PlatformMethod.captureImageAtMaxSupportedResolution;
case "is_flash_supported":
return PlatformMethod.isFlashSupported;
case "toggle_flash":
return PlatformMethod.toggleFlash;
case "get_session_metadata_for_key":
return PlatformMethod.getSessionMetadataForKey;
case "set_session_metadata_for_key":
return PlatformMethod.setSessionMetadataForKey;
case "add_key_change_listener":
return PlatformMethod.addKeyChangeListener;
case "remove_key_change_listener":
return PlatformMethod.removeKeyChangeListener;
///HLS Player methods
case "start_hls_player":
return PlatformMethod.start;
case "stop_hls_player":
return PlatformMethod.stop;
case "pause_hls_player":
return PlatformMethod.pause;
case "resume_hls_player":
return PlatformMethod.resume;
case "seek_to_live_position":
return PlatformMethod.seekToLivePosition;
case "seek_forward":
return PlatformMethod.seekForward;
case "seek_backward":
return PlatformMethod.seekBackward;
case "set_hls_player_volume":
return PlatformMethod.setHLSPlayerVolume;
case "add_hls_stats_listener":
return PlatformMethod.addHLSStatsListener;
case "remove_hls_stats_listener":
return PlatformMethod.removeHLSStatsListener;
case "are_closed_captions_supported":
return PlatformMethod.areClosedCaptionsSupported;
case "enable_closed_captions":
return PlatformMethod.enableClosedCaptions;
case "disable_closed_captions":
return PlatformMethod.disableClosedCaptions;
case "get_stream_properties":
return PlatformMethod.getStreamProperties;
case "switch_audio_output_using_ios_ui":
return PlatformMethod.switchAudioOutputUsingiOSUI;
case "send_hls_timed_metadata":
return PlatformMethod.sendHLSTimedMetadata;
case "toggle_always_screen_on":
return PlatformMethod.toggleAlwaysScreenOn;
case "get_room_layout":
return PlatformMethod.getRoomLayout;
///Peer List Iterator methods
case "get_peer_list_iterator":
return PlatformMethod.getPeerListIterator;
case "peer_list_iterator_has_next":
return PlatformMethod.peerListIteratorHasNext;
case "peer_list_iterator_next":
return PlatformMethod.peerListIteratorNext;
///raise/lower hand
case "lower_local_peer_hand":
return PlatformMethod.lowerLocalPeerHand;
case "lower_remote_peer_hand":
return PlatformMethod.lowerRemotePeerHand;
case "raise_local_peer_hand":
return PlatformMethod.raiseLocalPeerHand;
///TextureView methods
case "create_texture_view":
return PlatformMethod.createTextureView;
case "dispose_texture_view":
return PlatformMethod.disposeTextureView;
case "add_track":
return PlatformMethod.addTrack;
case "remove_track":
return PlatformMethod.removeTrack;
case "set_display_resolution":
return PlatformMethod.setDisplayResolution;
///Poll methods
case "add_poll_update_listener":
return PlatformMethod.addPollUpdateListener;
case "remove_poll_update_listener":
return PlatformMethod.removePollUpdateListener;
case "quick_start_poll":
return PlatformMethod.quickStartPoll;
case "add_single_choice_poll_response":
return PlatformMethod.addSingleChoicePollResponse;
case "add_multi_choice_poll_response":
return PlatformMethod.addMultiChoicePollResponse;
case "stop_poll":
return PlatformMethod.stopPoll;
case "fetch_leaderboard":
return PlatformMethod.fetchLeaderboard;
case "fetch_poll_list":
return PlatformMethod.fetchPollList;
case "fetch_poll_questions":
return PlatformMethod.fetchPollQuestions;
case "get_poll_results":
return PlatformMethod.getPollResults;
///Noise cancellation Methods
case "enable_noise_cancellation":
return PlatformMethod.enableNoiseCancellation;
case "disable_noise_cancellation":
return PlatformMethod.disableNoiseCancellation;
case "is_noise_cancellation_enabled":
return PlatformMethod.isNoiseCancellationEnabled;
case "is_noise_cancellation_available":
return PlatformMethod.isNoiseCancellationAvailable;
default:
return PlatformMethod.unknown;
}
}