Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: browserless/video-examples
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: browserless/video-examples
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: os-emulation-example
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 8 files changed
  • 2 contributors

Commits on Sep 16, 2026

  1. feat(os-emulation): add OS emulation example

    Adds the os-emulation video example: one query param, emulationOs, gives a
    remote browser a coherent OS identity across user agent, navigator.platform,
    WebGL/GPU and its graphics API, plus viewport, DPR and touch on mobile values.
    
    - 1-bql-os-emulation.graphql + run-1-bql.sh: BrowserQL mutation against
      bot.sannysoft.com, prints the observed identity and saves the screenshot
    - 2-playwright-baas.mjs: same Playwright code captured as Windows desktop and
      Android mobile over the stealth endpoint
    - README covers setup, expected output, and the lowercase-only and
      stealth-routes-only constraints
    
    Token is read from .env or the environment; .env.example carries a placeholder.
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
    AlexLoyola and claude committed Sep 16, 2026
    Configuration menu
    Copy the full SHA
    782a006 View commit details
    Browse the repository at this point in the history
  2. refactor(os-emulation): simplify scripts and align env handling

    - BROWSERLESS_BASE is an https URL in both scripts; the Playwright one
      converts to wss itself, matching news-scraper. One .env now serves both.
    - Document BROWSERLESS_BASE in .env.example and the README.
    - Redact the token from Playwright failure output, and run each capture
      independently so one failure still leaves the other device's result.
    - Validate the OS argument before the request instead of hinting after a 400.
    - Replace the fixed 2.5s sleep with a wait on the product images.
    - Collapse the double jq pretty-print into fromjson, build the request body
      in one jq call, and drop the redundant existsSync and process.exit guards.
    - Drop the unused npm script and the redundant chmod step in the README.
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
    AlexLoyola and claude committed Sep 16, 2026
    Configuration menu
    Copy the full SHA
    380dcf7 View commit details
    Browse the repository at this point in the history
  3. fix(os-emulation): guard the screenshot and page lookups

    - run-1-bql.sh reported success when the response carried no screenshot:
      jq printed the literal "null" and base64 -d decoded it into a 3-byte file
      without erroring. Check for an empty value and fail instead.
    - 2-playwright-baas.mjs indexed contexts()[0].pages()[0] unguarded, so a
      session with no pre-provisioned page failed with an opaque TypeError.
      Raise the real cause instead.
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
    AlexLoyola and claude committed Sep 16, 2026
    Configuration menu
    Copy the full SHA
    d7e27cd View commit details
    Browse the repository at this point in the history
Loading