Play video IN A SMALL WINDOW, inline, - not Fullscreen
smhk opened this issue · 1 comments
smhk commented
smhk commented
Here's the solution!
Fullscreen player...
As soon as the user clicks Play, the player will take over the iPhone screen ...
@IBOutlet var holder: UIView!
private var player: YTSwiftyPlayer!
override func viewDidLoad() {
super.viewDidLoad()
player = YTSwiftyPlayer(
frame: CGRect(x: 0, y: 0, width: 320, height: 240),
playerVars: [
.videoID("buzsasTfC4s")
])
holder.addSubview(player)
....
Inline, windowed, player...
As soon as the user clicks Play, the player remains in the view you have it in:
@IBOutlet var holder: UIView!
private var player: YTSwiftyPlayer!
override func viewDidLoad() {
super.viewDidLoad()
player = YTSwiftyPlayer(
frame: CGRect(x: 0, y: 0, width: 320, height: 240),
playerVars: [
.videoID("buzsasTfC4s"),
.playsInline(true)
])
holder.addSubview(player)
....
What a great library!