nondanee / vsc-netease-music

UNOFFICIAL Netease Music extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=nondanee.vsc-netease-music
MIT License
1.02k stars 80 forks source link
netease-cloud-music vscode-extension
icon # VSC Netease Music **UNOFFICIAL** Netease Music extension for Visual Studio Code [![Visual Studio Marketplace](https://img.shields.io/badge/Visual%20Studio-Marketplace-007acc.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=nondanee.vsc-netease-music) [![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/nondanee.vsc-netease-music.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=nondanee.vsc-netease-music) [![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/nondanee.vsc-netease-music.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=nondanee.vsc-netease-music) [![Visual Studio Marketplace Rating](https://img.shields.io/visual-studio-marketplace/stars/nondanee.vsc-netease-music.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=nondanee.vsc-netease-music) [![GitHub Stars](https://img.shields.io/github/stars/nondanee/vsc-netease-music.svg?style=flat-square)](https://github.com/nondanee/vsc-netease-music) ![demo](https://user-images.githubusercontent.com/26399680/67140787-b22cbe80-f290-11e9-9d6a-77d50179de43.gif)

Feature

使用 Webview 实现,通过 HTMLAudio​Element 播放音乐,不依赖命令行播放器灵感来自 kangping/video

Requirement

VS Code 使用的 Electron 版本不包含 ffmpeg,需替换自带的 ffmpeg 动态链接库才能正常播放 (每次更新 VS Code 都需重新替换)

VS Code for Windows 1.31.0 - 1.35.1 不需替换,1.36.0 后无此待遇

VS Code for macOS 1.43+ 替换后闪退解决方案

Manual Replacement 通过 VS Code 版本在 `https://raw.githubusercontent.com/Microsoft/vscode/%version%/.yarnrc` 查看其使用的 Electron 版本,并于 `https://github.com/electron/electron/releases/tag/%version%` 下载对应的 **Electron 完整版本**进行替换 #### Windows 下载 **electron-%version%-win32-%arch%.zip** 替换 `./ffmpeg.dll` #### macOS 下载 **electron-%version%-darwin-x64.zip** 替换 `./Electron.app/Contents/Frameworks/Electron\ Framework.framework/Libraries/libffmpeg.dylib` #### Linux 下载 **electron-%version%-linux-%arch%.zip** 替换 `./libffmpeg.so`
Automatic Replacement 使用 Python 脚本替换 (使用[淘宝 Electron 镜像](https://npm.taobao.org/mirrors/electron/),兼容 Python 2/3,绝大部分发行版自带环境) **默认安装位置下 Linux 和 Windows 需要以管理员身份运行,macOS 不需要** #### Windows Powershell ```powershell Invoke-RestMethod https://gist.githubusercontent.com/nondanee/f157bbbccecfe29e48d87273cd02e213/raw | python ``` #### Unix Shell ``` curl https://gist.githubusercontent.com/nondanee/f157bbbccecfe29e48d87273cd02e213/raw | python ``` 如果 VS Code 使用默认配置安装,脚本会自动寻找并替换,若自定义了安装位置,请自行修改 [installation](https://gist.github.com/nondanee/f157bbbccecfe29e48d87273cd02e213#file-helper-py-L20)

Usage

按下 F1Ctrl Shift P 打开命令面板

输入命令前缀 网易云音乐NeteaseMusic 开始探索 :D

Hotkey

Command Key
静音 / 恢复 Alt M
上一首 Alt ,
下一首 Alt .
播放 / 暂停 Alt /

Extension Setting

Known Issue