I want to fire an event at the end of a media

I have some videos in a Media playlist. I am playing all the videos from the Media Playlist at Begin Play. It works as expected. The videos play one by one. But now, I want to fire an event after all the videos are done playing. One way is that I can use delay and set it to the total time of all the videos and then I can do whatever I want, but that’s not obviously a good approach. So how can I check whether all the videos in the Media Playlist have finished playing? I need the answer very urgently. It will be really helpful if I could get some help on this.