This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27826 - Media Element currentTime setting with no src defined
Summary: Media Element currentTime setting with no src defined
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P1 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 27830
  Show dependency treegraph
 
Reported: 2015-01-14 00:34 UTC by Jerry Smith
Modified: 2016-04-27 16:27 UTC (History)
4 users (show)

See Also:


Attachments

Description Jerry Smith 2015-01-14 00:34:51 UTC
There is normative guidance in the spec that says currentTime can be set on a media element when no src is defined, and non-normative guidance in a note that says doing this should cause an invalidStateError.  I just did a quick check, and behaviors for various browsers vary:

-  IE11:  returns an invalidStateError
-  Chrome:  returns a DOMException with a message that says the element readyState is HAVE_NOTHING
-  Firefox:  returns an invalidStateError

I believe the non-normative note is affecting the behaviors, and that it should be acceptable to set the default position on a media element with no src yet attached.  The correct behavior would seem to be setting the currentTime value with error.

--------------------------------
Details:

The non-normative note is just under http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#offsets-into-

media . currentTime [ = value ]
Returns the official playback position, in seconds.
Can be set, to seek to the given time.
Will throw an InvalidStateError exception if there is no selected media resource or if there is a current media controller.

The normative guidance is in a paragraph lower down in the section:

The currentTime attribute must, on getting, return the media element's default playback start position, unless that is zero, in which case it must return the element's official playback position. The returned value must be expressed in seconds. On setting, if the media element has a current media controller, then the user agent must throw an InvalidStateError exception; otherwise, if the media element's readyState is HAVE_NOTHING, then it must set the media element's default playback start position to the new value; otherwise, it must set the official playback position to the new value and then seek to the new value. The new value must be interpreted as being in seconds.

The same language is in the WHATWG living HTML spec.
Comment 1 Michael[tm] Smith 2015-06-16 10:24:43 UTC
Making this a higher priority to actively seek more feedback on from implementers and webdevs.
Comment 2 Arron Eicholz 2016-04-27 16:27:31 UTC
HTML5.1 Bugzilla Bug Triage: Fixed, this seems fixed in the latest draft. The invalidStateError is no longer in the note.

If this resolution is not satisfactory, please copy the relevant bug details/proposal into a new issue at the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new where it will be re-triaged. Thanks!