If you don't find an answer, please click here to post your question.

Muting Video on Autoplay

0 Kudos
Started ‎06-05-2015 by
Modified ‎06-05-2015 by

Muting Video on Autoplay

by Community Manager on ‎06-05-2015 10:21 AM (960 Views)

Question

How do you mute a video on autoplay for the V3 player?

Answer

You can program as shown below using a MessageBus:

var videoPlayer = OO.Player.create('ooyalaplayer', '(embedcode)', {
onCreate: function(player) {
window.messageBus01 = player.mb;
},
autoplay: true
});

window.messageBus01.subscribe(OO.EVENTS.PLAYBACK_READY, 'exampleSuscriberID01',
function(eventName) {
videoPlayer.setVolume(0);
}
);