// 3. This function creates an (and YouTube player) // after the API code downloads. var player; function onYouTubeIframeAPIReady() { player = new YT.Player(‘player’, { height: ‘360’, width: ‘640’, videoId: ‘rNWPvYpSHDM’, events: { ‘onReady’: onPlayerReady, }, playerVars: { ‘playsinline’: 1, } }); } // 4. The API will call this function when the video player is ready. function onPlayerReady(event) { event.target.mute(); event.target.playVideo(); }