Iframe Youtube not playing sound IOS


#1

Hi guys.

I am trying to play a video inside my Ionic 2 app. Then I put a iframe like this:

<iframe width="100%" height="315" [src]="getIframeSrc()" frameborder="0" allowfullscreen></iframe>

And in the function getIframeSrc() I have this:

getIframeSrc() 
  {
    var url: string = "N-tv2eHced4"; 
    return this.sanitizer.bypassSecurityTrustResourceUrl("https://www.youtube.com/embed/"+url+"?autohide=1&playsinline=1&showinfo=0");
  }

The video is playing normal, but only in IOS the sound not playing… Any ideas?

thanks


#2

Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.