Getting current time of embedded iframe youtube player?
问题 Here i have tried as follows: HTML <iframe id="player" style="position: relative; height: 220px; width: 400px" src="http://www.youtube.com/embed/7a_CVFRqYv4?rel=0&enablejsapi=1"></iframe> Script var player; function onYouTubePlayerAPIReady() {player = new YT.Player('player');} Here i want to such action like when the player timing reaches 6 seconds,i want to change the src of the iframe. 回答1: This thread describes how you can get the current playing time of a video using the YouTube API