iosflutterdartflutter-dependenciestvos

Unhandled Exception: UnimplementedError: init() has not been implemented. video_player package


I have launched a flutter app on tvos, but I have a problem. I can't run video_player on tvos because it's not supported. Searched for a solution but didn't find it. If you managed to launch the player on tvos, could you share the solution?

When starting the video_player, it gives this error

2023-08-12 16:47:17.867753+0500 Runner[68192:636805] [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: UnimplementedError: init() has not been implemented. 
#0      VideoPlayerPlatform.init (package:video_player_platform_interface/video_player_platform_interface.dart:43:5) 
#1      _videoPlayerPlatform (package:video_player/video_player.dart:28:21) 
#2      VideoPlayerController.initialize (package:video_player/video_player.dart:426:25) 
#3      _VideoPlayerScreenState.initPlayer (package:AppleTVTest/main.dart:226:33) 
#4      _VideoPlayerScreenState.initState (package:AppleTVTest/main.dart:234:5)

Solution

  • video_player plugin doesn't work with Apple TV, please take a look at this example flutter_tv, customized native_video_player there, and you can use it for video