shogo4405 / HaishinKit.dart

Camera and Microphone streaming library via RTMP for Flutter.
https://pub.dev/packages/haishin_kit
BSD 3-Clause "New" or "Revised" License
32 stars 20 forks source link

written error: method name "setScreenSettings" was mistakenly written as setScreenSettigns in rtmp_stream_method_channel.dart #64

Open buguniao opened 4 months ago

buguniao commented 4 months ago

Describe the bug

error : Unhandled Exception: MissingPluginException(No implementation found for method RtmpStream#setScreenSettigns on channel com.haishinkit)

and obviously this is a written error

To Reproduce

  1. _stream?.screenSettings = ScreenSettings(width: 1080, height: 1920);
  2. run your flutter project in iphone
  3. you will see the error in console: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method RtmpStream#setScreenSettigns on channel com.haishinkit)

    0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)

Expected behavior

there is no error, and everything is ok

Version

flutter 3.22.2 Dart 3.4.3 haishin_kit: ^0.13.0

Smartphone info.

iphone 13 ios 17.5.1

Additional context

No response

Screenshots

![Uploading WX20240720-081414@2x.png…]()

Relevant log output

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method RtmpStream#setScreenSettigns on channel com.haishinkit)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)
<asynchronous suspension>
#1      MethodChannelRtmpStream.setScreenSettings (package:haishin_kit/rtmp_stream_method_channel.dart:57:12)
<asynchronous suspension>
[ERROR:flutter/shell/common/shell.cc(1055)] The 'com.haishinkit.eventchannel/12916161104' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
flutter: -------------->
flutter: {type: ioError, data: null}
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: NoSuchMethodError: The method '[]' was called on null.
shogo4405 commented 4 months ago

It's not so much a bug as it is simply not supported yet. I'll update it when I find the time.