H
H
HeBonpoc2014-07-24 18:21:06
YouTube
HeBonpoc, 2014-07-24 18:21:06

I'm looking at youtube player api. Requesting chromeless. Why does it show the red play button?

var ytplayer;
var params = { allowScriptAccess: "always" };
var atts = { id: "myytplayer" };
swfobject.embedSWF(
"http://www.youtube.com/apiplayer?enablejsapi=1&version=3",	
"ytapiplayer", "600", "375", "8", null, null, params, atts);

function onYouTubePlayerReady(playerId) {
  ytplayer = document.getElementById("myytplayer");
  ytplayer.loadVideoById('XXXXXXXXXXX');
  ytplayer.stopVideo();
}

The button is shown only in the -1 state (stop).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question