Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Video Chapter in MediaMetadata #952

Open
1 task done
jiajiabingcheng opened this issue May 4, 2024 · 3 comments
Open
1 task done

Support Video Chapter in MediaMetadata #952

jiajiabingcheng opened this issue May 4, 2024 · 3 comments

Comments

@jiajiabingcheng
Copy link

こんにちは TAG-さん!

I'm requesting a TAG review of the Chapter Information in MediaMetadata.

Background:
Media content such as youtube videos can contain chapters or markers that break down the video’s content by timestamp. There is currently no concept of chapter information within the MediaMetadata to capture such information. See the proposal: w3c/mediasession#273

In this project we add the ChapterInformation attribute in the current MediaMetadata.

What changed in the explainer introduction section:
Before this change:
A MediaMetadata object can contain media metadata like title, artist, album and artwork.
After this change:
A MediaMetadata object can contain media metadata like title, artist, album, artwork, and video chapter information.

You should also know that...

[please tell us anything you think is relevant to this review]


CAREFULLY READ AND DELETE CONTENT BELOW THIS LINE BEFORE SUBMITTING

Please preview the issue and check that the links work before submitting.

In particular, if anything links to a URL which requires authentication (e.g. Google document), please make sure anyone with the link can access the document. We would prefer fully public documents though, since we work in the open.

¹ We require an explainer to give the relevant context for the spec review, even if the spec has some background information. For background, see our explanation of how to write a good explainer. We recommend the explainer to be in Markdown.

² A Security and Privacy questionnaire helps us understand potential security and privacy issues and mitigations for your design, and can save us asking redundant questions. See https://www.w3.org/TR/security-privacy-questionnaire/.

³ For your own organization, you can simply state the organization's position instead of linking to it. Chromium doesn't have a standards-positions repository and prefers to use comments from the teams that maintain the relevant area of their codebase.

@hober
Copy link
Contributor

hober commented May 20, 2024

We already have a mechanism to expose timed metadata—track elements, WebVTT, etc. Can't we just use that existing infrastructure?

@hober
Copy link
Contributor

hober commented May 20, 2024

Also, this should probably be exposed in the same way as the strobing mitigation stuff.

@jiajiabingcheng
Copy link
Author

Hi @hober,

Thanks for your feedback!

Before starting implementation, we considered using the Web API to set chapter information via elements (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track) just as you suggested. However, after discussing with our Media Session and YouTube teams, we identified several drawbacks to this approach:
1, Lack of image support: There's no standardized way to include chapter images using this approach.
2, Core player integration: It would require modifications to the core player code since it touches the media element. This would be inconsistent with how the rest of the system UI uses MediaSession, potentially leading to maintenance challenges and inconsistencies in the future.
3, Awkward DOM usage: Representing structured chapter data directly within the DOM felt cumbersome and not ideal for this use case.

And this proposed approach, adding a new ChapterInformation field to the current metadata, can help ensure we have a well defined API and maintain a simple implementation process for the websites.

Let me know if you have any questions or concerns :]

@plinss plinss removed this from the 2024-05-20-week:c milestone May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants