Fix clips (kinda) (#688)
* add ignorePlatformRestriction toggle * Clean up types * fix intl --------- Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
parent
2c2df3b0d5
commit
90dd0b79bd
1 changed files with 12 additions and 6 deletions
|
|
@ -43,6 +43,12 @@ const settings = definePluginSettings({
|
|||
default: true,
|
||||
restartNeeded: true
|
||||
},
|
||||
ignorePlatformRestriction: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Allow Platform Restricted Clipping (may cause save errors)",
|
||||
default: true,
|
||||
restartNeeded: true
|
||||
},
|
||||
clipsLink: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "",
|
||||
|
|
@ -95,7 +101,7 @@ export default definePlugin({
|
|||
find: "2022-11_clips_experiment",
|
||||
replacement: {
|
||||
match: /defaultConfig:\{enableClips:!\d,ignorePlatformRestriction:!\d,showClipsHeaderEntrypoint:!\d,enableScreenshotKeybind:!\d,enableVoiceOnlyClips:!\d,enableAdvancedSignals:!\d\}/,
|
||||
replace: "defaultConfig:{enableClips:!0,ignorePlatformRestriction:!0,showClipsHeaderEntrypoint:!0,enableScreenshotKeybind:$self.settings.store.enableScreenshotKeybind,enableVoiceOnlyClips:$self.settings.store.enableVoiceOnlyClips,enableAdvancedSignals:$self.settings.store.enableAdvancedSignals}"
|
||||
replace: "defaultConfig:{enableClips:!0,ignorePlatformRestriction:$self.settings.store.ignorePlatformRestriction,showClipsHeaderEntrypoint:!0,enableScreenshotKeybind:$self.settings.store.enableScreenshotKeybind,enableVoiceOnlyClips:$self.settings.store.enableVoiceOnlyClips,enableAdvancedSignals:$self.settings.store.enableAdvancedSignals}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -107,7 +113,7 @@ export default definePlugin({
|
|||
}
|
||||
],
|
||||
|
||||
patchTimeslots(timeslots) {
|
||||
patchTimeslots(timeslots: { id: string; value: number; label: string; }[]) {
|
||||
const newTimeslots = [...timeslots];
|
||||
|
||||
extraTimeslots.forEach(timeslot => newTimeslots.push({
|
||||
|
|
@ -118,10 +124,10 @@ export default definePlugin({
|
|||
})
|
||||
}));
|
||||
|
||||
return newTimeslots.toSorted();
|
||||
return newTimeslots.sort((a, b) => a.value - b.value);
|
||||
},
|
||||
|
||||
patchFramerates(framerates) {
|
||||
patchFramerates(framerates: { id: string; value: number; label: string; }[]) {
|
||||
const newFramerates = [...framerates];
|
||||
|
||||
// Lower framerates than 15FPS have adverse affects on compression, 3 minute clips at 10FPS skyrocket the filesize to 200mb!!
|
||||
|
|
@ -129,11 +135,11 @@ export default definePlugin({
|
|||
id: `${framerate}fps`,
|
||||
value: framerate,
|
||||
label: getIntlMessage("SCREENSHARE_FPS_ABBREVIATED", {
|
||||
count: framerate
|
||||
fps: framerate
|
||||
})
|
||||
}));
|
||||
|
||||
return newFramerates.toSorted();
|
||||
return newFramerates.sort((a, b) => a.value - b.value);
|
||||
},
|
||||
|
||||
getApplicationId(activityName: string) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue