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

Extend MediaMetadata to capture video chapter information #273

Open
kimjunh opened this issue Apr 19, 2022 · 5 comments
Open

Extend MediaMetadata to capture video chapter information #273

kimjunh opened this issue Apr 19, 2022 · 5 comments

Comments

@kimjunh
Copy link

kimjunh commented Apr 19, 2022

Media content such as youtube videos can contain chapters or markers that break down the video’s content by timestamp. (eg: https://www.youtube.com/watch?v=UOg1hHmGIQQ&t=3s)
There is currently no concept of chapter information within the MediaMetadata to capture such information.

Could we extend the MediaMetadata to add fields to capture chapter information as well?

Example proposed changes:

#w3 MediaSession.MediaMetadata
[Exposed=Window]
interface MediaMetadata {
  constructor(optional MediaMetadataInit init = {});
  attribute DOMString title;
  attribute DOMString artist;
  attribute DOMString album;
  attribute FrozenArray<MediaImage> artwork;
  attribute FrozenArray<ChapterInformation> chapterInfo;
};

dictionary MediaMetadataInit {
  DOMString title = "";
  DOMString artist = "";
  DOMString album = "";
  sequence<MediaImage> artwork = [];
  sequence<ChapterInformation> chapterInfo = [];
};

dictionary ChapterInformation {
  DOMString title = ""; // The chapter's title
  double startTimeSec = ""; // The start time of the chapter in seconds
};
@steimelchrome
Copy link
Contributor

Chrome would be interested in adding chapter information into the MediaMetadata. One thing I think is worth adding to your proposal is artwork per ChapterInformation (so the UA can display an image that represents each chapter if the website provides it).

One other thing that I think is worth discussing is whether the startTimeSec is sufficient, or if we should have a new MediaSessionAction for seeking to a chapter.

@chrisn
Copy link
Member

chrisn commented Dec 11, 2023

This is on the agenda for tomorrow's Media WG meeting. cc @jan-ivar and @youennf for feedback.

@marcoscaceres
Copy link
Member

never mind (deleted my comment), I thought the MediaMetadata was being proposed.

@jiajiabingcheng
Copy link
Contributor

Hey team, I'm making the corresponding change in the specs: #308 Can I have the write access to the repo?

@tidoust
Copy link
Member

tidoust commented Dec 14, 2023

Can I have the write access to the repo?

Write access is restricted to Media Working Group participants and I cannot associate your GitHub handle with one of them. If you're in the group, please associate your GitHub handle with your W3C account. If you're not yet in the group but are affiliated with a W3C member organization, please join the group!

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

6 participants