diff --git a/How-to-add-custom-license-scheme-yourself.md b/How-to-add-custom-license-scheme-yourself.md new file mode 100644 index 0000000..bf67691 --- /dev/null +++ b/How-to-add-custom-license-scheme-yourself.md @@ -0,0 +1,37 @@ +# Requirements + +* Basic level of network skill + +* Basic level of Python skill (Especially about Pywidevine and Pyodide) + +# Guide + +**1\.** + +Check the contents of the request/response to the license server + +**2\.** + +Create a python scheme file according to the reference described below. + +Scheme files are located in python/schemes. + +The scheme file should only describe the part that handles the license acquisition and will eventually be concatenated and executed as pre.py+SCHEME.py+after.py. + +**3\.** + +Edit popup.html to allow the added scheme file to run. + +**4\.** + +Edit the Config files as needed. + +# References of scheme file + +*licUrl*: License URL as String + +*licHeaders*: Headers as JSON object + +*licBody*: Request payloads of License server as Base64 String + +*js.corsFetch()*: Use this method instead of pyfetch if the license server requires that the Origin header be set to the original domain. Otherwise, pyfetch should be used. \ No newline at end of file