import Service from 'ember-service';

export default Service.extend({
  _player: null,

  attachPlayer(obj) {
    this._player = obj;
  },

  mute() {
    if (!this._player) { return; }
    this._player.setMuted(true);
  },

  unmute() {
    if (!this._player) { return; }
    this._player.setMuted(false);
  },

  pause() {
    if (!this._player) { return; }
    this._player.pause();
  }
});
