 /** Embed and control YouTube videos */
 public class YouTubePlayer: UIView, UIWebViewDelegate {
 
-    typealias PlayerParameters = [String: AnyObject]
-
-    var webView: UIWebView!
+    public typealias YouTubePlayerParameters = [String: AnyObject]
+
+    private var webView: UIWebView!
 
     /** The readiness of the player */
     private(set) public var ready = false
 
     /** The current state of the video player */
-    public var playerState = YouTubePlayerState.Unstarted
+    private(set) public var playerState = YouTubePlayerState.Unstarted
 
     /** The current playback quality of the video player */
-    public var playbackQuality = YouTubePlaybackQuality.Small
-
+    private(set) public var playbackQuality = YouTubePlaybackQuality.Small
+
+    /** Used to configure the player */
+    public var playerVars = YouTubePlayerParameters()
+
+    /** Used to respond to player events */
     public var delegate: YouTubePlayerDelegate?
 
     // MARK: Various methods for initialization

        ]
    }

    private func defaultPlayerVars() -> PlayerParameters {
        return [
            "playsinline": 1,
            "controls": 0,
            "autoplay": 1,
            "disablekb": 1,
            "rel": 0,
            "modestbranding": 1,
            "showinfo": 0
        ]
    }

    private func playerCallbacks() -> PlayerParameters {
        return [
            "onReady": "onReady",
            "onStateChange": "onStateChange",


    // MARK: Player setup

    private func loadWebViewWithParameters(parameters: YouTubePlayerParameters) {

        // Get HTML from player file in bundle
        let rawHTMLString = htmlStringWithFilePath(playerHTMLPath())!
