improved youtube player javascript functionality