strange error

Can someone tell me why on line 9 https://hastebin.com/anowipuzur.http I get the error Generic parameter 'Label' could not be inferred

You can include the code in your comment.



struct PlayerControlsView : View {
  @State var playerPaused = true
  @State var seekPos = 0.0
  let player: AVPlayer
  var body: some View {
    HStack {
      Button(action: {
        self.playerPaused.toggle()
        if self.playerPaused {
          self.player.pause()
        }
        else {
          self.player.play()
        }
      }) {
        Image(systemName: playerPaused ? "play" : "pause")
          .padding(.leading, CGFloat(20))
          .padding(.trailing, CGFloat(20))
      }
      Slider(value: $seekPos, from: 0, through: 1, onEditingChanged: { _ in
        guard let item = self.player.currentItem else {
          return
        }
 
        let targetTime = self.seekPos * item.duration.seconds
        self.player.seek(to: CMTime(seconds: targetTime, preferredTimescale: 600))
      })
        .padding(.trailing, CGFloat(20))
    }
  }
}