@Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();

        // If the PlayerView is set by XML then call the corresponding setter method
        if (playerViewRef != -1)
            playerView((DoubleTapPlayerView)((View)getParent()).findViewById(playerViewRef));
    }
Sets all optional XML attributes and defaults
app/src/main/java/com/brouken/player/dtpv/youtube/YouTubeOverlay.java