Skip to main content

一个通用的视频播放器模块,可将视频转换为点阵字符并在支持消息编辑的平台上播放

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

erispulse_editvideoplayer-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

erispulse_editvideoplayer-1.0.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file erispulse_editvideoplayer-1.0.0.tar.gz.

File metadata

File hashes

Hashes for erispulse_editvideoplayer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 744a9bbe142d2effbda29589408d44f94f40249a020d265a9c0d2126dc43b44c
MD5 27c62cd3dea629f43a221aa2b7741bd6
BLAKE2b-256 a228c0426bb17f46fcc6ab6206c51c393e1edfa2e4fcacd9cc8740400ce6bf20

See more details on using hashes here.

Provenance

The following attestation bundles were made for erispulse_editvideoplayer-1.0.0.tar.gz:

Publisher: python-publish.yml on wsu2059q/ErisPulse-EditVideoPlayer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file erispulse_editvideoplayer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for erispulse_editvideoplayer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a49cd1c9b14b4bc544ebd92d3de8a0825578fbb93d488b12fe59e9752b0bc7e
MD5 2217f9d7401e9e3d977fac86b29d9b20
BLAKE2b-256 a31629761ef73b1effb56ea5d5f33d457ef1ffabd18ecb134e9b3fa902c5d741

See more details on using hashes here.

Provenance

The following attestation bundles were made for erispulse_editvideoplayer-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on wsu2059q/ErisPulse-EditVideoPlayer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page