sony / flutter-elinux-plugins

Flutter plugins for embedded Linux (eLinux)
BSD 3-Clause "New" or "Revised" License
43 stars 23 forks source link

[Video Player] Unhandled Exception: PlatformException #88

Closed imaceda closed 6 months ago

imaceda commented 7 months ago

Hi,

I'm trying to use the video-player plugin in flutter-elinux-plugins. When running the example on the my ubuntu desktop, it completely works ok.

But when I cross compile this and run video-player-plugin example on an arm64 embedded linux environment
I encountered the error below during initialization.

Do I need a video player inside my embedded linux environment to be able to run this? I'm running this over weston using flutter-client.

$> flutter-client --bundle=pathOfBundle -f

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)

0 ELinuxVideoPlayerApi.initialize (package:video_player_elinux/src/messages.g.dart:202)

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) #0 ELinuxVideoPlayerApi.setMixWithOthers (package:video_player_elinux/src/messages.g.dart:454) #1 VideoPlayerController.initialize (package:video_player/video_player.dart:434)
HidenoriMatsubayashi commented 7 months ago

Questions here.

  1. Necessary gstreamer libraries has been installed in your target device?
  2. Do other plugins such as shared_preferences work with the same steps?
  3. Would it be possible for you to build and run the video plugin example on your target device without cross-building? It means, can you try self-build on the board?
imaceda commented 7 months ago

Questions here.

  1. Necessary gstreamer libraries has been installed in your target device?

I added/installed the following libraries:

"gstreamer1.0" "gstreamer1.0-dev" "gstreamer1.0-plugins-good" "gstreamer1.0-plugins-bad" "gstreamer1.0-plugins-base" "gstreamer1.0-plugins-base-dev" "gstreamer1.0-plugins-ugly" "gstreamer1.0-libav" "libvpx"

  1. Do other plugins such as shared_preferences work with the same steps?

I tried the shared_preferences plugin, it shows no errors when it runs but it just complains about no permission on the /root/xxx folder, since it's readonly.

I tried to temporarily fix it to use /tmp folder, so basically it works and display the 0 valued counter and a button.

  1. Would it be possible for you to build and run the video plugin example on your target device without cross-building? It means, can you try self-build on the board?

I can't do self-build on the board since it's a closed system.

HidenoriMatsubayashi commented 7 months ago

Okay, thanks. I just wanted to confirm if this issue depends on cross-building. I'm not sure what platform you are using, but please check https://github.com/sony/flutter-elinux-plugins/tree/main/packages/video_player#customize-for-your-target-devices first.

imaceda commented 6 months ago

I got it running.

I was lacking the actual flutter-embededded-linux - video-player-plugin, and use it to run my flutter-linux-plugin(video-player). I was initially just using the "flutter-wayland-client" to run the flutter-linux-plugin(video-player) app.

Thanks.

HidenoriMatsubayashi commented 6 months ago

Closing.