Skip to content

Update wicg_mediasession.js externs to match spec - #4357

Open
avelad wants to merge 2 commits into
google:masterfrom
avelad:update-mediasession-externs
Open

avelad wants to merge 2 commits into
google:masterfrom
avelad:update-mediasession-externs

Conversation

@avelad

@avelad avelad commented Oct 22, 2026

Copy link
Copy Markdown
  • Add ChapterInformation interface and ChapterInformationInit dictionary
  • Add chapterInfo to MediaMetadata and MediaMetadataInit
  • Add MediaSessionEnterPictureInPictureReason typedef
  • Add enterPictureInPictureReason and isActivating to MediaSessionActionDetails
  • Add setScreenshareActive to MediaSession and update setCameraActive/setMicrophoneActive to return !Promise
  • Maintain all spec URLs with https://wicg.github.io/mediasession/

- Add ChapterInformation interface and ChapterInformationInit dictionary
- Add chapterInfo to MediaMetadata and MediaMetadataInit
- Add MediaSessionEnterPictureInPictureReason typedef
- Add enterPictureInPictureReason and isActivating to MediaSessionActionDetails
- Add setScreenshareActive to MediaSession and update setCameraActive/setMicrophoneActive to return !Promise<void>
- Maintain all spec URLs with https://wicg.github.io/mediasession/
@lauraharker lauraharker self-assigned this Oct 22, 2026

@lauraharker lauraharker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! Looks good besides the @see tag, pulled it into Google's repo & am running tests.

Comment thread externs/browser/wicg_mediasession.js Outdated


/**
* @see https://wicg.github.io/mediasession/#the-chapterinformationinit-dictionary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One small fix: the @see for ChapterInformationInit uses #the-chapterinformationinit-dictionary, which doesn't exist in the spec. Could you change it to https://w3c.github.io/mediasession/#dictdef-chapterinformationinit?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done!

@avelad
avelad requested a review from lauraharker October 23, 2026 07:40
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.

2 participants