Learn Courses My Dashboard

How to retrieve multiple local videos in SwiftUI?

Hello Code Crew,
I would seriously appreciate an answer, please!

This works fine to retrieve one local video:
@State var player = AVPlayer(url: Bundle.main.url(forResource: “firstVideo”, withExtension: “mp4”)!)

I have many brief (10 s to 1:20) videos in my project, and this is why I put them in my bundle. Just like the .jpgs in my project, I want two specific videos to play for each tab in my navigationView.

I am pretty new to coding, and the Apple documentation is unclear to me. Any help you could give me is very appreciated.

All the best to you.