brandly / angular-youtube-embed

:tv: Embed a YouTube player with a simple directive
http://brandly.github.io/angular-youtube-embed/
MIT License
509 stars 147 forks source link

iOS video going full screen on click to play. Playsinline parameter not working. #161

Open mcarthurnick opened 6 years ago

mcarthurnick commented 6 years ago

I have been having an issue for some time and I can't seem to figure out what is going on.I am using Angular 1.5 and the npm package angular-youtube-embed.

Video Html:

<div class="videoWrapper">
    <youtube-video video-id="webVideoUrl" player="player" player-vars="playerVars"></youtube-video>
</div>

My player parameters are:

$scope.playerVars = {
                    autoplay:$scope.stream.autoPlay,
                    playlist:$scope.stream.videoUrl,
                    controls:1,
                    fs:0,
                    modestbranding:1,
                    rel:0,
                    enablejsapi:1,
                    loop:1,
                    showinfo:0,
                    playsinline:1
                };

The playsinline:1 parameter should disable the force fullscreen when a mobile iOS user plays the YouTube video. But this is not working. I have tried it on iPhone 5s to 8 (I believe). Anyone have any ideas? Thank you in advance.