I have a problem here with youtube videos, I have it as a music player option on the website in the lower right corner, it works normal except on iOS mobile devices, what happens is that I can not play music.
Follow one of the sites that contains the player. site
player = new YT.Player(attrs.container, {
height: '200',
width: '200',
videoId: getIdFromUrl(videoUrl),
playerVars: {
html5: 1,
enablejsapi: 1,
playsinline: 1
//origin: extraService.site_root_url.replace('http:', 'https:')
//origin: extraService.site_root_url
},
events: {
'onReady': onPlayerReady,
'onStateChange': onStateChange
}
});
This is the iframe it generates:
<iframe id="sdn-player" frameborder="0" allowfullscreen="1" title="YouTube video player" width="200" height="200" src="https://www.youtube.com/embed/2RtzSLLngc8?enablejsapi=1&playsinline=1&origin=https%3A%2F%2Fnoivos.casar.com"></iframe>