反应本机 webview,播放 youtube 视频 - 违反设备和网络滥用政策

React native webivew, playing youtube videos - Violation of Device and Network Abuse policy

我将我的应用程序提交到 Play 商店时收到以下错误。如何提交我的应用程序?

export default class VideoPlayer extends React.PureComponent {
  constructor(props) {
    super(props);
    this.state = {
      appState: AppState.currentState
    };
  }

  componentDidMount() {
    AppState.addEventListener("change", this._handleAppStateChange);
  }

  componentWillUnmount() {
    AppState.removeEventListener("change", this._handleAppStateChange);
  }

  _handleAppStateChange = nextAppState => {
    this.setState({ appState: nextAppState });
  };

  render() {
    let {

      youtubeVideo,

    } = this.props;

    return (
      <View style={styles.container}>
        {this.state.appState == "active" && (
          <WebView
            mediaPlaybackRequiresUserAction={true}
            style={{
              height: 240,
              width: "100%",
              alignSelf: "center",
              alignContent: "center"
            }}
            source={{
              uri: `https://www.youtube.com/embed/${youtubeVideo}?rel=0`
            }}
          />
        )}
      </View>
    );
  }
}

Issue: Violation of Device and Network Abuse policy We don’t allow apps that interfere with, disrupt, damage, or access in an unauthorized manner the user’s device, other devices or computers, servers, networks, application programming interfaces (APIs), or services, including but not limited to other apps on the device, any Google service, or an authorized carrier’s network.

Your app shouldn’t access or use the service or API in a manner that violates its terms of service. For example, your app shouldn't download, monetize, or access YouTube videos in a way that violates the YouTube Terms of Service.

通过将以下内容添加到 AndroidManifest.xml 来修复:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />