Youtube videos do not open in full screen

2

I am using youtube as a music player and every time someone accesses on iOS devices it opens the video in full screen. Follow my code with playsinline.

var buildPlayer = function(videoUrl)
{
     playerLoading = true;

     player = new YT.Player(attrs.container, {
         height: '200',
         width: '200',
         videoId: getIdFromUrl(videoUrl),
         playerVars: {
             enablejsapi: 1,
             playsinline: 1,
             html5: 1,
         },
         events: {
             'onReady': onPlayerReady,
             'onStateChange': onStateChange
         }
     });
}
    
asked by anonymous 28.08.2015 / 16:32

1 answer

0

In the latest version of the youtube api, you can set the playsinline parameter to 1 , to learn more, take a look at the documentation:

link

    
28.08.2015 / 17:30