Which javascript code would I be using for setting the volume?

1.)

function onPlayerReady(event) {
  player.setVolume(50);
}

2.)

function onPlayerReady(event) {
  player.setVolume(50);
  event.target.playVideo();
}

3.)
https://jsfiddle.net/mz8nxe29/3/

function onPlayerReady(event) {
  event.target.playVideo();
  event.target.setVolume(50);
}

According to the api it should be this.

function onPlayerReady(event) {
  event.target.setVolume(100);
  event.target.playVideo();
}

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.