Add credentials fields to chrome.cast.media.LoadRequest for Cast Connect / Android TV usage#74959
Add credentials fields to chrome.cast.media.LoadRequest for Cast Connect / Android TV usage#74959CHENPINCHIEH wants to merge 2 commits into
Conversation
Add Credentials fields to LoadRequest
Fix update chrome FileSystem types to match dtslint expectations
|
@CHENPINCHIEH Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment that I will keep updated. This PR touches some part of DefinitelyTyped infrastructure, so a DT maintainer will need to review it. This is rare — did you mean to do this? 1 package in this PR (and infra files)Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 74959,
"author": "CHENPINCHIEH",
"headCommitOid": "391a1d886d71a244498d22106ba959ada7ddb5e1",
"mergeBaseOid": "5afdcf191470cfb4efc44ff12fe66231ca64f1d9",
"lastPushDate": "2026-05-06T09:02:00.000Z",
"lastActivityDate": "2026-05-08T08:36:24.000Z",
"hasMergeConflict": true,
"isFirstContribution": true,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": null,
"kind": "edit",
"files": [
{
"path": "package.json",
"kind": "infrastructure"
}
],
"owners": [],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical",
"isSafeInfrastructureEdit": false
},
{
"name": "chrome",
"kind": "edit",
"files": [
{
"path": "types/chrome/chrome-cast/index.d.ts",
"kind": "definition"
},
{
"path": "types/chrome/index.d.ts",
"kind": "definition"
},
{
"path": "types/chrome/test/chrome-cast.ts",
"kind": "test"
},
{
"path": "types/chrome/test/index.ts",
"kind": "test"
}
],
"owners": [
"matthewkimber",
"otiai10",
"sreimer15",
"MatCarlson",
"ekinsol",
"echoabstract",
"spasma",
"bdbai",
"JasonXian",
"usertim",
"idan315",
"nicolas377",
"idosal",
"fregante",
"erwanjugand"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "changereq",
"reviewer": "erwanjugand",
"date": "2026-05-08T08:36:24.000Z"
}
],
"mainBotCommentID": 4386520490,
"ciResult": "pass"
} |
|
🔔 @matthewkimber @otiai10 @sreimer15 @matcarlson @ekinsol @EchoAbstract @spasma @bdbai @JasonXian @userTim @idan315 @nicolas377 @idosal @fregante @erwanjugand — please review this PR in the next few days. Be sure to explicitly select |
There was a problem hiding this comment.
Hi, this PR introduces changes that, in my opinion, shouldn’t be included (impact on Chrome extension types, infrastructure changes).
Also, how can your changes be tested?
I don’t understand why the Chromecast types are included here and how to test this.
|
@CHENPINCHIEH One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
|
@CHENPINCHIEH Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day! |
To clarify, I am currently developing/updating the sender side. The reason this PR affects Chrome extension types is that the fields I'm adding are officially defined under chrome.cast.media.LoadRequest according to the Google Cast Official Documentation. Since the cast-sender implementation directly inherits or references these types from the Chrome extension namespace, updating chrome.cast is a necessary step to ensure the sender-side types remain accurate and functional. |
| "remark-validate-links": "^13.0.0", | ||
| "risk": "^0.0.4", | ||
| "typescript": "next" | ||
| "typescript": "^5.9.3" |
There was a problem hiding this comment.
You shouldn't modify the repository's package.json
| @@ -1,4 +1,3 @@ | |||
| /// <reference types="filesystem" /> | |||
There was a problem hiding this comment.
The PR should only modify chrome-cast, not the types and tests related to Chrome extensions.
| playbackRate?: number | undefined; | ||
| } | ||
|
|
||
| interface LoadRequest { |
There was a problem hiding this comment.
I think this should be in the LoadRequest class.
There was a problem hiding this comment.
Missing queueData, requestId, sessionId and type keys ?
| loadRequest.credentials = 'user-123'; | ||
| loadRequest.credentialsType = 'token'; | ||
| loadRequest.atvCredentials = 'user-123-atv'; | ||
| loadRequest.atvCredentialsType = 'token'; |
There was a problem hiding this comment.
| loadRequest.credentials = 'user-123'; | |
| loadRequest.credentialsType = 'token'; | |
| loadRequest.atvCredentials = 'user-123-atv'; | |
| loadRequest.atvCredentialsType = 'token'; | |
| loadRequest.credentials = 'user-123'; // $ExpectType string | undefined | |
| loadRequest.credentialsType = 'token'; // $ExpectType string | undefined | |
| loadRequest.atvCredentials = 'user-123-atv'; // $ExpectType string | undefined | |
| loadRequest.atvCredentialsType = 'token'; // $ExpectType string | undefined |
Confirm that the values can be undefined.
| credentials?: string; | ||
| credentialsType?: string; | ||
| atvCredentials?: string; | ||
| atvCredentialsType?: string; |
There was a problem hiding this comment.
| credentials?: string; | |
| credentialsType?: string; | |
| atvCredentials?: string; | |
| atvCredentialsType?: string; | |
| credentials?: string | undefined; | |
| credentialsType?: string | undefined; | |
| atvCredentials?: string | undefined; | |
| atvCredentialsType?: string | undefined; |
If we can explicitly define undefined with exactOptionalPropertyTypes option
This PR adds missing credential-related fields to chrome.cast.media.LoadRequest in @types/chrome.
Context
In real-world Google Cast applications, launch and session identity information is propagated across different platforms (Web, Chromecast, and Android TV via Cast Connect).
While the official Cast SDK documentation does not explicitly define these as formal LoadRequest properties, they are used in practice as part of Cast Connect / Android TV launch data handling.
Changes
Added optional fields to LoadRequest:
These fields represent:
Rationale
Notes
Test
Added type tests verifying: