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

feat: Customize WebDriver config in custom launcher #35

Merged
merged 4 commits into from
Mar 23, 2022

Conversation

tykus160
Copy link
Member

Example of custom launcher with this PR:

module.exports = function(config) {
  const firefoxOptions = {
    'moz:firefoxOptions': {
      prefs: {
        'media.eme.enabled': true,
        'media.gmp-manager.updateEnabled': true,
      },
    },
  };

  config.set({
    customLaunchers: {
      'FirefoxEME': {
        base: 'Firefox',
        config: firefoxOptions,
      },
      'FirefoxHeadlessEME': {
        base: 'FirefoxHeadless',
        config: firefoxOptions,
      },
    },
  });
};

@joeyparrish
Copy link
Member

I think this is really useful. But for shaka-player, I think those settings you quote in the PR description should be the defaults for Firefox.

Copy link
Member

@joeyparrish joeyparrish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -61,6 +62,10 @@ const LocalWebDriverBase = function(baseBrowserDecorator, logger) {

log.debug('config:', JSON.stringify(config));

const extraSpecs =
_.merge(this.constructor.EXTRA_WEBDRIVER_SPECS, args.config);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please document the config field in the Configuration section of the README?

Also, could you please add this to the EXTRA_WEBDRIVER_SPECS for Firefox launchers by default?

    'moz:firefoxOptions': {
      prefs: {
        'media.eme.enabled': true,
        'media.gmp-manager.updateEnabled': true,
      },
    },

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I hope provided example is good enough.

Copy link
Member

@joeyparrish joeyparrish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@joeyparrish joeyparrish changed the title feat: Add possibility to override WebDriver config in custom launcher feat: Customize WebDriver config in custom launcher Mar 23, 2022
@joeyparrish joeyparrish merged commit c8fe569 into shaka-project:main Mar 23, 2022
joeyparrish pushed a commit that referenced this pull request Mar 23, 2022
🤖 I have created a release *beep* *boop*
---


## [1.6.0](v1.5.0...v1.6.0) (2022-03-23)


### Features

* Customize WebDriver config in custom launcher ([#35](#35)) ([c8fe569](c8fe569))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
joeyparrish added a commit that referenced this pull request Apr 21, 2022
A dependency on lodash was introduced in #35, but lodash was only a transitive dep for the launcher.  Since #35 made the dependency on it a direct one, it should be explicit in package.json.
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Aug 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants