Skip to content

Latest commit

 

History

History
84 lines (62 loc) · 2.16 KB

File metadata and controls

84 lines (62 loc) · 2.16 KB

richyplayer

a video player library for pygame-ce, works on desktop and web

supports python 3.9+

features

  • ability to fetch local & web videos on both desktop & web
  • ability to play said videos with its original audio[1], override the audio, or no sound at all
  • works on:
    • desktop: windows, linux, raspberry pi os, etc.
    • web: pygbag, pyodide & pyscript[2]

installation

desktop

put this in your cli: pip install git+https://github.com/richkdev/richyplayer.git then just do import richyplayer

web

put the entire richyplayer folder inside the the root folder as your main.py

BEFORE:

my-project
├── img/
│   └── image.png
├── sfx/
│   └── sound.mp3
├── main.py
├── README.md
└── requirements.txt

AFTER:

my-project
├── richyplayer/
│   ├── __init__.py
│   ├── richyplayer.py
│   └── ...
├── img/
│   └── image.png
├── sfx/
│   └── sound.mp3
├── main.py
├── README.md
└── requirements.txt

usage

check richyplayer/examples/ for examples on how to use the richyplayer

notes

  1. original video's audio can't be played on all supported web platforms. the workaround is to play the put the audio in a different file - whether it be local or web - and pass the path to the override_audio_source param in VideoPlayer.open().
  2. on pyodide, pass enableRunUntilComplete: false to loadPyodide so that the old no-op behavior is enabled.

references

references when using the richyplayer

license

MIT