Render Game to HTML canvas (video call, video record...)

DAMN IS THAT GOOD. Keep it up, very great release <3

1 Like

Would you be able to create a tutorial or assist me with making this work?

Phone I am using is GitHub - Re-Ignited-Development/Re-Ignited-Phone: ReIgnited Phone is a continuation and reimagination of the original GCPhone resource

EDIT: I am not terribly adept with javascript. I rendered it to a canvas instead of letting your script create a canvas, and it works as expected. Apologies!

(Original Post)

Hey, utk.
I made an issue on the github, but maybe it would’ve been wiser to post it here.I’ve built and set myself up a PHP upload script on a webserver, and a camera script in-game to take pictures.
The pictures are taken (but completely transparent! Correct size and everything else works as expected.) and uploaded correctly.
Is this an issue with my code, or an issue with the script? I am running the server through FXDK if that makes a difference.
I’ve tried both async and standard for both your method and mine, and the transparency issue persists.

Okay… WHY did you lock this version of the release to the display demonstrated in the video?

I just spent 6 hours trying to figure out where my code was busted that the scaling was awful (100% height, 20% width, 35% offset left). Turns out, you have two different versions of this resource - both busted unless being used for the exact use cases you showcased.

PSA: For anyone wondering, you can NOT drag and drop this resource! You have to fuck with the orthographic camera portion and a few other lines regarding canvas control and viewport math to suit it to your needs, because this resource isn’t built for trust-the-programmer like the very vast majority of, well, everything else in the world is.

The resource is one I’d never be able to build myself, so I’m appreciative you took the time to build it, but it’s also absolutely and entirely useless unless you understand how the code works and can modify it for your specific needs.

Both not locked to a fixed ratio, last one (streamer thing) is 1 : 1 to your height and width. And yes this is not a drag and drop resource, how could it be anyway? This was not made for a specific use case. This was made so that developers can create their own resources. And the second release was posted to demonstrate a simple use case.

Both not locked to a fixed ratio

They absolutely are! There’s no customizable parameters like it would need.

not a drag and drop resource, how could it be anyway

You add parameters for the zoom and ratio…?

Your streamer version is customized to use a temp canvas for whatever reason, which doesn’t allow for custom displays, and this version is stuck in fish-eye phone hell.

I had to compare the differences in the two and figure out what the hell was on fire to get a 1:1 ratio fullscreen to work - and even with the version I changed it wouldn’t allow for many use cases (such as filters or zoom) which are needed for any sort of photo-taking to work as hoped for - which I assume this resource was intended for, correct?

no, not correct.

Then what was it intended for?

Because I see it being used for video, which requires the single-frame taking functionality to be working.

Can we see say real time skybox windows :smiley:

Any new readme info on this @utkuali as we have very little to work off of to add it to scripts.

@ElusionPDX you can check In Game streaming to players - FiveM Resource Development & Modding / Releases - Community
it uses this script to create streaming app

Was more asking about the use of it to replace screenshot basic of with you said it could replace it Render Game to HTML canvas (video call, video record...) - #15 by Banjojajao
Any easy way to update things to use this

I was curious if anyone knows the convert from screenshot-basic to this via the lua side.

As far as I am aware, there is not lua export for this like screenshot-basic, just all JS sided?

can it record a audio from pma-voice script ?