         }
 
         // Success, return JSON string
-        return NSString(data: jsonData!, encoding: NSUTF8StringEncoding)
+        return NSString(data: jsonData!, encoding: NSUTF8StringEncoding) as? String
     }
 
 

        let url = request.URL

        // Check if ytplayer event and, if so, pass to handleJSEvent
        if url.scheme == "ytplayer" { handleJSEvent(url) }

        return true
    }

    public var delegate: YouTubePlayerDelegate?

    // MARK: Various methods for initialization
/*
    public init() {
        super.init()
        self.buildWebView(playerParameters())
    }
*/
    override public init(frame: CGRect) {
        super.init(frame: frame)
        buildWebView(playerParameters())
