Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilizing session.enableNetworkEmulation with ElectronDL #133

Open
ajgray2017 opened this issue Mar 3, 2021 · 1 comment
Open

Utilizing session.enableNetworkEmulation with ElectronDL #133

ajgray2017 opened this issue Mar 3, 2021 · 1 comment

Comments

@ajgray2017
Copy link

ajgray2017 commented Mar 3, 2021

How could you use the enableNetworkEmulation call with electronDL? I have been trying for a few days and there seems to be no changes in the speed.

calling this

const throttle = '5'; //Bps
    browserWindow.webContents.session.enableNetworkEmulation({
      downloadThroughput: parseInt(throttle),    
    });

before

  const res = await download(browserWindow, info.url, {
        directory: appPath + '/packages',
        onProgress: progressHandler
      });

EDIT:
Just found this.
electron/electron#21250
If anyone has any other thoughts please leave them, otherwise this seems borked from the start

@ajgray2017 ajgray2017 changed the title Utilizing session.enableNetworkEmulation Utilizing session.enableNetworkEmulation with ElectronDL Mar 3, 2021
@theogravity
Copy link
Contributor

My package has the ability to throttle file transfers and fixes a lot of issues mentioned in the electron-dl issue tickets:

https://github.com/theogravity/electron-dl-manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants