Playground "Run and start video recording" button?

Is there a way in the Playground to start recording a video as soon as “Run” is selected?

Currently, hitting Run resets the Inspector window and collapses the wrench menu and I have to reselect wrench icon, scroll down, select “Record video”. This is particularly difficult on a small screen/window.

By the time I am able to hit the Record video button, a few seconds have elapsed and if its a short demo, it will be almost over. (see this video as an example)

Why don’t you invoke the recorder right away? Here’s an example:

1 Like

Sure, but I don’t necessarily want to record every run, nor do I want to cancel download every time I don’t want the recording, nor do I want the recording as part of my shared playground forcing others to download or cancel, nor do I want to add “record” code to someone else’s playground just to show what it looks like on my device. Also, because playground support of touchscreen-only devices (tablets/phones) is horrible, I edit the playground code locally, then copy/paste the entire code into a playground.

On a tablet, you can’t select/copy anything within playground code other than one single full line. And that’s only when the device has a (virtual) keystroke for “copy”. If it doesn’t (Android phones do not), then you can’t copy anything at all from the playground code.

Summary: a single “run and start video recording” button would be extremely useful.

It is possible to add a Button to invoke but I think what you’re saying is, you don’t want the code in the Playground? Small screens/mobiles hide the code by default so I struggle to see your issue. Don’t forget you can put a class in the Button that is only visible on larger screens, using media queries.

Hello :slight_smile:

Quite a specific request ^^


Yeah I was about to say : if you don’t want to modify the code, then the only way is a modification of the Playground source code, maybe you could ask it as a feature request :stuck_out_tongue:


An “in-between” way would be to trigger a prompt :

For all the reasons cited above, I don’t want to add or save code for every playground I want to “run and record,” including those of others.

I guess you’d like to be able to configure mobile features in your PG (the icons at the bottom):

I had some suggestions configuring/linking Playgrounds with the new Viewer V2.

Agreed!

@ryantrem I do think this highlights some accessibility ideas/requirements for mobile. Obviously we need to keep the UI minimal and maintain familiarity across Viewer experiences.

I’m trying to suggest adding a button in the Inspector, right below “Record video” in the wrench menu that implements “Run and record video.” But maybe that’s a bigger change than I thought since the inspector (I think) is general purpose and is used in more than just the playground?

If you happen to try a UI edit on the source code, I think I’m the last one to have edited the PG UI menus, when adding the new code snippet menu :

Ping me if you need help, I’m quite up to date with this ^^

1 Like

I think this falls into a new feature request called “Actions” which can be optionally added to Viewer/Playground with input params and keyboard shortcuts. VideoRecorder being one of them.

I did once think about creating a developer browser extension (chromium) that interacts with BJS for these actions. It would have to be accessible globally, with some observers. The more I question it I do feel is it not the best idea…

Yes exactly! I don’t think we have inspector plugins/want to condition specific cases.

1 Like

I think you’re right, especially given my realization (just above) that the Inspector is general purpose. (edited this sentence:) The button I suggested, “Run and record”, ties the Inspector to the Playground through the assumption of the existence of “Run”). So an abstraction of “Actions” would be a prudent implementation to avoid directly tying the Inspector, in its source code, to a specific environment.

I just noticed that on my android phone, I can’t get the “dual screen” view (code on left with babylon canvas on right). I only get the single view in which I can switch between viewing code or viewing the canvas.

When in “full screen” mode, the [<>] menu is missing as are the “TS” and “Javascript” tabs.
The playground also appears to default to TS, but only on the phone.

Maybe this info needs to be in a separate thread on “Playground observations on touchscreen and phone.” So that the info is aggregated with other’s comments for the benefit of development consideration. Let me know when such a thread would be useful.

cc @RaananW about the playground and @HiGreg I would suggest to make a feature request for so we can see if this gets traction.

On a more general note, might be fun to have playground plugins added in the new wished list Improving the Babylon playground. A sneak peek into the planned features… | by Babylon.js | Medium

New feature request here.