izumiko / jellyfin-danmaku Goto Github PK
View Code? Open in Web Editor NEWThis project forked from 9channel/dd-danmaku
Jellyfin danmaku extension
License: MIT License
This project forked from 9channel/dd-danmaku
Jellyfin danmaku extension
License: MIT License
使用Nginx反向代理Jellyfin并在location块中插入:
#禁用与后端压缩并侧载脚本
proxy_set_header Accept-Encoding "";
sub_filter '</body>' '<script src="https://jellyfin-danmaku.pages.dev/ede.user.js" defer></script></body>';
sub_filter_once on;
即可由Nginx完成代码插入并移交浏览器处理:
更完整的Nginx配置实例:
location / {
proxy_pass http://127.0.0.1:8096;
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
# 在流式传输时禁用缓冲
proxy_buffering off;
}
location = /web/index.html {
proxy_pass http://127.0.0.1:8096/web/index.html;
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
# 禁用与后端压缩并侧载脚本
proxy_set_header Accept-Encoding "";
sub_filter '</body>' '<script src="https://jellyfin-danmaku.pages.dev/ede.user.js" defer></script></body>';
sub_filter_once on;
}
location /socket {
proxy_pass http://127.0.0.1:8096;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
}
请问这个后续会支持安卓端的jellyfin嘛?
Is your feature request related to a problem? Please describe.
当自动识别不到弹幕,需要手动找弹幕源时:
有些视频网站必须登录后才能获取到弹幕,直接输入视频url返回0弹幕
Describe the solution you'd like
填入cookies来验证身份, 发送GET请求的时候附上Cookies信息?
也可以根据网站的Domain来对应别处理, 比如识别输入的url是 *.acfun.cn.
A clear and concise description of what you want to happen.
成功通过网站验证,获取到只有登录用户才能观看的视频弹幕
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
不熟悉JavaScript,不知道是否有难度和可行性?
Add any other context or screenshots about the feature request here.
例子:https://www.acfun.cn/v/ac10077196_3
希望能够支持PC端的Jellyfin客户端。
PC端的Jellyfin客户端主界面采用本地文件中的资源,index.html等文件存储在程序安装目录Jellyfin\Jellyfin Media Player\web-client\desktop
中,可以直接在本地使用文本编辑器进行修改,从而加入脚本。
不过,直接加入本项目脚本会因为本地的资源路径和浏览器上访问的不一致(例如web/index.html
在本地是web-client/desktop/index.html
),这导致该脚本无法正常在播放界面显示。
本人不会JavaScript(入门都没入ヽ(*。>Д<)o゜)不知道怎么修改,因此希望在这个issue里给作者一个可行的思路,看看是否能成((
在桌面客户端项目仓库的README.md中有Web Debugger的连接方法,可以看看
考虑到我管理的服务器中转发方案并非 nginx 或 caddy ,也有直接使用 ip 进行访问不使用转发的需求, #8 中的方案无法直接使用,但给予了我灵感,在每次 jellyfin 启动前先进行文件的修改也能完成持久化侧载。调试过程中发现 readme 所给的 sed 命令重复运行会重复插入,故稍作更改,增加了</div>
的识别片段以避免js的重复插入。
将 docker 容器的启动参数在原来 /init
的基础上增加 sed 部分,即可实现每次docker启动时自动修改html文件。
以 hotio/jellyfin
的容器内html文件地址为例,将 /init
改为如下即可:
sed -i 's#</div></body>#</div><script src="https://jellyfin-danmaku.pages.dev/ede.user.js" defer></script></body>#' /usr/share/jellyfin/web/index.html && /init
对于官方的容器如下:
sed -i 's#</div></body>#</div><script src="https://jellyfin-danmaku.pages.dev/ede.user.js" defer></script></body>#' /jellyfin/jellyfin-web/index.html && /jellyfin/jellyfin
另外,使用 systemd 自动运行 jellyfin 也可类似的进行修改,将 execstart 进行覆盖即可。
ExecStart = sed -i 's#</div></body>#</div><script src="https://jellyfin-danmaku.pages.dev/ede.user.js" defer></script></body>#' /usr/share/jellyfin/web/index.html && /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_RESTART_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.