一个通用的视频播放器模块,可将视频转换为点阵字符并在支持消息编辑的平台上播放
Project description
ErisPulse-EditVideoPlayer
一个通用的视频播放器模块,可将视频转换为点阵字符并在支持消息编辑的平台上播放。
功能特性
- 上传和管理视频文件
- 将视频转换为盲文点阵字符
- 在支持消息编辑的平台上播放视频
- 支持命令行和 HTTP API 控制
- 自适应移动端显示比例
安装
使用 ErisPulse CLI 安装模块:
epsdk install EditVideoPlayer
配置
在 config.toml 中配置模块:
[EditVideoPlayer]
api_key = "your-secret-api-key" # API密钥,用于保护HTTP接口
video_directory = "videos" # 视频存储目录
fps = 30 # 默认播放帧率
braille_width = 60 # 盲文字符宽度(字符数)
braille_height = 30 # 盲文字符高度(字符数)
首次运行时会自动创建默认配置。
使用方法
命令控制
/video list # 列出所有可用视频
/video play <文件名> # 播放指定视频
/video stop # 停止当前播放的视频
HTTP API
所有API端点都需要在请求头中添加认证信息(如果配置了api_key):
Authorization: Bearer your-secret-api-key
上传视频
POST /EditVideoPlayer/upload
Headers: Authorization: Bearer your-secret-api-key
Content-Type: multipart/form-data
参数:
- file: 要上传的视频文件
返回:
{
"status": "success|error",
"message": "操作结果信息",
"filename": "文件名" (仅成功时)
}
列出视频
GET /EditVideoPlayer/list
Headers: Authorization: Bearer your-secret-api-key
返回:
{
"status": "success|error",
"videos": [
{
"filename": "文件名",
"size": 文件大小(字节),
"modified": 最后修改时间(时间戳)
}
] (仅成功时)
}
播放视频
POST /EditVideoPlayer/play
Headers: Authorization: Bearer your-secret-api-key
Content-Type: application/json
参数:
{
"video_name": "要播放的视频文件名",
"platform": "平台名称",
"target_type": "目标类型(user/group)",
"target_id": "目标ID"
}
返回:
{
"status": "success|error",
"message": "操作结果信息"
}
故障排除
视频播放失败
- 检查平台是否支持消息编辑
- 确认视频文件存在且格式正确(mp4, avi, mov, mkv)
- 查看日志获取详细错误信息
文件上传问题
- 检查服务器磁盘空间
- 验证文件大小限制
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file erispulse_editvideoplayer-1.0.1.tar.gz.
File metadata
- Download URL: erispulse_editvideoplayer-1.0.1.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff444941c0753ae3978611d4c2df25e34b8efb6409e2e14d2d0bc9cdb8fb1f21
|
|
| MD5 |
111ec98cff3b1a65bb98a4a5d4d3c084
|
|
| BLAKE2b-256 |
c169e284406ab889f1ed0aaada2229a7e0fa86ec02c630f576d8d105a2215a54
|
Provenance
The following attestation bundles were made for erispulse_editvideoplayer-1.0.1.tar.gz:
Publisher:
python-publish.yml on wsu2059q/ErisPulse-EditVideoPlayer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erispulse_editvideoplayer-1.0.1.tar.gz -
Subject digest:
ff444941c0753ae3978611d4c2df25e34b8efb6409e2e14d2d0bc9cdb8fb1f21 - Sigstore transparency entry: 390304633
- Sigstore integration time:
-
Permalink:
wsu2059q/ErisPulse-EditVideoPlayer@9c37fc8e73ed3180b7b92b1dbc65d4063be5dea7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wsu2059q
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9c37fc8e73ed3180b7b92b1dbc65d4063be5dea7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file erispulse_editvideoplayer-1.0.1-py3-none-any.whl.
File metadata
- Download URL: erispulse_editvideoplayer-1.0.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f44ad15e88133d5e274f8622c3b2f670d6568b196c8769fd9e08f5b929d1a27
|
|
| MD5 |
cde51aad524a7656e41c12434269124a
|
|
| BLAKE2b-256 |
6363cc079787a0bb92346af2e4a6774383b7ff2ea27a2e72fc17132eeaf67e41
|
Provenance
The following attestation bundles were made for erispulse_editvideoplayer-1.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on wsu2059q/ErisPulse-EditVideoPlayer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erispulse_editvideoplayer-1.0.1-py3-none-any.whl -
Subject digest:
9f44ad15e88133d5e274f8622c3b2f670d6568b196c8769fd9e08f5b929d1a27 - Sigstore transparency entry: 390304679
- Sigstore integration time:
-
Permalink:
wsu2059q/ErisPulse-EditVideoPlayer@9c37fc8e73ed3180b7b92b1dbc65d4063be5dea7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wsu2059q
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9c37fc8e73ed3180b7b92b1dbc65d4063be5dea7 -
Trigger Event:
workflow_dispatch
-
Statement type: