Skip to content

feat(client): add title URL param to override document title#399

Open
joshfriend wants to merge 1 commit into
NetrisTV:masterfrom
joshfriend:feat/title-param
Open

feat(client): add title URL param to override document title#399
joshfriend wants to merge 1 commit into
NetrisTV:masterfrom
joshfriend:feat/title-param

Conversation

@joshfriend

@joshfriend joshfriend commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Adds an optional title URL param that overrides the automatic document title.

Client titles are currently hardcoded per type (Stream <deviceName>, Shell <udid>, Devtools <udid>, Listing <serial>, <deviceName>. Configure stream). When a client is embedded in an iframe or opened in a detached/popup window, there's no way to give it a meaningful tab/window title.

This parses title into ParamsBase alongside the other shared params (useProxy, secure, hostname, ...), so every client picks it up through the existing super.parseParameters() chain. BaseClient.setTitle then prefers params.title over the automatic title. When the param is absent, behavior is unchanged.

Example:

#!action=stream&udid=...&player=webcodecs&title=Pixel%207%20(API%2034)

Also appends the <title> element to <head> in the (previously dead) branch that creates one, so the fallback actually works.

Titles are hardcoded per client type (Stream, Shell, Devtools, etc.).
Parse an optional 'title' into ParamsBase alongside the other shared
params, and use it in BaseClient.setTitle to override the automatic
title. Lets an embedded or popped-out client show a meaningful document
title. Falls back to the automatic title when the param is absent.
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

Successfully merging this pull request may close these issues.

1 participant