From 9591566220b638c2a5b5d70a0b1cc9de6dfede5d Mon Sep 17 00:00:00 2001 From: Allan Niles Date: Tue, 27 May 2025 22:10:51 -0600 Subject: [PATCH 1/4] add `EJS_screenCapture` --- content/1.docs/7.options.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/content/1.docs/7.options.md b/content/1.docs/7.options.md index b638b16..e68adc3 100644 --- a/content/1.docs/7.options.md +++ b/content/1.docs/7.options.md @@ -481,12 +481,36 @@ Sets the location of what buttons. More information about the virual gamepad but ### `EJS_controlScheme` - Type: `string` -- Default: `` +- Default: ` ` Default behaviour (when option is undefined) not changed (core name will be used). Available control schemes: `nes` `gb` `gba` `snes` `n64` `gba` `nds` `vb` `segaMD` `segaCD` `sega32x` `segaMS` `segaGG` `segaSaturn` `3do` `atari2600` `atari7800` `lynx` `jaguar` `arcade` `mame` +### `EJS_screenCapture` + +Changes the default settings and buttons in the toolbar for screenshots and video recording. + +- Type: `object` +- Default/Example: + +```js +EJS_screenCapture = { + photo: { + source: "canvas", // or "retroarch" (note: setting to retroarch will ignore the format and just be png) + format: "png", // can also be `jpeg` or `webp` (note: safari doesn't support webp so it will default back to png if set) + quality: 1 // can also be `0` which is native, any positive # is valid (note: this will multiply the canvas size by this number). + }, + video: { + format: "detect", // checks in order of `mp4` then `webm` to see if it's supported in the browser (note: will default to what is first supported) + quality: 1, // any positive # is valid (note: this will multiply the canvas size by this number). + fps: 30, // can also be 60 + videoBitrate: (2.5 * 1024 * 1024), // can be any valid bitrate. + audioBitrate: (192 * 1024) // can be any valid bitrate. + } +} +``` + ### `EJS_Buttons` #### Version 4.2.1 and earlier From e2f895c6426daa7b72d52204bc8cd67e08008a48 Mon Sep 17 00:00:00 2001 From: Allan Niles Date: Tue, 27 May 2025 22:58:56 -0600 Subject: [PATCH 2/4] clarify docs --- content/1.docs/7.options.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/1.docs/7.options.md b/content/1.docs/7.options.md index e68adc3..bbaabaf 100644 --- a/content/1.docs/7.options.md +++ b/content/1.docs/7.options.md @@ -486,7 +486,7 @@ Sets the location of what buttons. More information about the virual gamepad but Default behaviour (when option is undefined) not changed (core name will be used). Available control schemes: `nes` `gb` `gba` `snes` `n64` `gba` `nds` `vb` `segaMD` `segaCD` `sega32x` `segaMS` `segaGG` `segaSaturn` `3do` `atari2600` `atari7800` `lynx` `jaguar` `arcade` `mame` - +c ### `EJS_screenCapture` Changes the default settings and buttons in the toolbar for screenshots and video recording. @@ -499,14 +499,14 @@ EJS_screenCapture = { photo: { source: "canvas", // or "retroarch" (note: setting to retroarch will ignore the format and just be png) format: "png", // can also be `jpeg` or `webp` (note: safari doesn't support webp so it will default back to png if set) - quality: 1 // can also be `0` which is native, any positive # is valid (note: this will multiply the canvas size by this number). + quality: 1 // can also be `0` which is native, any positive # is valid (note: this will multiply the canvas & frame size by this number). }, video: { format: "detect", // checks in order of `mp4` then `webm` to see if it's supported in the browser (note: will default to what is first supported) - quality: 1, // any positive # is valid (note: this will multiply the canvas size by this number). + quality: 1, // any positive # is valid (note: this will multiply the canvas & frames size by this number). fps: 30, // can also be 60 - videoBitrate: (2.5 * 1024 * 1024), // can be any valid bitrate. - audioBitrate: (192 * 1024) // can be any valid bitrate. + videoBitrate: 2621440, // can be any valid bitrate. + audioBitrate: 196608 // can be any valid bitrate. } } ``` From baec451f5674166bbb0ddd1825af8c7ba91e6753 Mon Sep 17 00:00:00 2001 From: Allan Niles Date: Wed, 28 May 2025 13:14:30 -0600 Subject: [PATCH 3/4] random c --- content/1.docs/7.options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/1.docs/7.options.md b/content/1.docs/7.options.md index bbaabaf..79f7a6d 100644 --- a/content/1.docs/7.options.md +++ b/content/1.docs/7.options.md @@ -486,7 +486,7 @@ Sets the location of what buttons. More information about the virual gamepad but Default behaviour (when option is undefined) not changed (core name will be used). Available control schemes: `nes` `gb` `gba` `snes` `n64` `gba` `nds` `vb` `segaMD` `segaCD` `sega32x` `segaMS` `segaGG` `segaSaturn` `3do` `atari2600` `atari7800` `lynx` `jaguar` `arcade` `mame` -c + ### `EJS_screenCapture` Changes the default settings and buttons in the toolbar for screenshots and video recording. From 3dec72e7e9ba0e88a7208e9d18cbf6c32ec05fbc Mon Sep 17 00:00:00 2001 From: Allan Niles Date: Tue, 3 Jun 2025 20:44:56 -0400 Subject: [PATCH 4/4] rename to upscale --- content/1.docs/7.options.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/1.docs/7.options.md b/content/1.docs/7.options.md index 79f7a6d..9962a53 100644 --- a/content/1.docs/7.options.md +++ b/content/1.docs/7.options.md @@ -499,11 +499,11 @@ EJS_screenCapture = { photo: { source: "canvas", // or "retroarch" (note: setting to retroarch will ignore the format and just be png) format: "png", // can also be `jpeg` or `webp` (note: safari doesn't support webp so it will default back to png if set) - quality: 1 // can also be `0` which is native, any positive # is valid (note: this will multiply the canvas & frame size by this number). + upscale: 1 // can also be `0` which is native, any positive # is valid (note: this will upscale the canvas & frame size by this number). }, video: { format: "detect", // checks in order of `mp4` then `webm` to see if it's supported in the browser (note: will default to what is first supported) - quality: 1, // any positive # is valid (note: this will multiply the canvas & frames size by this number). + upscale: 1, // any positive # is valid (note: this will upscale the canvas & frames size by this number). fps: 30, // can also be 60 videoBitrate: 2621440, // can be any valid bitrate. audioBitrate: 196608 // can be any valid bitrate.