【问题标题】:agora rtc Unhandled error PlatformException(2, invalid argument, null, null) on iosios上的agora rtc未处理错误PlatformException(2,无效参数,null,null)
【发布时间】:2022-01-16 03:32:51
【问题描述】:

我在 ios 上使用 agora rtc 时遇到未处理错误PlatformException(2, invalid argument, null, null) 错误,它在 android 上运行没有任何错误,下面是我的代码

   final RtcEngine _engine = await RtcEngine.create(AGORA_RTC_APP_ID);
   await _engine .enableVideo();
   await _engine .enableAudio();
   await _engine .setChannelProfile(ChannelProfile.LiveBroadcasting);
   await _engine .setClientRole(ClientRole.Broadcaster);
   await _engine .muteLocalAudioStream(true);
   await _engine .enableWebSdkInteroperability(true);
   final configuration = VideoEncoderConfiguration();
   configuration.dimensions = VideoDimensions();
   await _engine .setVideoEncoderConfiguration(configuration);
   await _engine .joinChannel(
          token,
          channelName,
          null,
          userId,
        );

【问题讨论】:

    标签: flutter flutter-dependencies agora.io


    【解决方案1】:

    问题是我没有传递 VideoDimensions 参数

    configuration.dimensions = VideoDimensions(width: 1920, height: 1080);

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-28
      • 2022-07-07
      • 2022-07-12
      • 2019-11-24
      • 2019-10-01
      • 2022-09-28
      • 1970-01-01
      • 2022-07-23
      相关资源
      最近更新 更多