question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot set playwright firefoxUserPrefs for using DRM content

See original GitHub issue

I try to set a firefoxUserPrefs Dict i still have to figure out which prefs are needed because I need to enable DRM content. What I now so far is that one of the needed preference needed is to enable media.gmp-manager.updateEnabled. I can manually activating it after launch in about:config but not with firefoxUserPrefs.

I also need to do the same thing for webkit but I cannot find any place to set any settings? how can I set the experimental features of webkit

playwright = await async_playwright().start()
prefDict = ''
browser = await playwright.firefox.launch(headless=False, firefoxUserPrefs=prefDict)

I tried already these out and none of them are working, what am I doing wrong?

prefDict = {'media.gmp-manager.updateEnabled':true}
prefDict = {'media.gmp-manager.updateEnabled':True}
prefDict = {'media.gmp-manager.updateEnabled':'true'}
prefDict = {'media.gmp-manager.updateEnabled':'True'}
prefDict = [{'media.gmp-manager.updateEnabled':true}]
prefDict = [{'media.gmp-manager.updateEnabled':True}]
prefDict = [{'media.gmp-manager.updateEnabled':'true'}]
prefDict = [{'media.gmp-manager.updateEnabled':'True'}]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mxschmittcommented, Nov 8, 2020

Could reproduce it:

from playwright import sync_playwright

with sync_playwright() as playwright:
    browser = playwright.firefox.launch(firefoxUserPrefs={"kekstar": "bar"})
    page = browser.newPage()
    page.goto("http://whatsmyuseragent.org/")
    page.screenshot(path="example.png")
    browser.close()

With env var DEBUGP=1 it gets shown in the logs, but won’t get received on the pw-client level (DEBUG=*). Will investigate further.

0reactions
Shinoby92commented, Mar 5, 2021

testing it out now using prefDict = {“media.gmp-manager.updateEnabled”: True, “media.allowed-to-play.enabled”: True}

media.allowed-to-play.enabled is enabled but still media.gmp-manager.updateEnabled getting ignored

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Enable download and usage of OpenH264 ... - GitHub
Hi. Playwright is awesome. However, I tried to make use of the streaming application which uses DRM content and "media.gmp-manager.updateEnabled ...
Read more >
Unable to play DRM content in firefox - Mozilla Support
We are using Playready and Widewine encryption ... We can't ask our users to change the setting if they want to watch our...
Read more >
Set browser options for Playwright tests | BrowserStack Docs
Playwright allows you to set browser arguments for Chromium based browsers and Firefox user preferences if the selected browser is Firefox.
Read more >
Installation | Playwright
In this case, Playwright can be configured to download from a custom location using the PLAYWRIGHT_DOWNLOAD_HOST env variable. # Linux/macOS. $ pip install ......
Read more >
Error: Cannot find module '@playwright/test' - Stack Overflow
You have to install @playwright/test library: npm i -D @playwright/test. Do not use playwright-expect library. Playwright already includes ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found