Closed caneroncu closed 1 month ago
use asset:///$asset
your asset will be asset:///assets/intro_screens/12.mp4
for more logs use
player =
Player(configuration: PlayerConfiguration(logLevel: MPVLogLevel.debug));
player.stream.log.listen((event) {
print("log $event");
});
to see if the file is loaded correctly
await player.open(Media('asset:///assets/map.mp4'));
this one worked for me, thanks!
Hello,
Using the plugin for iOS and Android
By any chance, do you know how to load local files via media_kit? I am trying to load a local file (an asset) on my phone using a statement like this:
_player.open(Media('assets/intro_screens/12.mp4'));
and adding my assets to my pubspec.yaml like this
assets:
# Add assets from the images directory to the application.
- assets/images/
- assets/intro_screens/intro_screens/
However it does not load and only black screen appears. However, if I do it via a web address it works but I need to do it using a local file. Can you help me out?
Kind regards