Skip to content

[css-values-5][css-images-4] Allow to change the playback range of media via URL fragment #12558

@SebastianZ

Description

@SebastianZ

Initially suggested by @samuelbredshaw in #9396 (comment), is the idea of allowing to control the playback range of media ‒ animated images in that case, but also applies to video and audio.
As that's a similar but separate feature, I thought this deserves to be discussed on its own.

Samuel actually thought of adding playback control via a special #t=[starttime][,endtime] URL fragment added to the image URL of an <img> element.

My idea is now to allow this special anchor to clip media defined in URLs defined via the <url> value. That clipping should apply wherever animated images, video, or audio are used in CSS.

As an example, an animated background image could then be clipped to the first three seconds like this:

background-image: url("https://media3.giphy.com/media/v1.Y2lkPTc5MGI3NjExeXhmc3Q4dzIzZGJ5NzJ2dGUwaTlwNHdkaHRzeDk0bWI5eXpyazJ0aCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/13FrpeVH09Zrb2/giphy.gif#t=,3");

Sebastian

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions