ScratchAddons icon indicating copy to clipboard operation
ScratchAddons copied to clipboard

Recording won't record lists and variables

Open Scratchfangs opened this issue 4 years ago • 8 comments

Recording won't record lists and variables. A hunch of mine is because they are outside the canvas but I am wondering if there is a fix.

Scratchfangs avatar Apr 02 '21 20:04 Scratchfangs

Probably will never happen, unless I'm missing something - there's no API to record an area of the page, only to record the canvas. One "workaround" could be using the screen sharing feature, but that would also show the cursor, and the result wouldn't be a 4:3 video.

WorldLanguages avatar Apr 02 '21 20:04 WorldLanguages

@WorldLanguages Would it be possible to create another, invisible canvas and render the content of the canvas and the monitors onto it every frame?

mxmou avatar Apr 03 '21 06:04 mxmou

Too laggy IMO.

apple502j avatar Apr 03 '21 13:04 apple502j

Too laggy IMO.

Could it be optional?

mxmou avatar Apr 03 '21 13:04 mxmou

@mxmou Not sure how you could accurately render HTML/CSS based monitors into a canvas.

WorldLanguages avatar Apr 03 '21 15:04 WorldLanguages

@mxmou Not sure how you could accurately render HTML/CSS based monitors into a canvas.

I think it's possible to embed them inside a SVG and render it.

mxmou avatar Apr 03 '21 15:04 mxmou

What about rendering variables? There is this option called "variables" as a folder which you can view variables data. We can render the variables data (along with how it like like slider) into the video.

One question Can you get the data if variable is slider,large readout, normal variable (Such as API, or a quick CSS/HTML check)?

TecFuture avatar Apr 09 '21 20:04 TecFuture

there's no API to record an area of the page, only to record the canvas

This is outdated now!! Good news

https://developer.chrome.com/blog/new-in-chrome-104/#region-capture

getDisplayMedia() makes it possible to create a video stream from the current tab. But, there are times when you don’t want the entire tab, only a small portion of it. Until now, the only way to do that was to manually crop each video frame.
With Region Capture, a web app can define the specific area of the screen it wants to share. For example, Google Slides could allow you to stay in the standard editing view, and share the current slide.

More info: https://developer.chrome.com/docs/web-platform/region-capture/

WorldLanguages avatar Sep 16 '22 21:09 WorldLanguages

Rejected for now, due to compatibility concerns.

apple502j avatar Nov 02 '22 08:11 apple502j

Rejected for now, due to compatibility concerns.

Couldn't the canvas hack be implemented as a temporary solution?

mxmou avatar Nov 02 '22 12:11 mxmou

You need to explain what "compatibility concerns" is. Using this new API can be opt-in.

WorldLanguages avatar Nov 02 '22 21:11 WorldLanguages

See https://region-capture-demo.glitch.me/ for a demo. Still not supported on Firefox.

WorldLanguages avatar May 24 '23 23:05 WorldLanguages