- Notifications
You must be signed in to change notification settings - Fork24
Logs Encrypted Media Extension (EME) events and calls to help investigate issues in premium media sites.
License
shaka-project/eme_logger
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The EME Logger extension logs all Encrypted Media Extension (EME) calls andEvents. The log can be viewed in the javascript console, a separate browser pageor a downloaded file.
Just want to try it out? Install the EME Logger fromChrome Web Store.
Formatters can be used with the EME Logger extension. Formatters are separateextensions that provide a class for key-system-specific custom formatting ofdata from the calls and events. Formatters should return objects with rich dataso that the EME Logger extension can incorporate them into its own formatting.
For backward compatibility with the v2 extension's format, they can also returnstrings.
To register a message formatter:
- Write a class that implements the formatting methods below.
- Append an instance of the class to document.emeFormatters.
For example:
classSomeFormatter{// 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){returnMyParser.parseInitDataIntoObject(initDataType,initData);}formatRequest(request){returnMyParser.parseRequestIntoObject(request);}formatResponse(response){returnMyParser.parseResponseIntoObject(response);}formatServerCertificate(certificate){returnMyParser.parseCertificateIntoObject(certificate);}}if(!document.emeFormatters)document.emeFormatters=[];document.emeFormatters.push(newSomeFormatter);
About
Logs Encrypted Media Extension (EME) events and calls to help investigate issues in premium media sites.