I have a requirement to play YouTube or Vimeo embedded video in fullscreen mode directly using the players' API by clicking the custom play button.
I tried this codepen method: https://codepen.io/fregante/pen/GgOvLM
But I can't able to exit the fullscreen mode by clicking the player exit fullscreen button, in youtube its says fullscreen not available
I am stuck, help me!!!
var requestFullScreen = iframe.requestFullScreen || iframe.mozRequestFullScreen || iframe.webkitRequestFullScreen;
if (requestFullScreen) {
requestFullScreen.bind(iframe)();
}
}