Giter Club home page Giter Club logo

eme_logger's Introduction

The EME Call and Event Logger Extension

The EME Logger extension logs all Encrypted Media Extension (EME) calls and Events. The log can be viewed in the javascript console, a separate browser page or a downloaded file.

EME Specification

Just want to try it out? Install the EME Logger from Chrome Web Store.

EME Formatters

Formatters can be used with the EME Logger extension. Formatters are separate extensions that provide a class for key-system-specific custom formatting of data from the calls and events. Formatters should return objects with rich data so that the EME Logger extension can incorporate them into its own formatting.

For backward compatibility with the v2 extension's format, they can also return strings.

To register a message formatter:

  1. Write a class that implements the formatting methods below.
  2. Append an instance of the class to document.emeFormatters.

For example:

class SomeFormatter {
  // Return objects with rich data (preferred), or a string with a pre-formatted
  // summary of the contents.  Throw an exception if the data is not formatted
  // correctly for your key system.

  formatInitData(initDataType, initData) {
    return MyParser.parseInitDataIntoObject(initDataType, initData);
  }

  formatRequest(request) {
    return MyParser.parseRequestIntoObject(request);
  }

  formatResponse(response) {
    return MyParser.parseResponseIntoObject(response);
  }

  formatServerCertificate(certificate) {
    return MyParser.parseCertificateIntoObject(certificate);
  }
}

if (!document.emeFormatters)
  document.emeFormatters = [];
document.emeFormatters.push(new SomeFormatter);

eme_logger's People

Contributors

beaufortfrancois avatar beback4u avatar dependabot[bot] avatar github-actions[bot] avatar joeyparrish avatar jrummell-chromium avatar natalieharris avatar shaka-bot avatar vasanthap avatar xhwang-chromium avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.