Giter VIP home page Giter VIP logo

gvking / eme_logger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shaka-project/eme_logger

0.0 0.0 0.0 896 KB

Logs Encrypted Media Extension (EME) events and calls to help investigate issues in premium media sites.

Home Page: https://chrome.google.com/webstore/detail/eme-call-and-event-logger/cniohcjecdcdhgmlofniddfoeokbpbpb

License: Apache License 2.0

JavaScript 96.86% HTML 3.14%

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

joeyparrish avatar natalieharris avatar dependabot[bot] avatar vasanthap avatar shaka-bot avatar jrummell-chromium avatar github-actions[bot] avatar beaufortfrancois avatar beback4u avatar gvking avatar xhwang-chromium 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.