is it embedding webkit-playsinline into the video tag?
On Wednesday, March 7, 2012 9:30:51 PM UTC+8, Grimmrobe wrote:
-- On Wednesday, March 7, 2012 9:30:51 PM UTC+8, Grimmrobe wrote:
HI All,
I'm trying with 0 success to set the webkit-playsinline attribute on the video element created with an iframe youtube embed.
The code I'm using is from a youtube api example I found a whlie ago:
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "http://www.youtube.com/player_api ";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// 3. This function creates an (and YouTube player)
// after the API code downloads.
var player;
function onYouTubePlayerAPIReady() {
player = new YT.Player('player', {
height: '538',
width: '750',
videoId: 'u1zgFlCw8Aw',
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}
Anybody know of a solution?
Starting October 15, 2012, this group will stop accepting new posts. We recommend that developers start using Stack Overflow and the Issue Tracker for YouTube API support. More details about this change and relevant links can be found at http://apiblog.youtube.com/2012/09/the-youtube-api-on-stack-overflow.html
No comments:
Post a Comment