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 .
//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 .