W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2016

[whatwg] possible new parameters to video.play() ?

From: Melvin Carvalho <melvincarvalho@gmail.com>
Date: Sun, 18 Sep 2016 01:21:27 +0200
Message-ID: <CAKaEYhKmTiMqDJytLkNvM9OFQ6r8eo2nhw4khR03A6dfTvUcBA@mail.gmail.com>
To: whatwg@lists.whatwg.org
Apologies if this has come up before, but I was wondering if it would be
possible to add simple parameters to the play() function.

They would be

play(start, end)

Where start and end are the times in seconds.

I know you can do

video.currentTime = start ; video.play()

But there's no real easy way to stop it to play a clip

The media fragments URIs spec [1] handles this quite nicely by adding to
the URI


But yet there seems to be no way to do this in JS, resorting to changing
location.hash and then doing a reload, which seems a bit of a kludge

I may be missing something extremely obvious, if so, I'd love to know!

[1] https://www.w3.org/TR/media-frags/
Received on Saturday, 17 September 2016 23:21:55 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:39 UTC