When I create an iframe API using onYouTubeIframeAPIReady , the link is created using the http protocol
Example:
// 2. This code loads the IFrame Player API code asynchronously. var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); // 3. This function creates an <iframe> (and YouTube player) // after the API code downloads. var player; function onYouTubeIframeAPIReady() { player = new YT.Player('player', { width: '560', height: '600', videoId: '7j8B_r4OfAw', events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); }
iframe Result:
<iframe id="player" frameborder="0" allowfullscreen="1" title="YouTube video player" width="560" height="600" src="http://www.youtube.com/embed/7j8B_r4OfAw?enablejsapi=1"></iframe>
Does anyone know how to make a video that will be created using the https protocol? You need to install api on the platform.
Please suggest!
source share