[csswg-drafts] [css-images-4] Add way to adjust playback speed of animated images, pause animating image (#9396)

SploxFox has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-images-4] Add way to adjust playback speed of animated images, pause animating image ==
Currently there is no way to pause/adjust the playback speed of animating GIFs/webps. I suggest adding descriptors something along the lines of the following:

### `image-animation-speed: auto | <time-percentage>`
Multiply the natural playback speed of the image by this value, speeding it up (> 100%), slowing it down (< 100%), pausing it (= 0), or reversing it (< 0%).

### `image-animation-clip-start: <time-percentage>`
Clip off the specified amount of time from the start of the animation, so those frames are skipped. The duration decreases by this value.

### `image-animation-clip-end: <time-percentage>`
Clip off the specified amount of time from the end of the animation, so those frames are skipped. The duration decreases by this value.

### `image-animation-duration: auto | <time>`
Makes the animation play for the specified duration.

### `image-animation-paused-at: <time-percentage>`
Alternative name: `image-animation-stopped-at`
Image is paused at the fame at the given time (based on the natural playback speed). If a number or a percent, the image is paused at the position that portion through the image's animation (so 1 or 100% is the last frame of the animation, and 0 or 0% is the first. 50% is the middle frame). If this property is later removed from the image, the image will continue animating from this frame (it won't start over).

Adding these properties would allow web developers to control the playback of GIF and Webp images, which is currently impossible.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9396 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 21 September 2023 19:31:56 UTC