video_player_win
video_player_win copied to clipboard
Video player crashed on release mode
The 'video_player_win' 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.
As you said, it seems that MethodChannel.setMethodCallHandler() cannot work with isolate. related issue
However, currently there is no way to send message from native to platform thread when you create VideoPlayerController in isolate. Even if it is allowed to force sending to platform thread, I think it is not a good idea because the main thread maybe killed when application is put into background for a long time in Android/iOS (even though Windows app has no such a problem).
So I won't fix this unless you can tell me which package has already support this feature, or providing me more workable solution. Or just wait until flutter team fix it.
More information, _background_isolate_binary_messenger_io.dart in official flutter codebase has the following code:
void setMessageHandler(String channel, MessageHandler? handler) {
throw UnsupportedError(
'Background isolates do not support setMessageHandler(). Messages from the host platform always go to the root isolate.');
}