gajus / youtube-player

YouTube iframe API abstraction.
Other
369 stars 79 forks source link

setVolume function is not working in ios #76

Open arghyaExicube opened 5 years ago

arghyaExicube commented 5 years ago

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..

drewbaker commented 4 years ago

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