youtube-player icon indicating copy to clipboard operation
youtube-player copied to clipboard

setVolume function is not working in ios

Open arghyaExicube opened this issue 6 years ago • 1 comments

I am doing an angular app.which i have implemented youtube player. setVolume(50) function is working in browser and android, but not working in ios. here is my code:

    this.player = YouTubePlayer('existing-iframe-example',{
      height: '320px',
      width: '100%',
      // videoId: 'gtiriqJ_HrA',
      playerVars: {
        'autoplay': 1, 
        'rel': 0, 
        'controls': 1, 
        'fs': 1, 
        'playsinline': 1, 
        'listType': 'playlist', 
        'list': 'PLNI-cJa63vBKN5r5GRGq5anqJeZ_hwWCw', 
        'enablejsapi': 1,
        'showinfo':0
      },
    });
    
    this.player.on('ready', (event) => {
      console.log(event);
      this.player.setVolume(0);

  }

please help me.Thanks..

arghyaExicube avatar Dec 13 '18 08:12 arghyaExicube

Did you ever get this to work? I could never get the ready event to fire with with an existing iFrame.

drewbaker avatar May 12 '20 18:05 drewbaker