Skip to content

Commit

Permalink
Merge pull request #2 from Dalrae1/patch-3
Browse files Browse the repository at this point in the history
Fix options for data sent to UI
  • Loading branch information
spoty123 authored Sep 18, 2022
2 parents 730b625 + ff477ad commit 222983d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@ onNet('screenshot_basic:requestScreenshot', (options: any, url: string) => {
});

onNet('screenshot_basic:requestVideo', (options: any, url: string) => {
options.isVideo = true;
options.duration = options.duration || 1000;
options.encoding = options.encoding || 'webm';

options.targetURL = `http://${GetCurrentServerEndpoint()}${url}`;
options.targetField = 'file';
options.resultURL = null;

options.correlation = registerCorrelation(() => { });

const realOptions = {
isVideo: true,
duration: options.duration || 1000,
encoding: options.encoding || 'webm',
targetURL: `http://${GetCurrentServerEndpoint()}${url}`,
targetField: 'file',
resultURL: false,
correlation: registerCorrelation(() => { })
};
SendNuiMessage(JSON.stringify({
request: options
request: realOptions
}));
});

0 comments on commit 222983d

Please sign in to comment.