proposals icon indicating copy to clipboard operation
proposals copied to clipboard

Video time in accordance to playbackrate

Open hemanth opened this issue 3 years ago • 6 comments

Introduction

We we have video which is 60 seconds long, when the playbackrate set to 2x the video length should be 30 seconds as of today the UI doesn't reflect in accordance to the playbackrate.

Use Cases

Users normally have to do the math to calculate the remaining time for a video based on the playbackrate, which shouldn't be the case?

Goals

  • Video element to reflect the time in accordance to playbackrate
  • Maybe we need an APIs to get the remaining time with an option to consider the playbackrate.

Non-goals (Optional)

TDB

Proposed Solution

Video's total time should be calculated considering the playbackrate

Examples

const video = document.createElement('video');
const curtime = video.duration; // maybe this should consider the playbackrate
const video = document.createElement('video');
const curtime = video.getDuration('playbackrate'); // or maybe getDurationWithPlayback, ah too big

Alternate Approaches

  • video.countdown
  • video.remaining

hemanth avatar Sep 28 '22 21:09 hemanth

+1 for the use case. I’d make it video.remainingTime, consistent with currentTime.

tomayac avatar Sep 28 '22 21:09 tomayac

@tomayac What would be the next logical step here? We should present this idea in a TAG meeting?

hemanth avatar Nov 08 '22 23:11 hemanth

Maybe open this as an issue on the WHATWG/HTML repo to get more feedback?

tomayac avatar Nov 09 '22 04:11 tomayac

I agree with @tomayac, and also suggest opening an HTML spec issue, for the whatwg/media folks to respond to.

chrisn avatar Nov 09 '22 09:11 chrisn

Done. Should we close this then?

hemanth avatar Nov 09 '22 22:11 hemanth

I’d link the present issue from the new HTML issue so there’s a paper trail.

tomayac avatar Nov 09 '22 22:11 tomayac