title: for loop in swift step by step?
body: <p>I have the following array with urls:</p>
  
  <pre><code>let KStorePlayURL = [
      https://source.s3-us-west-2.amazonaws.com/ENVOI/2018/07/19/ATASTEOFDANCE_S1_EP3.mp4,                
      https://source.s3-us-west-2.amazonaws.com/ENVOI/2018/05/23/ATasteOfDance_S1E1_Episode.mp4,                         
      https://source.s3-us-west-2.amazonaws.com/ENVOI/2018/05/23/ATasteOfDance_S1E1_Episode.mp4,
      https://source.s3-us-west-2.amazonaws.com/ENVOI/2018/05/23/ATasteOfDance_S1E1_Episode.mp4
  ] 
  </code></pre>
  
  <p>How can I get the URLs one after the other in the for loop? Also when one video is played and followed by other videos in this Bitmovin player?</p>
  
  <p>Here is the code I have already tried:</p>
  
  <pre><code>@objc func setUpPlayerVideos1() {
  
     print(KStorePlayURL)
  
     for i in 0..&lt;KStorePlayURL.count {
  
        let streamURL = URL(string: KStorePlayURL[i])
  
        playlist.append(PlaylistItem(url: streamURL!, title: "player"))
        // Create player based with a default configuration
        let player = BitmovinPlayer()
  
        // Create player view and pass the player instance to it
        let playerView = BMPBitmovinPlayerView(player: player, frame: .zero)
  
        // Listen to player events
        player.add(listener: self)
  
        playerView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
        playerView.frame = view.bounds
  
        view.addSubview(playerView)
        view.bringSubview(toFront: playerView)
  
        // store the reference to the player
        self.Bitmovinplayer = player
  
     }
     // Start the playlist
     playNextItem()
  }
  </code></pre>