//= require_tree ../player
//= require ./index.js

// Twitch.ads.ext provides an API for external ads to control the page.
// Currently we allow ads to mute/unmute the player.
(function (Twitch, $) {

  var ext = {};

  ext.mutePlayer = function () {
    Twitch.player.ready(function (player) {
      player.mute();
    });
  };

  ext.unmutePlayer = function () {
    Twitch.player.ready(function (player) {
      player.unmute();
    });
  };

  Twitch.ads.ext = ext;

})(Twitch, jQuery);
