1

I have used YTSwiftyPlayer in custom UICollectionViewCell. When I am playing youtube video with video id in the cell it's playing as fullscreen.

var parameters = ["width": 
                  "100%",
                  "height": "100%",
                  "webkit-playsinline":1,
                  "playsinline":1,
                  "autoplay":1,
                  "modestbranding":1,
                  "rel":"0",
                  "controls":"1",
                  "fs":"0",
                  "allowfullscreen":"1",
                  "enablejsapi":"1",
                  "iv_load_policy":"3",
                  "showinfo":0] as [String : Any]

let youtubeID = "M7lc1UVf-VE"
cell.youtubePlayer.setPlayerParameters([.videoID(youtubeID),.showInfo(false),.showModestbranding(false),.showRelatedVideo(false),.playsInline(true),.autoplay(true)])
cell.youtubePlayer.loadPlayer()
cell.youtubePlayer.playVideo()

I want to play youtube video inside the cell, not as fullscreen

Ketan Odedra
  • 1,215
  • 10
  • 35
yugesh m
  • 11
  • 1

0 Answers0