Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyio/audio-only-bilibili
Biliblili 网页端使用音频模式
https://github.com/cyio/audio-only-bilibili
Last synced: about 2 months ago
JSON representation
Biliblili 网页端使用音频模式
- Host: GitHub
- URL: https://github.com/cyio/audio-only-bilibili
- Owner: cyio
- License: gpl-3.0
- Created: 2022-04-17T04:16:10.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-11T08:50:41.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T02:25:50.565Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.87 MB
- Stars: 18
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-bilibili-extra - Audio-only-bilibili - Biliblili 网页端使用音频模式. (浏览器扩展 / 主站扩展)
README
# Bilibili Web 音频模式(Chrome 扩展)
> 基于 [Ashish-Bansal/audio-only-youtube: Listen to only audio on youtube.](https://github.com/Ashish-Bansal/audio-only-youtube)
安装: [Audio Only bilibili - Chrome 网上应用店](https://chrome.google.com/webstore/detail/audio-only-bilibili/ckdhkbociihkjomnnmobadacinmehjfc?hl=zh-CN)
=======================================
好处:
- 节省带宽(视频数据部分)
- 节省视频解码、渲染的系统资源开销使用:
- 点击扩展图标切换模式效果:
![效果](https://pic3.zhimg.com/80/v2-a62fb0dd18360c753d1b03f9a7abee6a_720w.jpg)
## 手动安装
1. 下载:[Releases · cyio/audio-only-bilibili](https://github.com/cyio/audio-only-bilibili/releases)
2. 打开:`chrome://extensions`,将下载包拖入安装## 贡献
1. After cloning the repo, run `npm run dev`.
2. Open chrome, go to extensions tab, load unpacked extension and select
`build/dev` directory.
3. Go to bilibili and see extension in live.In case you edit code, it would automatically rebuild the extension and after
that you need to reload it in the browser.## 原理
一般主流视频网站都支持视频、音频流分离,扩展获取到音频流地址,设置给``
技术点:
- 是否屏蔽视频数据流
- 屏蔽,网站会产生不断重试请求,显著消耗资源
- 实现需要 api:`declarativeNetRequest`
- 不屏蔽,只请求开头一小段视频数据,后续只请求音频数据
- 过滤出音频数据:`webRequest.onBeforeRequest`