Skip to content

Instantly share code, notes, and snippets.

@nwalter08
Created June 30, 2015 02:42
Show Gist options
  • Save nwalter08/6cfa30e042ec3585143f to your computer and use it in GitHub Desktop.
Save nwalter08/6cfa30e042ec3585143f to your computer and use it in GitHub Desktop.
//
// ViewController.swift
// AllredTube
//
// Created by Nick Walter on 6/29/15.
// Copyright (c) 2015 Nick Walter. All rights reserved.
//
import UIKit
class ViewController: UIViewController, YouTubePlayerDelegate {
@IBOutlet weak var thePlayer: YouTubePlayerView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.thePlayer.delegate = self
self.thePlayer.loadVideoID("VnoWu05natE")
}
func playerReady(videoPlayer: YouTubePlayerView) {
self.thePlayer.play()
}
func playerQualityChanged(videoPlayer: YouTubePlayerView, playbackQuality: YouTubePlaybackQuality) {
}
func playerStateChanged(videoPlayer: YouTubePlayerView, playerState: YouTubePlayerState) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment