How to use the react-native-agora.RtcEngine.leaveChannel function in react-native-agora

To help you get started, we’ve selected a few react-native-agora examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github syanbo / react-native-agora / samples / simpleDemo / components / agora.js View on Github external
RtcEngine.on('error', (data) => {
      if (data.error === 17) {
        RtcEngine.leaveChannel().then(_ => {
          RtcEngine.destroy();
          this.props.onCancel(data);
        });
      }
    })
    console.log("[CONFIG]", JSON.stringify(config));
github syanbo / react-native-agora / samples / simpleDemo / components / agora.js View on Github external
handleCancel = () => {
    RtcEngine.leaveChannel();
    RtcEngine.removeAllListeners();
    RtcEngine.destroy();
    this.props.onCancel();
  }
github syanbo / react-native-agora / samples / simpleDemo / components / agora.js View on Github external
componentWillUnmount () {
    if (this.state.joinSucceed) {
      RtcEngine.leaveChannel();
      RtcEngine.removeAllListeners();
      RtcEngine.destroy();
    }
  }