I have add a youtube video on my page through this code.

```
 <div id="ytplayer"></div>
            <script>
                // Load the IFrame Player API code asynchronously.
                var tag = document.createElement('script');
                tag.src = "https://www.youtube.com/player_api";
                var firstScriptTag = document.getElementsByTagName('script')[0];
                firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

                // Replace the 'ytplayer' element with an <iframe> and
                // YouTube player after the API code downloads.
                var player;
                function onYouTubePlayerAPIReady() {
                    player = new YT.Player('ytplayer', {
                        height: '390',
                        width: '640',
                        videoId: 'o9UQSUHHdtA',
                        events: {
                            'onReady': onPlayerReady,
                            'onStateChange': onPlayerStateChange
                        }
                    });
                }
            </script>

```

I play the video when user click on button. it's come visible by remove display:none. now it's not worked in Firefox, work fine in chrome. Can someone help me on it.

Thanks: live is [here](http://freelancehood.com/test121/).

it's show me `TypeError: player.seekTo is not a function` Do someone know how to wait for load the player. if I do player.seekTo manually in firebug then it's worked.