passing json video link to avplayer

I'm attempting to simply pass the video link inside the json to the navigation menu... my brain is fried as I'm lost in why I can't do this view the navigation link protocol.

import SwiftUI

import AVKit



struct MainDetail: View {

    

    var json: Main

    

   private let player = AVPlayer(url: URL(string: item.interactive))

   

   var body: some View {

     VideoPlayer(player: player)

            .onAppear() {

                // Start the player going, otherwise controls don't appear

                player.play()

            }

            .onDisappear() {

                // Stop the player when the view disappears

                player.pause()

            }

   }

}

this returns a "Cannot find 'item' in scope" despite being declared back on the main content view. the intended action is loading the "interactive" link (m3u8 file) in a player view when clicked on. I apologize for not understanding what's going on here.

passing json video link to avplayer
 
 
Q