Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support Webm video format #31

Open
conanak99 opened this issue Jun 25, 2022 · 1 comment
Open

[Feature Request] Support Webm video format #31

conanak99 opened this issue Jun 25, 2022 · 1 comment

Comments

@conanak99
Copy link

What is this request

Currently, renpy web can not support videos. This is a feature request that renpy web can support and play video file format like webm

Why should we have this

Webm video are mostly used for animation, cut-scene… A lot of VNs with animated scene will benefit from this as it can be ported

Technical Challenge

Webm format is supported by most evergreen browsers so it shouldn’t be an issue https://caniuse.com/webm
Based on my experience, browser will prevent auto play video with sound, so video should be muted, or require users to click the play button.

I’m a web developer myself, with some experience with Python. If the maintainer can give me some guideline, I’d love to create a PR for this 😄.

@Tey
Copy link
Contributor

Tey commented Jun 26, 2022

You might find Beuc notes about RenpyWeb interesting here (look for "video").

AFAIK, the autoplay feature is only blocked until the user interacts with the page, so it is not a problem with RenpyWeb (games would not be able to play any audio otherwise).

I'm not really a Renpy expert, but I guess you can start by creating a video channel class similar to the one for Android and make sure it is used instead of the default channel for video (same as for Android). This class would be the bridge between Renpy and the JS code that handles the video element (to put on top of the game canvas). Of course, this would only work for full-screen videos (no Renpy overlay and little interaction).

Better wait for @renpytom approval before starting to work on this PR though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants