Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load video from assets #11

Open
matthew-carroll opened this issue Aug 1, 2022 · 6 comments
Open

Can't load video from assets #11

matthew-carroll opened this issue Aug 1, 2022 · 6 comments

Comments

@matthew-carroll
Copy link

matthew-carroll commented Aug 1, 2022

I'm trying to use this video player in a presentation app, similar to Powerpoint or Keynote.

I have videos packaged with my app assets that I'd like to play in the presentation. However, VideoPlayerController.asset("...") triggers an unimplemented error when initialize()ing.

Code:

_videoPlayerController = VideoPlayerController.asset("assets/content/demo_graph-paper.mov");
await _videoPlayerController.initialize();
_videoPlayerController.play();

Error:

[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: PlatformException(video_player, not implemented, null, null)
#0      VideoPlayerApi.create (package:video_player_platform_interface/messages.dart:189:7)
<asynchronous suspension>
#1      MethodChannelVideoPlayer.create (package:video_player_platform_interface/method_channel_video_player.dart:53:37)
<asynchronous suspension>
#2      VideoPlayerController.initialize (package:video_player/video_player.dart:363:19)
<asynchronous suspension>
#3      _PresentationState._setupVideoPlayer (package:presentations/main.dart:88:5)
<asynchronous suspension>

Dependencies:

video_player_macos:
    git:
      url: https://github.com/ollydixon/flutter_macos_video_player
      path: packages/video_player/video_player_macos
  video_player:
    git:
      url: https://github.com/ollydixon/flutter_macos_video_player
      path: packages/video_player/video_player
@kekko7072
Copy link

+1

1 similar comment
@MinuteReversal
Copy link

+1

@ollyde
Copy link
Owner

ollyde commented Sep 21, 2022

Unfortunately don’t have time to fix this. I though by now Flutter would have a video player!

open to PR requests though ☺️

@srix55
Copy link

srix55 commented Nov 25, 2022

Flutter seems to be waiting for the platform-view feature for desktop. Not sure what the progress is.

@ollyde
Copy link
Owner

ollyde commented Nov 25, 2022

They've been working on that for a long time.

@cbenhagen
Copy link

This depends on flutter/flutter#47681 which hopefully will soon be fixed by flutter/engine#37421.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants