Answer the question
In order to leave comments, you need to log in
Is there something wrong with the youtube API?
Some video connection options
don't work : fs (0 - hide button to switch to full screen), rel (0 - don't show related videos at the end of playback), modestbranding (1 - hide "YouTube" at the bottom), showinfo (0 - don't show title and buttons at the top before playback starts).
I connect via the iframe API, like this:
//Hymn adding
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: document.querySelector('.hymn').clientHeight,
width: document.querySelector('.hymn').clientWidth*0.5,
modestbranding: 1,
showinfo: 0,
iv_load_policy: 3,
rel: 0,
autohide: 1,
fs: 0,
origin: 'https://ussr.ga',
videoId: 'cNNMlwzJ6qU'
});
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question