Introduce a generic skip action as a replacement to skipad.#350
Introduce a generic skip action as a replacement to skipad.#350
Conversation
|
Bikeshed now requires Python 3.9; you are on 3.8.10. @tidoust, do you know what happened there? |
9be83a9 to
095f9c7
Compare
Needed to get Python >=3.9 for Bikeshed. Also used this opportunity to bump the version of the checkout action used. Via #350 (comment)
Needed to get Python >=3.9 for Bikeshed. Also used this opportunity to bump the version of the checkout action used. Via #350 (comment)
095f9c7 to
22f2e57
Compare
| sequence<ChapterInformationInit> chapterInfo = []; | ||
| }; | ||
|
|
||
| enum MediaKind { |
There was a problem hiding this comment.
Can we add a section describing what these mean? "advertisement" is obvious to me, but the rest are not so obvious
There was a problem hiding this comment.
I updated the enum and added some description.
Let's discuss this enum.
There was a problem hiding this comment.
Does the implementation make use of these values, e.g., in a default action handler? I'm wondering if an enum is needed and we could let the web app set any value it wants, using DOMString.
Also, a web app might want to skip between chapters, so do we need similar on ChapterInformation?
There was a problem hiding this comment.
kind could influence UA UI (whether displaying a skip button, for how long, skip button label customisation to Skip intro for instance...). An arbitrary DOMString might add complexity and would disallow feature detection.
do we need similar on
ChapterInformation?
Right, this PR adds kind to ChapterInformation as well.
There was a problem hiding this comment.
This list may be a bit too specific, for example BBC might want to offer a skip to next news item, skip to next song, or whatever.
dd6eede to
03f6850
Compare
| typically happening at the beginning of a TV series episode and summarizing past episodes. | ||
| </li> | ||
| <li> | ||
| the empty string: the default value of media content, it represents any other value of a part of media content. |
There was a problem hiding this comment.
Seems like empty string will be used to mean both "actual content" and "unknown content". Should there be an explicit value for actual content?
There was a problem hiding this comment.
Changed to other for now.
|
This generally lgtm just added a bikeshed comment on the MediaKind enum |
| "opening-credits", | ||
| "post-credits-scene", | ||
| "summary", | ||
| "" |
There was a problem hiding this comment.
Maybe let's just call this "content" ? or "other".
There was a problem hiding this comment.
Changed it to other, note that the default value of the dictionary kind value is also updated.
|
Discussed today in media WG meeting.
I may also add wording about potential default handlers, (seek to next chapter if skipping a chapter or to the end if there is no chapter). |
|
@chrisn, would the note and the renaming of "" to "other" cover your concerns? Or do you have a better idea in how to handle the case of "next song", "next news"...? |
| <li>Its <a for=MediaMetadata>title</a> is the empty string.</li> | ||
| <li>Its <a for=MediaMetadata>artist</a> is the empty string.</li> | ||
| <li>Its <a for=MediaMetadata>album</a> is the empty string.</li> | ||
| <li>Its <a for=MediaMetadata>kind</a> is the empty string.</li> |
There was a problem hiding this comment.
Should this say the kind is "other"?
| dictionary ChapterInformationInit { | ||
| DOMString title = ""; | ||
| double startTime = 0; | ||
| MediaKind kind = ""; |
There was a problem hiding this comment.
Same question here about whether it should be "other"
@steimelchrome asked about "actual content" vs "unknown content" so I'm not sure I see how renaming "" to "other" addresses that. For us, there may not be a need to, and "" could be enough as a general purpose skip. But (and separately to the WG) we'd be interested to see what kind of UI treatment browsers might be planning for these skip actions. |
Introduce a media kind to allow marking content as either advertisement, generic and so on.
Co-authored-by: Chris Needham <chrisn@users.noreply.github.com>
Co-authored-by: Chris Needham <chrisn@users.noreply.github.com>
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a generic skip action to replace the advertisement-specific skipad action, and adds a new MediaKind enumeration to categorize media content types. This allows for more flexible skipping behavior based on different types of media content rather than being limited to advertisements only.
- Replaces the
skipadaction with a genericskipaction - Adds a new
MediaKindenumeration with values for different content types (advertisement, credits, content, etc.) - Integrates
MediaKindinto bothMediaMetadataandChapterInformationinterfaces
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| attribute DOMString title; | ||
| attribute DOMString artist; | ||
| attribute DOMString album; | ||
| readonly attribute MediaKind kind; |
There was a problem hiding this comment.
The 'kind' attribute is marked as readonly in the interface but can be set through MediaMetadataInit. This inconsistency could confuse API consumers about whether the property is mutable after construction.
| interface ChapterInformation { | ||
| readonly attribute DOMString title; | ||
| readonly attribute double startTime; | ||
| readonly attribute MediaKind kind; |
There was a problem hiding this comment.
Similar to MediaMetadata, the 'kind' attribute is readonly in ChapterInformation but can be set through ChapterInformationInit, creating potential confusion about mutability.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| "cold-open-scene", | ||
| "opening-credits", | ||
| "post-credits-scene", | ||
| "summary", |
There was a problem hiding this comment.
Instead of summary, recap might be a better word? It matches current impl via content providers and recap more closely matches this element's description.
Introduce a media kind to allow marking content as either advertisement, generic...
Fixes #340.
Preview | Diff