Best way to autoplay video with Youtube iFrame API?... autoplay parameter vs onReady event.target.playVideo -


from youtube iframe api documentation there seems 2 different ways autoplay video. 1 way function or affect youtube player differently other?

method 1: set autoplay parameter '1' within player options when define new youtube player.

method 2: wait until 'onready' event fires, , event.target.playvideo(). specifically:

function onplayerready(event) {   event.target.playvideo(); } 


Comments

Popular posts from this blog

php - Wordpress: Link a post to posts of another category manually -

delphi xe7 upload/download dropbox file using the rest client and show progress -

java - Get more than One value and display it -