0

Doing a google search for:

durationhint html5 video

Comes up with a number of results showing folks using something along the lines of:

<video .... durationhint="120">

Looking at the w3c html5 video tag spec, durationhint is nowhere to be found.

Is this attribute valid? What browsers actually use it? What is the purpose of it (please dont say something along the lines of 'hints at the duration of the video'... i know that part... but what does it actually do)?

Thanks.

anonymous-one
  • 14,454
  • 18
  • 60
  • 84

1 Answers1

2

It's not listed in the current W3C HTML5 Working Draft nor in the WHATWG HTML spec. So the use of this attribute cannot be valid.

This very question is one of the top results for a Google search "HTML5 durationhint", which would give a hint that this attribute is not widely known/used or even specified.

After scanning some other results, it seems to me that this a proprietary attribute used by the Kaltura video player (not soure about it, though). From a Kaltura issue:

The HTML5 video interface supports seek-ahead/pseudo-streaming requests if you add the durationHint='XX:XX' attributes to your tag.

unor
  • 92,415
  • 26
  • 211
  • 360
  • to further complicate things, most of the google results for the query in question show the syntax as durationhint="SECS", be they mainly user discussions and nothing official from a browser developer / w3c / etc. – anonymous-one Oct 28 '12 at 21:07
  • @anonymous-one: If you have not very strong reasons, you shouldn't use this attribute at all, because it is not defined in the HTML(5) specifications. Whoever "invented" this attribute, should have used `data-durationhint`, which would be a valid use. Or they should have filed an issue at W3C/WHATWG, if they think it is valuable/useful for the `video` element. – unor Oct 28 '12 at 21:26