media-kit / media-kit

A cross-platform video player & audio player for Flutter & Dart.
https://github.com/media-kit/media-kit
MIT License
893 stars 126 forks source link

Can't get option to track which videos play from list of videos #788

Open Parthakbari15 opened 3 weeks ago

Parthakbari15 commented 3 weeks ago

//Code

startVideoPLayer(BuildContext context) async { List videoUrl = BlocProvider.of(context).state.videosData.data?.videoList ?? []; final playable = Playlist( videoUrl.map((e) => Media(e.filePath.toString())).toList(), index: 0, ); await player.open(playable); await player.setPlaylistMode(PlaylistMode.loop);

}

here in above code i am trying play list of videos and trying to find out which index or which url videos play from this list videos . i want this because i want to call the another api based on that next videos play and also want that videos index or url . any method that can help me to solve this .