Skip to content

Instantly share code, notes, and snippets.

@kuu
Last active May 10, 2016 05:33
Show Gist options
  • Save kuu/5629b33bc45213927bb62c0308238312 to your computer and use it in GitHub Desktop.
Save kuu/5629b33bc45213927bb62c0308238312 to your computer and use it in GitHub Desktop.
This is how to handle the DRM output-protection errors.
<script>
OO.ready(function() {
  OO.Player.create('container', 'content's embed_code', {
    onCreate: function (player) {
      player.mb.subscribe(
        OO.EVENTS.ERROR,
        'drm-test',
        function (event, error) {
          if (error.code === 'faxsDrmError') {
            player.setEmbedCode('another content's embed_code');
          }
        }
      );
    }
  });
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment