Skip to content

Latest commit

 

History

History
84 lines (67 loc) · 2.17 KB

README.adoc

File metadata and controls

84 lines (67 loc) · 2.17 KB

NJS Emby Enhancer

A module enhances Emby to call external video players to play media on your hosted server, powered by njs (NGINX JavaScript).

Table of Contents

Features

  • Supporting Emby WebUI/iOS Client/Android Client

  • Supporting multiple media sources

  • Auto-detection for platform & system, only showing available players

  • Additional Components: Concealing the real address of the server to avoid IP leakage

Screenshot

WebUI
Android Emby

Usage

  1. Download dist/njs-emby-extlink.js and put it in nginx working folder

  2. Insert a line in nginx.conf to load NJS engine

    # Load NJS Engine
    load_module modules/ngx_http_js_module.so;
  3. Add this entry in the first line of emby’s reverse proxy configuration file (emby.conf)

    # change the path from "path-to/njs-emby-extlink.js"
    js_import embyPlugin from path-to/njs-emby-extlink.js;
  4. Add a rewrite rule for root path in emby.conf

    location / {
      ...
    	## Emby Nginx Plugin: ExtPlay
    	rewrite ^/Videos/(\d+)/ExtPlay/ /emby/videos/$1/stream redirect;
    }
  5. Add/change the following sections in emby.conf

    location ~* /Users/(\w+)/Items/(\d+) {
    	js_header_filter embyPlugin.contentTypeJson;
    	js_body_filter embyPlugin.addExtLinkFilter buffer_type=string;
      ## Others
      proxy_pass http://emby;
      ...
    }
    location /Emby/Addons/ExtPlay {
    	js_content embyPlugin.handleExtPlay;
    }
  6. Optional: Add/change the following sections to conceal system info

    location ~* /System/Info {
    	js_header_filter embyPlugin.contentTypeJson;
    	js_body_filter embyPlugin.concealPublicInfo buffer_type=string;
    	## Others
      proxy_pass http://emby;
      ...
    }

License

This project is licensed under AGPL-3.0 License. It used a portion of codes from njs-typescript-starter, which is licensed under MIT License